Simulating the Turtlebot3 Robot

Canonical Ubuntu
Canonical Ubuntu
3.3 هزار بار بازدید - 4 سال پیش - Interested in getting started in
Interested in getting started in robotics? There's no need to spend $1000+ just to try some things out. Simulate a TurtleBot3 instead! It's complete with LIDAR, a camera, a gyro and many other sensors and actuators.

See the Ubuntu blog for more details on the installation used in this video, https://ubuntu.com/blog/simulate-the-...

To install ROS in a LXD container, following the video instructions Install ROS in an LXD Container, use these commands to launch:

 lxc launch -p ros ubuntu:20.04 turtlebot
 lxc ubuntu turtlebot

From a running Ubuntu installation with the ROS installation sources configured, install ROS with these commands (replace curly brackets with angled brackets):

 sudo apt install ros-foxy-desktop
 source /opt/ros/foxy/setup.bash
 echo "source /opt/ros/foxy/setup.bash" }} ~/.bashrc
 sudo apt install python3-colcon-common-extensions

Use this command to install gazebo:

 sudo apt install gazebo11 ros-foxy-gazebo-ros-pkgs

To build the TurtleBot3 and install from source, follow the TurtleBot3 ROS 2 PC Setup instructions with some updates for Foxy + Gazebo 11, https://emanual.robotis.com/docs/en/p... (replace curly brackets with angled brackets):

 sudo apt install python3-vcstool
 mkdir -p ~/turtlebot3_ws/src
 cd ~/turtlebot3_ws
 wget https://raw.githubusercontent.com/ROB...
 vcs import src { turtlebot3.repos
 colcon build --symlink-install
 echo 'source ~/turtlebot3_ws/install/setup.bash' }} ~/.bashrc

Finish the installation by setting two additional environment variables (replace curly brackets with angled brackets):

 echo 'export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:~/turtlebot3_ws/src/turtlebot3/turtlebot3_simulations/turtlebot3_gazebo/models' }} ~/.bashrc
 echo 'export TURTLEBOT3_MODEL=waffle_pi' }} ~/.bashrc
 source ~/.bashrc

Launch the simulator following the TurtleBot 3 simulation instructions https://emanual.robotis.com/docs/en/p...

 ros2 launch turtlebot3_gazebo empty_world.launch.py
 ros2 launch turtlebot3_gazebo turtlebot3_house.launch.py

Use ROS commands either on the same host or on another host connected to the same network to explore your simulator.

ros2 topic list
ros2 service list
ros2 topic pub /cmd_vel geometry_msgs/Twist '{linear: {x: 1.0}}' -1
ros2 topic pub /cmd_vel geometry_msgs/Twist '{linear: {x: 0.0}}' -1
ros2 run turtlebot3_teleop teleop_keyboard


If you try to control a simulated TurtleBot3 from another machine and it doesn't seem to be working, check the `ROS_DOMAIN_ID` environment variable.

––––––––––––––––––––––––––––––
Soundtrack:
Breathe by Axl & Arth SoundCloud: axlarth
Creative Commons — Attribution-ShareAlike 3.0 Unported— CC BY-SA 3.0
Free Download / Stream: https://bit.ly/breathe-feat-dimi-marc
Music promoted by Audio Library Breathe (feat Dimi Marc) – Axl & Arth...
4 سال پیش در تاریخ 1399/08/23 منتشر شده است.
3,397 بـار بازدید شده
... بیشتر