Skip to content

Latest commit

 

History

History
70 lines (43 loc) · 1.58 KB

README.md

File metadata and controls

70 lines (43 loc) · 1.58 KB

ROS Activities

ROS Logo

ROS Example 3: TurtleBot Simulation using RViz

In this example, we'll work on 3D simulation for TurtleBot 2 using RViz in ROS.

Movement Code

In this file (ros\ros_demo\src\turtlebot_sim\turtlebot_qazdoora.py), you'll find a code that rotates and moves the TurtleBot robot.

We'll apply it on a virtual TurtleBot robot in a 3D simulation environment.

Add the movement Python file in your package (turtlebot_sim directory in our case).


Install TurtleBot Packages for RViz

sudo apt-get install ros-kinetic-turtlebot-*

Launch TurtleBot in RViz

roslaunch turtlebot_stage turtlebot_in_stage.launch

After running this command, RViz simulation will start with TurtleBot robot.

Turtlebot RViz Stage

In case of TURTLEBOT_STAGE_MAP_FILE error, try to use these commands in terminal:

export TURTLEBOT_STAGE_WORLD_FILE="/opt/ros/kinetic/share/turtlebot_stage/maps/stage/maze.world"

export TURTLEBOT_STAGE_MAP_FILE="/opt/ros/kinetic/share/turtlebot_stage/maps/maze.yaml"

Also, after running the same command; you can see the 2D stage for TurtleBot robot:

Turtlebot RViz Stage


Exercise

Try to apply the movement code on TurtleBot in RViz environemt