For what you are saying, it looks like something in the simulation is broken. In that case, I suggest that you change to a Unit with another simulation (for instance, ROS Services), and then you go back to your actual Chapter. This way, the simulation will be relaunched and it will fix any issue.
With the simulation working properly, the results of the rostopic list should be:
and for the rostopic info should be:
As you can see (answering your question 1), with the “rostopic info /cmd_vel” command, you can identify the type of message that this topic uses. In this case, it is the Twist message.
You can now then check how it’s the structure of this message by using the “rosmsg show” command:
So (answering your question 2), you can now see that the structure of the Twist message contains the linear.x and angular.z variables. In this case, you just have to worry about this 2 variables because the turtlebot robot uses a differential drive. Then, to access this variables through the code, you would do it like this:
from geometry_msgs.msg import Twist //You import the message
move = Twist() //You create an instance of the Twist message
move.linear.x = 0.5 //You give a value to the linear x variable of the message
move.angular.z = 0.5 //You give a value to the angular z variable of the message
Hope this answers your questions. Do not doubt to contact us for any other questions!