Can someone please tell me what message-type to use in publishing the following array?:
[
['/turtle1/color_sensor', 'turtlesim/Color'],
['/client_count', 'std_msgs/Int32'],
['/rosout', 'rosgraph_msgs/Log'],
['/rosout_agg', 'rosgraph_msgs/Log'],
['/connected_clients', 'rosbridge_msgs/ConnectedClients'],
['/all_topics', 'std_msgs/String'],
['/turtle1/cmd_vel', 'geometry_msgs/Twist'],
['/turtle1/pose', 'turtlesim/Pose']
]
I'm reacquainting myself with ROS and learning the basics as I modify a basic talker to publish the array above instead of a string. I have consulted documentation but I'm having difficulty figuring out which of those message types to use, if any.
publisher = rospy.Publisher('/all_topics', ???, queue_size=1)
Originally posted by sisko on ROS Answers with karma: 247 on 2020-07-27
Post score: 0
Original comments
Comment by praskot on 2020-07-27:
I'm not sure, if you can use the std_msgs as it is, but maybe can custom-define your own msg? Something like this StringMultiArray.msg
std_msgs/MultiArrayDimension[] dim
std_msgs/String[] data