Ask Your Question
3

Can't drive the turtle in turtlesim

asked 2011-12-21 02:39:25 -0500

GenePSmith gravatar image

I've just started working with ROS and I'm working through the beginner's tutorial. I am using Ubuntu 11.10. I'm at "Understanding ROS Topics"1.1.2 and when I implement rosrun turtlesim turtle_teleop_key the turtle won't move around with my arrow keys. Is there anything I need to do to set my keys so they will run the turtle?

Thanks, Gene

edit retag flag offensive close merge delete

4 Answers

Sort by ยป oldest newest most voted
2

answered 2011-12-21 13:32:15 -0500

karthik gravatar image

Hi, The terminal which has

rosrun turtlesim turtle_teleop_key

running should be the active window on the desktop for it to drive the robot. I think this is what is missed. If not you have to post the changes if any that you made or any error that you are getting.

Hope this helps, Karthik

edit flag offensive delete link more
4

answered 2011-12-22 13:45:27 -0500

GenePSmith gravatar image

Thanks for the answers. It turns out, as I discovered about 15 minutes after I posted the request that I kept making the turtle terminal the active window and not the "turtle_teleop_key" terminal window. When I made the "turtle_teleop_key" terminal active everything worked fine.

edit flag offensive delete link more
0

answered 2020-03-04 11:41:04 -0500

fabbro gravatar image

updated 2020-03-05 14:48:50 -0500

jayess gravatar image

As others already said, you need to make active (by clicking on it) the window where you launched

rosrun turtlesim turtle_teleop_key

But also, another source of error could be that you are not sourcing correctly your environment.

Indeed, I needed in the terminals I was using:

source /opt/ros/kinetic/setup.bash

source ~/catkin_ws/devel/setup.bash

I hope this will help someone

edit flag offensive delete link more
0

answered 2011-12-21 19:56:58 -0500

michikarg gravatar image

You can also check if velocity commands are sent on the cmd_vel topic by:

rostopic echo /cmd_vel

edit flag offensive delete link more

Comments

Where you placed the turtlesim package? I have placed inside sandbox, but rospack can't locate it.

RB gravatar image RB  ( 2013-11-08 05:26:47 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2011-12-21 02:39:25 -0500

Seen: 2,364 times

Last updated: Mar 05 '20