ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

moving turtlebot in simulation using a C++ program

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

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
0

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

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

Comments

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 -0500 )edit

The code is here.

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

Thank you.

Ahyan gravatar image Ahyan  ( 2015-01-15 01:26:01 -0500 )edit

Question Tools

2 followers

Stats

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

Seen: 2,938 times

Last updated: Jan 07 '15