Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simplify README #6

Merged
merged 3 commits into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,32 @@ xhost local:docker

### Running docker image

Select the ROSbot:
```bash
export ROBOT_NAME=rosbot # or rosbot_xl
```

Without GPU:
```bash
docker run --rm -it \
-v /tmp/.X11-unix:/tmp/.X11-unix:rw \
-e DISPLAY -e LIBGL_ALWAYS_SOFTWARE=1 \
-e DDS_CONFIG=DEFAULT -e RMW_IMPLEMENTATION=rmw_fastrtps_cpp \
husarion/webots:humble \
ros2 launch webots_ros2_husarion rosbot_launch.py
ros2 launch webots_ros2_husarion ${ROBOT_NAME}_launch.py
```

If you want to use ROSbot XL change the launch file to `rosbot_xl_launch.py`

With GPU:
```bash
docker run --rm -it \
--runtime=nvidia \
-v /tmp/.X11-unix:/tmp/.X11-unix:rw \
-e DISPLAY -e LIBGL_ALWAYS_SOFTWARE=1 \
-e NVIDIA_VISIBLE_DEVICES=all \
-e NVIDIA_DRIVER_CAPABILITIES=all \
-e DISPLAY \
-e DDS_CONFIG=DEFAULT -e RMW_IMPLEMENTATION=rmw_fastrtps_cpp \
husarion/webots:humble \
ros2 launch webots_ros2_husarion rosbot_xl_launch.py
ros2 launch webots_ros2_husarion ${ROBOT_NAME}_launch.py
```

![ROSbot XL in webots simulator](.docs/rosbot_xl.png)
Expand Down
14 changes: 12 additions & 2 deletions demo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ If you want to use ROSbot 2R replace [the launchfile](https://github.com/husario

## Run with `docker compose`

Select the ROSbot:
```bash
export ROBOT_NAME=rosbot # or rosbot_xl
```

To start simulation build and run webots simulator container type:

```bash
Expand All @@ -18,9 +23,14 @@ Wait until this messages show up in the Webots console.
>
> INFO: 'Ros2Supervisor' extern controller: connected.

Now you can use `teleop_twist` tool to drive ROSbot with keyboard.
For visualization the ROSbots sensors run RViz2 in the another terminal:

Enter `rviz` container:
```bash
docker compose -f compose.rviz.yaml up
```

Now you can use `teleop_twist` tool to drive ROSbot with keyboard.
Enter `rviz` container in the new terminal:

```bash
docker exec -it rviz bash
Expand Down
2 changes: 1 addition & 1 deletion demo/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ services:
- /tmp/.X11-unix:/tmp/.X11-unix:rw
- /dev/dri:/dev/dri
command: >
ros2 launch webots_ros2_husarion rosbot_xl_launch.py
ros2 launch webots_ros2_husarion ${ROBOT_NAME:-rosbot_xl}_launch.py
Loading