![]() Press the refresh button in the upper-left to show the new node. Remember if the turtle isn't moving you need to select the turtle_teleop_key terminal again.įor ROS Hydro and later, you should now see the following when you press the up key: linear:įor ROS Groovy and earlier, you should now see the following when you press the up key:. Let's make turtle_teleop_key publish data by pressing the arrow keys. You probably won't see anything happen because no data is being published on the topic. In a new terminal, run: $ rostopic echo /turtle1/command_velocity In a new terminal, run: $ rostopic echo /turtle1/cmd_velįor ROS Groovy and earlier, this data is published on the /turtle1/command_velocity topic. Let's look at the command velocity data published by the turtle_teleop_key node.įor ROS Hydro and later, this data is published on the /turtle1/cmd_vel topic. Rostopic echo shows the data published on a topic. Let's use some of these topic sub-commands to examine turtlesim. Or pressing tab key after rostopic prints the possible sub-commands: $ rostopic Rostopic list print information about active topics Rostopic hz display publishing rate of topic rostopic bw display bandwidth used by topic.You can use the help option to get the available sub-commands for rostopic $ rostopic -h The rostopic tool allows you to get information about ROS topics. As you can see, the turtlesim_node and the turtle_teleop_key nodes are communicating on the topic named /turtle1/command_velocity. If you place your mouse over /turtle1/command_velocity it will highlight the ROS nodes (here blue and green) and topics (here red). Replacing with the name of your ROS distribution (e.g. $ sudo apt-get install ros-rqt-common-plugins Unless you already have it installed, run: Rqt_graph creates a dynamic graph of what's going on in the system. Note: If you're using electric or earlier, rqt is not available. Let's use rqt_graph which shows the nodes and topics currently running. turtle_teleop_key is publishing the key strokes on a topic, while turtlesim subscribes to the same topic to receive the key strokes. The turtlesim_node and the turtle_teleop_key node are communicating with each other over a ROS Topic. Now that you can drive your turtle around, let's look at what's going on behind the scenes. If you can not drive the turtle select the terminal window of the turtle_teleop_key to make sure that the keys that you type are recorded. Now you can use the arrow keys of the keyboard to drive the turtle around. 1254264546.878445000: Started node, pid, bound on, xmlrpc port, tcpros port, logging to, using time.Please run in a new terminal: $ rosrun turtlesim turtle_teleop_key We'll also need something to drive the turtle around with. Please run in a new terminal: $ rosrun turtlesim turtlesim_node ![]() Only one roscore needs to be running.įor this tutorial we will also use turtlesim. Please kill other roscore/master processes before relaunching roscore cannot run as another roscore/master is already running.If you left roscore running from the last tutorial, you may get the error message: Let's start by making sure that we have roscore running, in a new terminal: $ roscore
0 Comments
Leave a Reply. |