Skip to content

Commit

Permalink
Complete jackal example running on Docker container
Browse files Browse the repository at this point in the history
  • Loading branch information
mmattamala committed Mar 25, 2024
1 parent 38b617d commit 7845d7f
Show file tree
Hide file tree
Showing 14 changed files with 1,143 additions and 22 deletions.
4 changes: 2 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ ARG DEBIAN_FRONTEND=dialog
# Run bash
# ==
CMD ["/bin/bash"]
WORKDIR /root
WORKDIR /root/catkin_ws


###############################################################
Expand All @@ -109,7 +109,7 @@ FROM base as dev

ENV DEBIAN_FRONTEND=noninteractive

RUN mkdir -p catkin_ws/src \
RUN mkdir -p /root/catkin_ws/src \
&& source /opt/ros/noetic/setup.bash \
&& source "/root/.bashrc" \
&& cd /root/catkin_ws && catkin build \
Expand Down
54 changes: 47 additions & 7 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
# Docker files
# Jackal Simulation Demo

## Build and run containers
We provide an example package to demonstrate Wild Visual Navigation on a simulated environment with a Clearpath Jackal robot.

This example should be self-contained and it should run on a Docker container. This was tested on Ubuntu machines, we do not expect the GUI to run on Windows or Mac computers (due to X11 support).


## Build the image

To build the container:

```sh
docker compose -f docker-compose.yaml build
docker compose -f docker-compose-gui-nvidia.yaml build
```

## Run the container

To run the container (terminal-based):

```sh
docker compose -f docker-compose.yaml up -d
docker compose -f docker-compose-gui-nvidia.yaml up -d
```

To launch bash on the container:
Expand All @@ -20,15 +27,48 @@ To launch bash on the container:
docker compose exec wvn bash
```

## Stop the container

To stop the container:

```sh
docker compose -f docker-compose.yaml stop
```

To run the GUI-enabled version and check the Gazebo environment:
## Running Wild Visual Navigation

You can either run the following commands in 4 terminals that initialize a bash terminal in the container, or you can use VS Code with the Docker extension to instantiate terminal in the container directly.

### Launch Jackal sim

```sh
roslaunch wild_visual_navigation_jackal sim.launch
```

### Launch WVN

```sh
roslaunch wild_visual_navigation_jackal wild_visual_navigation.launch
```

### Launch Teleop node

```sh
roslaunch wild_visual_navigation_jackal teleop.launch
```

### Launch RViz window

```sh
roslaunch wild_visual_navigation_jackal view.launch
```


## Troubleshooting

If the GUI doesn't work, you might need to allow the X Server to connect before running the container:

```sh
docker compose -f docker-compose-gui.yaml up -d
docker compose exec wvn_gui bash
xhost +Local:*
xhost
```
8 changes: 7 additions & 1 deletion wild_visual_navigation_jackal/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,10 @@ catkin_package(
message(${CATKIN_PACKAGE_SHARE_DESTINATION})
install(DIRECTORY launch Media worlds
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
)

############
## Python ##
############
catkin_install_python(PROGRAMS scripts/jackal_state_converter_node.py
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
Loading

0 comments on commit 7845d7f

Please sign in to comment.