File tree 3 files changed +26
-8
lines changed
3 files changed +26
-8
lines changed Original file line number Diff line number Diff line change @@ -25,24 +25,32 @@ xhost local:docker
25
25
26
26
### Running docker image
27
27
28
+ Select the ROSbot:
29
+ ``` bash
30
+ export ROBOT_NAME=rosbot # or rosbot_xl
31
+ ```
32
+
33
+ Without GPU:
28
34
``` bash
29
35
docker run --rm -it \
30
36
-v /tmp/.X11-unix:/tmp/.X11-unix:rw \
31
37
-e DISPLAY -e LIBGL_ALWAYS_SOFTWARE=1 \
32
38
-e DDS_CONFIG=DEFAULT -e RMW_IMPLEMENTATION=rmw_fastrtps_cpp \
33
39
husarion/webots:humble \
34
- ros2 launch webots_ros2_husarion rosbot_launch .py
40
+ ros2 launch webots_ros2_husarion ${ROBOT_NAME} _launch .py
35
41
```
36
42
37
- If you want to use ROSbot XL change the launch file to ` rosbot_xl_launch.py `
38
-
43
+ With GPU:
39
44
``` bash
40
45
docker run --rm -it \
46
+ --runtime=nvidia \
41
47
-v /tmp/.X11-unix:/tmp/.X11-unix:rw \
42
- -e DISPLAY -e LIBGL_ALWAYS_SOFTWARE=1 \
48
+ -e NVIDIA_VISIBLE_DEVICES=all \
49
+ -e NVIDIA_DRIVER_CAPABILITIES=all \
50
+ -e DISPLAY \
43
51
-e DDS_CONFIG=DEFAULT -e RMW_IMPLEMENTATION=rmw_fastrtps_cpp \
44
52
husarion/webots:humble \
45
- ros2 launch webots_ros2_husarion rosbot_xl_launch .py
53
+ ros2 launch webots_ros2_husarion ${ROBOT_NAME} _launch .py
46
54
```
47
55
48
56
![ ROSbot XL in webots simulator] ( .docs/rosbot_xl.png )
Original file line number Diff line number Diff line change @@ -4,6 +4,11 @@ If you want to use ROSbot 2R replace [the launchfile](https://github.com/husario
4
4
5
5
## Run with ` docker compose `
6
6
7
+ Select the ROSbot:
8
+ ``` bash
9
+ export ROBOT_NAME=rosbot # or rosbot_xl
10
+ ```
11
+
7
12
To start simulation build and run webots simulator container type:
8
13
9
14
``` bash
@@ -18,9 +23,14 @@ Wait until this messages show up in the Webots console.
18
23
>
19
24
> INFO: 'Ros2Supervisor' extern controller: connected.
20
25
21
- Now you can use ` teleop_twist ` tool to drive ROSbot with keyboard.
26
+ For visualization the ROSbots sensors run RViz2 in the another terminal:
22
27
23
- Enter ` rviz ` container:
28
+ ``` bash
29
+ docker compose -f compose.rviz.yaml up
30
+ ```
31
+
32
+ Now you can use ` teleop_twist ` tool to drive ROSbot with keyboard.
33
+ Enter ` rviz ` container in the new terminal:
24
34
25
35
``` bash
26
36
docker exec -it rviz bash
Original file line number Diff line number Diff line change @@ -32,4 +32,4 @@ services:
32
32
- /tmp/.X11-unix:/tmp/.X11-unix:rw
33
33
- /dev/dri:/dev/dri
34
34
command : >
35
- ros2 launch webots_ros2_husarion rosbot_xl_launch .py
35
+ ros2 launch webots_ros2_husarion ${ROBOT_NAME:-rosbot_xl}_launch .py
You can’t perform that action at this time.
0 commit comments