Enable mdof trajectory execution#2740
Conversation
sjahr
left a comment
There was a problem hiding this comment.
Overall, I like this change, nice work!
| } | ||
| } | ||
| // clear velocities if we have an incomplete specification | ||
| if (joint_trajectory.points[i].velocities.size() != onedof.size()) |
There was a problem hiding this comment.
Maybe print and error message here, since this probably indicates a bug somewhere
…nterfaces" This reverts commit 885ee27.
|
I've put some of the open requests into #2773, since they seem out of scope of the new free function to me. I'm happy to provide API cleanup after mdof support has been completed. |
| if (!joint_trajectory.joint_names.empty()) | ||
| { | ||
| joint_trajectory.header.frame_id = robot_model->getModelFrame(); | ||
| joint_trajectory.header.stamp = rclcpp::Time(0, 0, RCL_ROS_TIME); | ||
| joint_trajectory.points.resize(trajectory.getWayPointCount()); | ||
| } |
There was a problem hiding this comment.
| if (!joint_trajectory.joint_names.empty()) | |
| { | |
| joint_trajectory.header.frame_id = robot_model->getModelFrame(); | |
| joint_trajectory.header.stamp = rclcpp::Time(0, 0, RCL_ROS_TIME); | |
| joint_trajectory.points.resize(trajectory.getWayPointCount()); | |
| } | |
| if (joint_trajectory.joint_names.empty()) | |
| { | |
| return std::nullopt; | |
| } | |
| joint_trajectory.header.frame_id = robot_model->getModelFrame(); | |
| joint_trajectory.header.stamp = rclcpp::Time(0, 0, RCL_ROS_TIME); | |
| joint_trajectory.points.resize(trajectory.getWayPointCount()); |
There was a problem hiding this comment.
Shouldn't we just exit the function here if joint_names is empty?
There was a problem hiding this comment.
with the updated logic, I would just keep it the way it is probably
Signed-off-by: Paul Gesel <paulgesel@gmail.com>
EzraBrooks
left a comment
There was a problem hiding this comment.
This is working in Pro and the CI failure appears to be a flaky test.
I will re-run the CI here a few times to see if it passes, but otherwise I propose we open another PR to temporarily disable the flaky test.
This implements preparative steps to enable mobile base trajectory execution using ros2_control JTC.
In particular, these changes convert mdof trajectories into joint trajectories using the local variables which in turn can be supported by ros2_control already.
An example for a functioning setup with the Stretch robot + JTC + chained DiffDrive is provided in PickNikRobotics/stretch_ros#48