Difference between revisions of "ROS topics"

From Lofaro Lab Wiki
Jump to: navigation, search
(ROS topics)
 
 
(One intermediate revision by the same user not shown)
Line 2: Line 2:
 
Now you need to make this node communicate with the turtle_sim node as you expect to move the turtle with keystrokes. This communication is done over topic. Turtle_teleop_key node publishes messages to a topic which is subscribed by turtle_sim node. You need to use rosrun command to make the node communication  
 
Now you need to make this node communicate with the turtle_sim node as you expect to move the turtle with keystrokes. This communication is done over topic. Turtle_teleop_key node publishes messages to a topic which is subscribed by turtle_sim node. You need to use rosrun command to make the node communication  
  
<nowiki>$ rosrun turtlesim turtle_teleop_key</nowiki>
+
  <nowiki>$ rosrun turtlesim turtle_teleop_key</nowiki>
  
Using rqt graph you can see which topic is making the communication between the nodes, for this you should command
 
  
<nowiki>$ rosrun rqt_graph rqt_graph</nowiki>
+
Using rqt graph you can see which topic is making the communication between the nodes, for this you should command
 +
 
 +
 
 +
  <nowiki>$ rosrun rqt_graph rqt_graph</nowiki>

Latest revision as of 19:08, 19 October 2014

Your turtle simulation node runs with the turtle as static. If you want to move your turtle using the keyboard, you need to have a node that will execute the operation of keyboard. There is a node in the system named turtle_teleop_key. Now you need to make this node communicate with the turtle_sim node as you expect to move the turtle with keystrokes. This communication is done over topic. Turtle_teleop_key node publishes messages to a topic which is subscribed by turtle_sim node. You need to use rosrun command to make the node communication

 $ rosrun turtlesim turtle_teleop_key


Using rqt graph you can see which topic is making the communication between the nodes, for this you should command


 $ rosrun rqt_graph rqt_graph