0
$\begingroup$

I have a ROS1 code which I am porting to ROS2. In the ROS1 code, "trajectory_msgs::JointTrajectory" is used whose ros2 equivalent is "trajectory_msgs::msg::JointTrajectory"(refer this file). The issue is that 'header' in ROS1 jointTrajectory which is of type std_msgs(as mentioned here) has seq, stamp and frame_id but 'header' in ROS2 JointTrajectory which is of type std_msgs(as mentioned here) has only stamp and frame_id.

This is the code which I am Porting to ROS2. In this code, joint_trajectory() at line 41 is utilizing the 'seq' parameter. For detailed usage, refer line from 294 to 324 of the same file.

Would it be a good idea to just ignore 'seq' parameter?

$\endgroup$

1 Answer 1

0
$\begingroup$

The sequence number in the header was deprecated some time ago:

https://github.com/ros2/common_interfaces/pull/2

It might be valid for messages to have sequence numbers if the source of the sequence numbers is generated by the user rather than the middleware, but is not needed in Header.msg interface

https://discourse.ros.org/t/is-the-sequence-number-in-header-message-deprecated/1528/2

$\endgroup$
2
  • $\begingroup$ means it can be ignored safely? $\endgroup$
    – Pratham
    Commented Jul 5 at 16:08
  • $\begingroup$ You need to look at the other components of the system that might consume the sequence number. If it's used to make sure trajectory segments are in order, you'll want to figure out a way to pass it on. $\endgroup$ Commented Jul 7 at 20:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.