Quick way to construct a large ROS message (with a lot of fields)

asked 2022-07-14 03:09:12 -0500

electrophod gravatar image

Hey everyone,

Consider a ROS message type like visualization_msgs/Marker which has a lot of fields. Is there any quick way to construct this message by just passing arguments directly like:
marker = Marker(0, 1, 2, 3 ...)

instead of

marker = Marker()
marker.header.ns = 0
marker.header.id = 1
marker.header.type = 2
marker.header.action = 3
edit retag flag offensive close merge delete

Comments

1
abhishek47 gravatar image abhishek47  ( 2022-07-14 08:24:23 -0500 )edit