Open tlpss opened 1 year ago
Thanks for the report!
The sequence ID has apparently been dropped in ROS2 so if you try to use the Header class you get an error:
Possible solutions include a flag to switch between ROS1 and ROS2 or adding a separate ROS2 Header class:
class ROS2Header(UserDict): """Represents a message header of the ROS 2 type std_msgs/Header.""" def __init__(self, stamp=None, frame_id=None): self.data = {} self.data["stamp"] = Time(stamp["secs"], stamp["nsecs"]) if stamp else None self.data["frame_id"] = frame_id
I'm using your ROS2Header-Class but when Im echoing the topic and looking at the message, It seems that the frame_id is not being populated with the string I put in. It works fine with the stamp tho. Is this an issue for you too?
The sequence ID has apparently been dropped in ROS2 so if you try to use the Header class you get an error:
https://github.com/gramaziokohler/roslibpy/blob/db741a630880bc5fa33db5e66b44dc6bd032be5b/src/roslibpy/core.py#L55
Possible solutions include a flag to switch between ROS1 and ROS2 or adding a separate ROS2 Header class: