Difference between revisions of "Advantech Robotic Suite/Gazebo"
(8 intermediate revisions by the same user not shown) | |||
Line 11: | Line 11: | ||
*A wide variety of sensors | *A wide variety of sensors | ||
*Convenient programmatic and graphical interfaces | *Convenient programmatic and graphical interfaces | ||
+ | |||
+ | = Recommand Requirement = | ||
+ | *Processor (CPU) — Quad core Intel i5, or equivalent | ||
+ | *Memory (RAM) — 4 GB or more | ||
+ | *[Optional] Graphics card (GPU) — Dedicated GPU with 1 GB or more graphics memory | ||
+ | *Disk space — At least 500 MB free disk space | ||
= Install = | = Install = | ||
Line 27: | Line 33: | ||
</pre> | </pre> | ||
− | = How to | + | = How to = |
== Run gazebo == | == Run gazebo == | ||
<pre> | <pre> | ||
Line 33: | Line 39: | ||
</pre> | </pre> | ||
Choose the world you want to execute. | Choose the world you want to execute. | ||
− | [[File: | + | [[File:Gazebo1.png|none|ROS2 gazebo|800px]] |
+ | For quick use and test, select “Tugbot In Warehouse”, and click RUN. | ||
[[File:ros2_gazebo2.png|none|ROS2 gazebo|800px]] | [[File:ros2_gazebo2.png|none|ROS2 gazebo|800px]] | ||
+ | |||
+ | == Connect with ros2 == | ||
+ | === Install ros_gz_bridge === | ||
+ | <pre> | ||
+ | sudo apt-get install ros-${ROS_DISTRO}-ros-gz | ||
+ | </pre> | ||
+ | === Create bridge from gazebo and ros2 === | ||
+ | For example: bridge lidar and camera data, then observing in Rviz2. | ||
+ | <pre> | ||
+ | ros2 run ros_gz_bridge parameter_bridge /world/world_demo/model/tugbot/link/scan_omni/sensor/scan_omni/scan/points@sensor_msgs/msg/PointCloud2[gz.msgs.PointCloudPacked | ||
+ | ros2 run ros_gz_bridge parameter_bridge /world/world_demo/model/tugbot/link/camera_front/sensor/color/image@sensor_msgs/msg/Image[gz.msgs.Image | ||
+ | </pre> | ||
+ | [[File:ros2_gazebo3.png|none|ROS2 gazebo|800px]] | ||
+ | |||
== Download worlds and models == | == Download worlds and models == | ||
− | We can download | + | We can download other worlds and models in [https://app.gazebosim.org/fuel/worlds gazebosim_app]. |
[[File:Gazebo5.png|none|ROS2 gazebo|1000px]] | [[File:Gazebo5.png|none|ROS2 gazebo|1000px]] | ||
− | + | [[File:ros2_gazebo4.png|none|ROS2 gazebo|1000px]] | |
− | |||
− | [[ |
Latest revision as of 06:20, 14 August 2024
Contents
Introduction
Gazebo is a 3D simulator designed to accurately and efficiently simulate robots in complex indoor and outdoor environments. Unlike typical game engines, Gazebo offers high-fidelity physics simulation, a variety of sensors, and user-friendly interfaces for both users and programs. It can fully integrate with ROS (Robot Operating System) using the gazebo_ros package, allowing you to control simulated robots with ROS messages and services.
Typical uses of Gazebo include:
- Testing robotics algorithms
- Designing robots
- Performing regression testing with realistic scenarios
Key features of Gazebo:
- Multiple physics engines
- A rich library of robot models and environments
- A wide variety of sensors
- Convenient programmatic and graphical interfaces
Recommand Requirement
- Processor (CPU) — Quad core Intel i5, or equivalent
- Memory (RAM) — 4 GB or more
- [Optional] Graphics card (GPU) — Dedicated GPU with 1 GB or more graphics memory
- Disk space — At least 500 MB free disk space
Install
First install some necessary tools:
sudo apt-get update sudo apt-get install lsb-release curl gnupg
Then install Gazebo (It is recommended to install the appropriate version, please refer to gazebosim):
sudo curl https://packages.osrfoundation.org/gazebo.gpg --output /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/pkgs-osrf-archive-keyring.gpg] http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/gazebo-stable.list > /dev/null sudo apt-get update sudo apt-get install gz-garden
How to
Run gazebo
gz sim
Choose the world you want to execute.
For quick use and test, select “Tugbot In Warehouse”, and click RUN.
Connect with ros2
Install ros_gz_bridge
sudo apt-get install ros-${ROS_DISTRO}-ros-gz
Create bridge from gazebo and ros2
For example: bridge lidar and camera data, then observing in Rviz2.
ros2 run ros_gz_bridge parameter_bridge /world/world_demo/model/tugbot/link/scan_omni/sensor/scan_omni/scan/points@sensor_msgs/msg/PointCloud2[gz.msgs.PointCloudPacked ros2 run ros_gz_bridge parameter_bridge /world/world_demo/model/tugbot/link/camera_front/sensor/color/image@sensor_msgs/msg/Image[gz.msgs.Image
Download worlds and models
We can download other worlds and models in gazebosim_app.