Ask Your Question

moving turtlebot in simulation using a C++ program

asked 2015-01-07 03:05:56 -0600

Ahyan gravatar image

I want to learn, how to move turtlebot in simulation using a c++ program. I am following ROS Tutorial Part 3. However, the tutorial used electric while I am using hydro. As there is no turtlebot_key.cpp in hydro, I collected it from this site. I Used roslaunch turtlebot_gazebo turtlebot_empty_world.launch and made the node executed. It is showing the following message.

Reading from keyboard


Use arrow keys to move the turtlebot.

However turtlebot in gazebo doesn't move. I wish to know, does turtlebot_key.cpp work in hydro? Do I need to change it? Your help is highly appreciated. Thank you

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-01-07 06:28:07 -0600

pronik gravatar image

You could use teleop for moving the turtlebot around using keyboard in gazebo. Use:

$ roslaunch turtlebot_teleop keyboard_teleop.launch

edit flag offensive delete link more


Yes, I can use this. However I want to see the code (C++) so that I can learn and modify the code to control the turtlebot. I would like to ask if someone has the code. Thank you

Ahyan gravatar image Ahyan  ( 2015-01-07 20:11:30 -0600 )edit

The code is here.

BennyRe gravatar image BennyRe  ( 2015-01-08 01:26:46 -0600 )edit

Thank you.

Ahyan gravatar image Ahyan  ( 2015-01-15 01:26:01 -0600 )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



Asked: 2015-01-07 03:05:56 -0600

Seen: 2,452 times

Last updated: Jan 07 '15