Skip to content

Commit

Permalink
Update the custom limits test
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyZe committed Dec 8, 2022
1 parent ea6f187 commit 49d6415
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,14 @@ TEST(time_optimal_trajectory_generation, test_custom_limits)

TimeOptimalTrajectoryGeneration totg;
// Custom velocity & acceleration limits for some joints
std::unordered_map<std::string, double> vel_limits{ { "panda_joint1", 1.3 } };
std::unordered_map<std::string, double> accel_limits{ { "panda_joint2", 2.3 }, { "panda_joint3", 3.3 } };
std::unordered_map<std::string, double> vel_limits{ { "panda_joint1", 1.3 }, { "panda_joint2", 2.3 },
{ "panda_joint3", 3.3 }, { "panda_joint4", 4.3 },
{ "panda_joint5", 5.3 }, { "panda_joint6", 6.3 },
{ "panda_joint7", 7.3 } };
std::unordered_map<std::string, double> accel_limits{ { "panda_joint1", 1.3 }, { "panda_joint2", 2.3 },
{ "panda_joint3", 3.3 }, { "panda_joint4", 4.3 },
{ "panda_joint5", 5.3 }, { "panda_joint6", 6.3 },
{ "panda_joint7", 7.3 } };
ASSERT_TRUE(totg.computeTimeStamps(trajectory, vel_limits, accel_limits)) << "Failed to compute time stamps";
}

Expand Down Expand Up @@ -256,7 +262,7 @@ TEST(time_optimal_trajectory_generation, testLargeAccel)
}
}

// TODO(andyz): commented because loadTestingRobotModel() does not parse acceleration limits
// TODO(andyz): commented because loadTestingRobotModel() does not parse acceleration limits from URDF
// // Test parameterizing a trajectory would always produce a trajectory with output end waypoint same as the input end
// waypoint TEST(time_optimal_trajectory_generation, testLastWaypoint)
// {
Expand Down

0 comments on commit 49d6415

Please sign in to comment.