Difference between revisions of "Advantech Robotic Suite/Container/Utility ROS Container"

From ESS-WIKI
Jump to: navigation, search
Line 23: Line 23:
 
</syntaxhighlight>
 
</syntaxhighlight>
 
[[File:ROS2 rviz.png|500px|ROS2 RViz]]<span style="color:#FF0000;">&nbsp;</span>
 
[[File:ROS2 rviz.png|500px|ROS2 RViz]]<span style="color:#FF0000;">&nbsp;</span>
 +
 +
'''Note'''<br>
 +
If you want to import a custom RViz2 layout configuration file, you can place the configuration file in '/usr/local/Advantech/ros/container/share/rviz2/default.rviz', then manually overwrite the configuration file inside the container.
 +
<syntaxhighlight lang="bash">
 +
$ docker exec -it util-ros2-humble bash
 +
$ cp /usr/local/Advantech/ros/container/share/rviz2/default.rviz /root/.rviz2/default.rviz
 +
</syntaxhighlight>
  
 
=== Launch RQT ===
 
=== Launch RQT ===
Line 38: Line 45:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
'''Step3: Launch rviz2'''
+
'''Step3: Launch rqt'''
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
$ rqt
 
$ rqt
Line 77: Line 84:
 
'''Step3: Launch Nav2'''<br>
 
'''Step3: Launch Nav2'''<br>
 
Please refer to [https://docs.nav2.org/tutorials/index.html ROS2-Navigation2] for usage instructions.
 
Please refer to [https://docs.nav2.org/tutorials/index.html ROS2-Navigation2] for usage instructions.
 +
 +
'''Note'''<br>
 +
If you want to import a custom Nav2 configuration file, you can place the configuration file in '/usr/local/Advantech/ros/container/share/nav2/nav2_params.yaml', then manually overwrite the configuration file inside the container.
 +
<syntaxhighlight lang="bash">
 +
$ docker exec -it util-ros2-humble bash
 +
$ cp nav2_params.yaml /opt/ros/humble/share/nav2_bringup/params/nav2_params.yaml
 +
</syntaxhighlight>
  
 
=== Launch MoveIt ===
 
=== Launch MoveIt ===

Revision as of 08:53, 13 December 2024

Utility ROS Container

The Utility ROS Container image integrates various commonly used tools and utilities for ROS2 users, including RViz2, RQT, Cartographer, Nav2, and MoveIt. This container enables users to quickly access and utilize these features.

How To

Launch RViz2

Step1: Launch the docker container of util-ros2-humble
If the container has been launched before, you can skip this step.

$ cd /usr/local/Advantech/ros/container/docker
$ ./launch.sh util-ros2-humble

Step2: Accessing the container

$ docker exec -it util-ros2-humble bash

Step3: Launch rviz2

$ rviz2

ROS2 RViz 

Note
If you want to import a custom RViz2 layout configuration file, you can place the configuration file in '/usr/local/Advantech/ros/container/share/rviz2/default.rviz', then manually overwrite the configuration file inside the container.

$ docker exec -it util-ros2-humble bash
$ cp /usr/local/Advantech/ros/container/share/rviz2/default.rviz /root/.rviz2/default.rviz

Launch RQT

Step1: Launch the docker container of util-ros2-humble
If the container has been launched before, you can skip this step.

$ cd /usr/local/Advantech/ros/container/docker
$ ./launch.sh util-ros2-humble

Step2: Accessing the container

$ docker exec -it util-ros2-humble bash

Step3: Launch rqt

$ rqt

ROS2 rqt graph

Launch Cartographer

Step1: Launch the docker container of util-ros2-humble
If the container has been launched before, you can skip this step.

$ cd /usr/local/Advantech/ros/container/docker
$ ./launch.sh util-ros2-humble

Step2: Accessing the container

$ docker exec -it util-ros2-humble bash

Step3: Launch Cartographer
Please refer to ROS2-Cartographer for usage instructions.

Launch Nav2

Step1: Launch the docker container of util-ros2-humble
If the container has been launched before, you can skip this step.

$ cd /usr/local/Advantech/ros/container/docker
$ ./launch.sh util-ros2-humble

Step2: Accessing the container

$ docker exec -it util-ros2-humble bash

Step3: Launch Nav2
Please refer to ROS2-Navigation2 for usage instructions.

Note
If you want to import a custom Nav2 configuration file, you can place the configuration file in '/usr/local/Advantech/ros/container/share/nav2/nav2_params.yaml', then manually overwrite the configuration file inside the container.

$ docker exec -it util-ros2-humble bash
$ cp nav2_params.yaml /opt/ros/humble/share/nav2_bringup/params/nav2_params.yaml

Launch MoveIt

Step1: Launch the docker container of util-ros2-humble
If the container has been launched before, you can skip this step.

$ cd /usr/local/Advantech/ros/container/docker
$ ./launch.sh util-ros2-humble

Step2: Accessing the container

$ docker exec -it util-ros2-humble bash

Step3: Launch MoveIt
Please refer to ROS2-MoveIt for usage instructions.

Note

When starting a GUI application inside a container, you might encounter rendering issues. A common cause is an incorrectly set DISPLAY environment variable for X11. There are the following methods to fix this:

1. Allow access to the user's X server from the local network.
Open a terminal to run the command.

$ xhost +local:

2. Set a specific DISPLAY environment variable in docker-compose.

$ vim /usr/local/Advantech/ros/container/docker/docker-compose/util-ros2-humble/docker-compose.yml

Then restart container

$ docker rm -f util-ros2-humble
$ cd /usr/local/Advantech/ros/container/docker
$ ./launch.sh util-ros2-humble

ROS2 Suite docker compose display setting