Skip to content

Commit

Permalink
Simulation is now working with Jazzy
Browse files Browse the repository at this point in the history
Signed-off-by: JesusSilvaUtrera <[email protected]>
  • Loading branch information
JesusSilvaUtrera committed Sep 2, 2024
1 parent 8dd31b9 commit 7dd1be6
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 31 deletions.
3 changes: 1 addition & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ Please remove the appropriate section.
For example, if this is a new feature, remove all sections except for the "New feature" section
If this is your first time opening a PR, be sure to check the contribution guide:
https://github.com/Ekumen-OS/andino_gz/blob/humble/CONTRIBUTING.md
https://github.com/Ekumen-OS/andino_gz/blob/jazzy/CONTRIBUTING.md
-->
<!-- TODO change links to jazzy when the branch on main repo is ready -->

# 🦟 Bug fix

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ Also, consider using looking at the translation entries under `andino_gz/config/
ros2 launch andino_gz slam_toolbox_online_async.launch.py
```

Configuration can be forwarded to the `slam_toolbox_node`. By default, the configuration parameters are obtained from [andino's configuration file](https://github.com/Ekumen-OS/andino/blob/humble/andino_slam/config/slam_toolbox_online_async.yaml). In case a custom file is wanted to be passed, simply use the launch file argument for indicating the path to a new file.
Configuration can be forwarded to the `slam_toolbox_node`. By default, the configuration parameters are obtained from [andino's configuration file](https://github.com/Ekumen-OS/andino/blob/jazzy/andino_slam/config/slam_toolbox_online_async.yaml). In case a custom file is wanted to be passed, simply use the launch file argument for indicating the path to a new file.

```
ros2 launch andino_gz slam_toolbox_online_async.launch.py slams_param_file:=<my_path>
Expand Down
19 changes: 4 additions & 15 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,8 @@ You can also try to set specific image and container names:
./docker/run.sh --use_nvidia -i my_fancy_image_name -c my_fancy_container_name
```

- Inside the container, install dependencies via `rosdep`:
With this, you can just source the workspace and start testing it out, as the dependencies and the workspace have been already installed during the building process:

```sh
rosdep install -i -y --rosdistro jazzy --from-paths src
```

Note that the repository is mounted into a workspace. That is convenient if you
are working in a single repository project. Note that for multi-repository
workspace you should use another tool like vcs-tool to control via a `.repos`
file the repositories in your workspace.

- To build:

```sh
colcon build
```
```sh
source ./install/setup.bash
```
6 changes: 2 additions & 4 deletions docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,13 @@ while [[ "$#" -gt 0 ]]; do
done

# Update the arguments to default values if needed.
OS_VERSION="focal"
OS_VERSION="noble"
IMAGE_NAME=${IMAGE_NAME:-ros2_jazzy_andino_gz}
DOCKERFILE_PATH=$SCRIPT_FOLDER_PATH/Dockerfile

USERID=$(id -u)
USER=$(whoami)
USER=ubuntu

sudo docker build -t $IMAGE_NAME \
--file $DOCKERFILE_PATH \
--build-arg USERID=$USERID \
--build-arg USER=$USER \
$CONTEXT_FOLDER_PATH
17 changes: 17 additions & 0 deletions docker/dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,23 @@ COPY docker/requirements.txt .
RUN apt-get update && apt-get install --no-install-recommends -y $(cat requirements.txt)
RUN rm requirements.txt

#####################################
# ROS2 dependencies built from source
#####################################

# Prepare worksapce for ros2 packages built in the container
RUN mkdir -p /home/$USER/ros_deps_ws/src
WORKDIR /home/$USER/ros_deps_ws/src
# Clone andino main repo
RUN git clone https://github.com/Ekumen-OS/andino.git -b jazzy
WORKDIR /home/$USER/ros_deps_ws
# Rosdep install
RUN . /opt/ros/jazzy/setup.sh && rosdep install -y -i --from-paths src
# Build
RUN . /opt/ros/jazzy/setup.sh && colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release
# Adds overlay to the bashrc
RUN echo "source /home/$USER/ros_deps_ws/install/setup.bash" >> /home/$USER/.bashrc

# Add the Gazebo repository and install Gazebo Harmonic
RUN sudo sh -c 'echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/pkgs-osrf-archive-keyring.gpg] http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" > /etc/apt/sources.list.d/gazebo-stable.list' && \
wget https://packages.osrfoundation.org/gazebo.gpg -O /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg && \
Expand Down
5 changes: 0 additions & 5 deletions docker/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@ openssh-server
python3
python3-pip
python3-setuptools
# TODO change this packages when jazzy debains are ready
ros-humble-andino-description
ros-humble-andino-slam
ros-humble-nav2-bringup
ros-humble-nav2-common
software-properties-common
sudo
tmux
Expand Down
10 changes: 6 additions & 4 deletions docker/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,18 +82,20 @@ done
IMAGE_NAME=${IMAGE_NAME:-ros2_jazzy_andino_gz}
CONTAINER_NAME=${CONTAINER_NAME:-ros2_jazzy_andino_gz_container}

USER=ubuntu

SSH_PATH=/home/$USER/.ssh
WORKSPACE_SRC_CONTAINER=/home/$(whoami)/ws/src/$REPOSITORY_FOLDER_NAME
WORKSPACE_ROOT_CONTAINER=/home/$(whoami)/ws
WORKSPACE_SRC_CONTAINER=/home/$USER/ws/src/$REPOSITORY_FOLDER_NAME
WORKSPACE_ROOT_CONTAINER=/home/$USER/ws
SSH_AUTH_SOCK_USER=$SSH_AUTH_SOCK

# Create cache folders to store colcon build files
mkdir -p ${REPOSITORY_FOLDER_PATH}/.build
mkdir -p ${REPOSITORY_FOLDER_PATH}/.install

# Transfer the ownership to the user
chown -R "$USER" ${REPOSITORY_FOLDER_PATH}/.build
chown -R "$USER" ${REPOSITORY_FOLDER_PATH}/.install
# chown -R "$USER" ${REPOSITORY_FOLDER_PATH}/.build
# chown -R "$USER" ${REPOSITORY_FOLDER_PATH}/.install

# Check if name container is already taken.
if sudo -g docker docker container ls -a | grep "${CONTAINER_NAME}$" -c &> /dev/null; then
Expand Down

0 comments on commit 7dd1be6

Please sign in to comment.