roslibjs icon indicating copy to clipboard operation
roslibjs copied to clipboard

Cannot get defined constants from ros messages with getMessageDetails()

Open devguy22 opened this issue 10 years ago • 2 comments

We have several ros messages that all have defined constants like test.msg: string TYPE_ORANGE=orange string TYPE_RED=red std_msgs/Header header uint32 seq time stamp...

I can get at all of the non-constant information, but I need those too. Accessing via python uses a dot notation like test.TYPE_ORANGE or c++ like test::TYPE_ORANGE. Can getMessageDetails be modified to access those?

devguy22 avatar Apr 27 '16 21:04 devguy22

I can look into this if contributions are welcome. Pinging @jihoonl for opinion.

ghost avatar Mar 01 '17 23:03 ghost

Um attaching constants in all messages will create lots of overheads. rospy and roscpp are not doing it either. They just read class structure directly from file.

But I agree that it is missing feature. How about extending /rosapi/(message, service_request, service_response)_details srvs to provide constants?

jihoonl avatar Mar 02 '17 08:03 jihoonl

Any updates on this?

Alqio avatar Nov 16 '22 08:11 Alqio

Fixed by https://github.com/RobotWebTools/rosbridge_suite/pull/412

User needs to provide his/her own callback function which reads the service response with the msg/srv details.

MatthijsBurgh avatar Nov 16 '22 08:11 MatthijsBurgh