yuzhenning / ROS_turtlebot2

This is a file record Ubuntu based ROS and Turtlebot2 control system
0 stars 0 forks source link

05 Gazebo Simulate and control Turtlebot #5

Open yuzhenning opened 5 years ago

yuzhenning commented 5 years ago

Using ROS system to control and simulating turtlebot in gazebo

yuzhenning commented 5 years ago

step1 : running ros:

$ roscore
yuzhenning commented 5 years ago

step 2 : open gazebo simulator system

$ roslaunch turtlebot_gazebo turtlebot_world.launch
yuzhenning commented 5 years ago

step3: control turtlebot

$ roslaunch turtlebot_teleop keyboard_teleop.launch  --screen
yuzhenning commented 5 years ago

Explane: up to this step,we can control turtlebot in gazebo

install or upgrade rviz:

$ sudo apt-get install ros-indigo-rviz

Now , we will finish the last step : real-time simulation in gazebo and rviz with gmapping slam system

yuzhenning commented 5 years ago

Procedure introduction: Donnot running roscore independly !!!

step 1 : gazebo:

$ roslaunch turtlebot_gazebo turtlebot_world.launch

step 2: turtlebot keyboard control -

$ roslaunch turtlebot_teleop keyboard_teleop.launch --screen

step 3: slam-gmapping

$ roslaunch turtlebot_gazebo gmapping_demo.launch

step 4 : rviz simulation !!! not rviz-robot but : view_navigation !!!

$ roslaunch turtlebot_rviz_launchers view_navigation.launch
yuzhenning commented 5 years ago

conclusion:

it looks like that , we have to running gazebo with turtlebot model firstly, secondly running gmapping slam thirdly, running rviz with navigation display system. Based on this procedure, we can substitude turtlebot model in rviz

yuzhenning commented 5 years ago

Added tips:

open gmapping node:

$ export TURTLEBOT_GAZEBO_WORLD_FILE="/opt/ros/kinetic/share/turtlebot_gazebo/worlds/playground.world"
$ roslaunch turtlebot_gazebo turtlebot_world.launch
$ roslaunch turtlebot_gazebo gmapping_demo.launch
$ roslaunch turtlebot_rviz_launchers view_navigation.launch
$ roslaunch turtlebot_teleop keyboard_teleop.launch