Skip to content

Commit d9ac402

Browse files
authored
Merge pull request #6 from husarion/update-readme
simplify README
2 parents 5ffe4e8 + 6362042 commit d9ac402

File tree

3 files changed

+26
-8
lines changed

3 files changed

+26
-8
lines changed

README.md

+13-5
Original file line numberDiff line numberDiff line change
@@ -25,24 +25,32 @@ xhost local:docker
2525

2626
### Running docker image
2727

28+
Select the ROSbot:
29+
```bash
30+
export ROBOT_NAME=rosbot # or rosbot_xl
31+
```
32+
33+
Without GPU:
2834
```bash
2935
docker run --rm -it \
3036
-v /tmp/.X11-unix:/tmp/.X11-unix:rw \
3137
-e DISPLAY -e LIBGL_ALWAYS_SOFTWARE=1 \
3238
-e DDS_CONFIG=DEFAULT -e RMW_IMPLEMENTATION=rmw_fastrtps_cpp \
3339
husarion/webots:humble \
34-
ros2 launch webots_ros2_husarion rosbot_launch.py
40+
ros2 launch webots_ros2_husarion ${ROBOT_NAME}_launch.py
3541
```
3642

37-
If you want to use ROSbot XL change the launch file to `rosbot_xl_launch.py`
38-
43+
With GPU:
3944
```bash
4045
docker run --rm -it \
46+
--runtime=nvidia \
4147
-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 \
4351
-e DDS_CONFIG=DEFAULT -e RMW_IMPLEMENTATION=rmw_fastrtps_cpp \
4452
husarion/webots:humble \
45-
ros2 launch webots_ros2_husarion rosbot_xl_launch.py
53+
ros2 launch webots_ros2_husarion ${ROBOT_NAME}_launch.py
4654
```
4755

4856
![ROSbot XL in webots simulator](.docs/rosbot_xl.png)

demo/README.md

+12-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ If you want to use ROSbot 2R replace [the launchfile](https://github.com/husario
44

55
## Run with `docker compose`
66

7+
Select the ROSbot:
8+
```bash
9+
export ROBOT_NAME=rosbot # or rosbot_xl
10+
```
11+
712
To start simulation build and run webots simulator container type:
813

914
```bash
@@ -18,9 +23,14 @@ Wait until this messages show up in the Webots console.
1823
>
1924
> INFO: 'Ros2Supervisor' extern controller: connected.
2025
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:
2227

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:
2434

2535
```bash
2636
docker exec -it rviz bash

demo/compose.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ services:
3232
- /tmp/.X11-unix:/tmp/.X11-unix:rw
3333
- /dev/dri:/dev/dri
3434
command: >
35-
ros2 launch webots_ros2_husarion rosbot_xl_launch.py
35+
ros2 launch webots_ros2_husarion ${ROBOT_NAME:-rosbot_xl}_launch.py

0 commit comments

Comments
 (0)