Print a msg from a Turtlebot3 subscriber
Hey,
I am just trying to print a msg that is subscribed from the cmd_vel_rc100 message. Here is some of the code:
def moving(self):
self.pub_cmd_vel = rospy.Publisher('cmd_vel', Twist, queue_size=5)
while self.finish:
vel_cmd = Twist()
vel_cmd_received = Twist()
vel_cmd.linear.x = 0
self.pub_cmd_vel.publish(vel_cmd)
vel_cmd_received = rospy.Subscriber('cmd_vel_rc100', Twist, queue_size=5)
print vel_cmd_received
self.finish = False
When I run the node, I see the following in the terminal for the cmd_vel_rc100:
<rospy.topics.Subscriber object at 0x7fd7a0436d50>
Normally, the node must be of type Twist(). My question is now, why don´t I see the normal Twist message?
Thanks for your help!