Skip to content

Commit

Permalink
Fixed grep
Browse files Browse the repository at this point in the history
  • Loading branch information
kevindlewis23 committed Jun 7, 2024
1 parent 55f9f6b commit 0231f42
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ik_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
python -m pip install --upgrade pip
python -m pip install dist/ik_python*.whl
python -m pip install numpy
python test/test.py | egrep "FAILED|ERROR" && exit 1 || exit 0
python test/test.py 2>&1 | egrep "FAILED|ERROR" && exit 1 || exit 0
continue-on-error: false
linux:
needs: test
Expand Down
7 changes: 5 additions & 2 deletions ik_python/test/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# Requires numpy to be installed

# Import the test case csv files
generalFilenames = ['IK_2_intersecting', 'IK_2_parallel', 'IK_3_parallel_2_intersecting', 'IK_3_parallel', 'IK_gen_6_dof', 'IK_spherical', 'IK_spherical_2_parallel', 'IK_spherical_2_intersecting']
generalFilenames = ['IK_2_intersecting', 'IK_2_parallel', 'IK_3_parallel_2_intersecting', 'IK_3_parallel', 'IK_spherical', 'IK_spherical_2_parallel', 'IK_spherical_2_intersecting', 'IK_gen_6_dof']
hardcodedFilenames = ['IRB_6640', 'KUKA_R800_fixed_q3', "RRC_fixed_q6", "spherical_bot", "three_parallel_bot", "two_parallel_bot", "ur5", "yumi_fixed_q3"]

from collections import namedtuple
Expand Down Expand Up @@ -42,8 +42,11 @@ def check_general_robot(self, bot):
kinematics = ik_python.KinematicsObject(hMatrix, pMatrix)
bot.robot.set_kinematics(kinematics)

# Generate 100 random robot configurations
# Generate 20 random robot configurations
qVals = np.random.rand(20, 6) * 2 * pi
# Generate fewer for the 6 dof bot because it is slower
if bot.casename == "IK_gen_6_dof":
qVals = np.random.rand(5, 6) * 2 * pi
for i, q in enumerate(qVals):
# Get the forward kinematics result and then run inverse to see if we get the same thing
forward_kinematics = bot.robot.forward_kinematics(q)
Expand Down

0 comments on commit 0231f42

Please sign in to comment.