ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I know this is an old question, but I found this when googling for this same answer. I found a solution to this by using type(rosmsg.get_array_type_instance(t)).

I know this is an old question, but I found this when googling for this same answer. I found a solution to this by using type(rosmsg.get_array_type_instance(t)).

For example, rosmsg.get_array_type_instance('geometry_msgs/Pose[]') returns an instance of type <class 'geometry_msgs.msg._Pose.Pose'>

I know this is an old question, but I found this when googling for this same answer. I found a solution to this by using type(rosmsg.get_array_type_instance(t)).

For example, rosmsg.get_array_type_instance('geometry_msgs/Pose[]') returns an instance object of type <class 'geometry_msgs.msg._Pose.Pose'>