ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I don't know about any existing way to get json directly, but the output of rosmsg show should be relatively easy to parse and transform into json. e.g.:
$ rosmsg show sensor_msgs/CameraInfo
Header header
uint32 seq
time stamp
string frame_id
uint32 height
uint32 width
RegionOfInterest roi
uint32 x_offset
uint32 y_offset
uint32 height
uint32 width
float64[5] D
float64[9] K
float64[9] R
float64[12] P
And if you're into python, you can checkout the implementation of rosmsg here