Show how to run the code.
update 20200731
- robot_description_deprecated/
- robot_gz_deprecated/
- tb_description_deprecated
These 3 packages are deprecated. Keep them for reference.
ROS and Gazebo
- ROS-melodic (Choose your )
- Gazebo-9.0
Remember to match ROS and Gazebo distribution. Details here
Other ROS packages
- ros-melodic-turtlebot3
- ros-melodic-robot-state-publisher
- ros-melodic-joint-state-publisher-gui
# Open a terminal
./build.sh
source devel_isolated/setup.bash
roslaunch robot_gz show_in_gazebo.launch
# Open a new terminal
source devel_isolated/setup.bash
roslaunch robot_gz show_in_rviz.launch
# Open a new terminal to control the robot
# Package Turtlebot3 need a enviromental variable in their launch file
export TURTLEBOT3_MODEL="burger"
roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch
Or you want to use turtlebot1's way to control the robot.
Source code here: link , build it as a ROS package.
source <Path2SetupBash>/setup.bash
roslaunch turtlebot_teleop keyboard_teleop.launch
Personally, I prefer turtlebot_teleop
.
Use gazebo_ros to do this simulation for washing-floor robot
Here documents how to finishe this simulation in several steps.
Read URDF in Gazebo
Learn how to add <gazebo> element in .xacro
.
I learn how to use gazebo_ros plugin from an example of several Turtlebot3 ros package below:
Clone them in the same directory and catkin_make
to build the code
Alternatively, you can install them in ROS by apt-get install
Do not forget to install ros-melodic-
# view the turtlebot3 in gazebo
roslaunch turtlebot3_gazebo turtlebot3_world.launch
# view the turtlebot3 in rviz
roslaunch turtlebot3_gazebo turtlebot3_gazebo_rviz.launch
# use teleop to control the turtlebot
roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch
Read the source code of these packages
It shows how to use libgazebo_ros_diff_drive.so
to implement the differential speed control.
Also, it provides the examples of libgazebo_ros_imu.so
and libgazebo_ros_laser.so
.xacro
is much powerful than .urdf
for its macros.
Use macros can simplify model written in .urdf
or .xacro
.
Tutorial for all. Click here
config --> part.xacro -->whole.xacro
Hard to control right now
Need to learn how to modify the physics param.
update 20200731
Hard to find a precise way to control my own robot due to the mass center does not locate on the wheel axis. So we change the visual of turtlebot_burger to make the control easier.