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

The error is correct. data_class Twist is not a class.

This is wrong,

rospy.Subscriber(move_topic,move_datatype(),move_callback)

This is the correct way to subscribe to any topic,

rospy.Subscriber('/cmd_vel', Twist, callback)

BUT

In your case, datatype: Twist is coming as string and you do not want that. try to use eval(). For an example

rospy.Subscriber(move_topic, eval(move_datatype), move_callback)