Unable to drive turtle in turtlesim

asked 2019-06-21 17:19:09 -0600

Starroller gravatar image

updated 2019-06-22 04:11:39 -0600

gvdhoorn gravatar image

I am currently going through the Ros Tutorials and am on the section "Understanding ROS Topics." I am on a Winodows 10 laptop running ROS Kinetic on Ubuntu 16.04 LTS (which I downloaded from the Windows store) and I am using the VcXsrv Windows X server in order to display the turtlesim. Currently when I run

$ rosrun turtlesim turtle_teleop_key

I get the lines 'Reading from keyboard --------------------------- Use arrow keys to move the turtle.' without any of the outputs before those lines that are supposed to be displayed as shown by the tutorial, such as:

[ INFO] 1254264546.878445000: Started node [/teleop_turtle], pid [5528], bound on [aqy], xmlrpc port [43918], tcpros port [55936], logging to [~/ros/ros/log/teleop_turtle_5528.log], using [real] time

I am in fact on the terminal window that is running turtle_teleop_key when I am pushing the arrow keys, and when I am running

$ rostopic echo /turtle1/cmd_vel

and pressing arrow keys while in the turtle_teleop_key window, I do see changes and updates in the '/rostopic echo /turtle1/cmd_vel/' window as shown by the tutorial, but no changes to the turtle in the turtlesim window. (Velocity commands are being sent to the turtle, but the pose of the turtle itself is not moving, at least that's what I believe to be happening).

Additionally, when I attempt the command

rostopic pub -1 /turtle1/command_velocity turtlesim/Velocity -- 2.0 1.8

as shown in the tutorial, I likewise do not get a response from the turtlesim window while I do get a response from the '/rostopic echo /turtle1/cmd_vel/' window. However, using rosservices to command the turtle, such as

$ rosservice call /turtle1/teleport_relative 1 0

does in fact elicit a response from the turtle. I was wondering what I can do in order to get the turtle to move through "turtle_teleop_key" and the "rostopic pub" commands, whether it's something with the system I am using or something about the program itself. Thank you!

edit retag flag offensive close merge delete


Could you please format your question text a little better? Right now it's too large blocks of text with console output merged in there, which makes it quite hard to read.

A few empty lines would go a long way.

gvdhoorn gravatar image gvdhoorn  ( 2019-06-22 02:10:29 -0600 )edit