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

NASA Challenge_[franklinselva]_[Restructure the contents of demos to be modular and scalable] #31

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
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
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,8 @@ Submissions to this repo should include:
- - See example here: https://github.com/space-ros/docker/blob/main/space_robots/run.sh

Please refer to the [dockerfile repo](https://github.com/space-ros/docker/tree/main/space_robots) for instructions on running the existing demos

## Demos

1. [Canadarm2](canadarm2/README.md)
2. [Curiosity Rover](curiosity_rover/README.md)
28 changes: 0 additions & 28 deletions canadarm/README.md

This file was deleted.

109 changes: 0 additions & 109 deletions canadarm/launch/canadarm.launch.py

This file was deleted.

51 changes: 0 additions & 51 deletions canadarm/nodes/hello_moveit.cpp

This file was deleted.

76 changes: 0 additions & 76 deletions canadarm/nodes/move_arm

This file was deleted.

7 changes: 7 additions & 0 deletions canadarm2/.defaults.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"build":
{
"symlink-install": true,
"cmake_args": "-DCMAKE_BUILD_TYPE=Release -Wno-dev",
},
}
3 changes: 3 additions & 0 deletions canadarm2/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
build/
install/
log/
26 changes: 26 additions & 0 deletions canadarm2/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM osrf/space-ros:latest

ENV RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
ENV ROS_DISTRO=humble
ENV HOME=/home/spaceros-user

# Install dependencies
# Related to space-ros/space-ros#195 and space-ros/space-ros#196
RUN sudo apt update && sudo apt install -y ros-${ROS_DISTRO}-control-msgs \
ros-${ROS_DISTRO}-rmw-cyclonedds-cpp

# Prepare the workspace
SHELL ["bash", "-c"]
RUN mkdir -p ${HOME}/canadarm_ws/src
WORKDIR ${HOME}/canadarm_ws

COPY ./canadarm_demo src/canadarm_demo
COPY .defaults.yaml .defaults.yaml

# Build the workspace
RUN source /opt/ros/${ROS_DISTRO}/setup.bash \
&& source $HOME/spaceros/install/setup.bash \
&& colcon build

# Source the workspace
RUN echo "source ${HOME}/canadarm_ws/install/setup.bash" >> ${HOME}/.bashrc
76 changes: 76 additions & 0 deletions canadarm2/Dockerfile.GUI
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
FROM ros:humble-ros-core-jammy

ARG DEBIAN_FRONTEND=noninteractive

ENV RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
ENV ROS_DISTRO=humble
ENV USERNAME=spaceros-user
ENV HOME=/home/spaceros-user
ENV IGNITION_VERSION=fortress
ENV GZ_VERSION=fortress

# Install dependencies
RUN apt update && apt install -y ros-${ROS_DISTRO}-rmw-cyclonedds-cpp \
wget \
curl \
&& apt clean \
&& rm -rf /var/lib/apt/lists/*

RUN wget https://packages.osrfoundation.org/gazebo.gpg -O /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg\
&& echo "deb [arch=amd64 signed-by=/usr/share/keyrings/pkgs-osrf-archive-keyring.gpg] http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" | tee /etc/apt/sources.list.d/gazebo-stable.list > /dev/null

# Install Gazebo
RUN apt-get update -qq \
&& apt-get install -y \
gz-${GZ_VERSION} \
libgz-sim7 \
libgz-transport12 \
libgz-gui7 \
build-essential\
ros-${ROS_DISTRO}-rcl-interfaces\
ros-${ROS_DISTRO}-rclcpp\
ros-${ROS_DISTRO}-builtin-interfaces\
ros-${ROS_DISTRO}-ros-gz\
ros-${ROS_DISTRO}-sdformat-urdf\
ros-${ROS_DISTRO}-vision-msgs\
ros-${ROS_DISTRO}-actuator-msgs\
ros-${ROS_DISTRO}-image-transport\
ros-${ROS_DISTRO}-xacro\
&& rm -rf /var/lib/apt/lists/*


# Install Rviz2
RUN apt-get update -qq \
&& apt-get install -y \
ros-${ROS_DISTRO}-rviz2 \
ros-${ROS_DISTRO}-moveit-ros-visualization \
ros-${ROS_DISTRO}-nav2-rviz-plugins \
&& rm -rf /var/lib/apt/lists/*

# Demo package
RUN mkdir -p ${HOME}/canadarm2_ws/src
WORKDIR ${HOME}/canadarm2_ws/src
COPY ./canadarm_description ./canadarm_description
COPY ./canadarm_gazebo ./canadarm_gazebo
COPY .defaults.yaml ${HOME}/canadarm2_ws/.defaults.yaml

RUN apt update \
&& apt install -y python3-rosdep python3-colcon-common-extensions \
&& apt clean \
&& rm -rf /var/lib/apt/lists/* \
&& rosdep init \
&& rosdep update

RUN . /opt/ros/humble/setup.sh \
&& cd ${HOME}/canadarm2_ws \
&& apt update \
&& rosdep install --from-paths src --ignore-src -r -y \
&& colcon build

WORKDIR ${HOME}/canadarm2_ws

RUN apt update && apt install -y ros-humble-ros-ign-gazebo
RUN echo "source /opt/ros/humble/setup.bash" >> ${HOME}/.bashrc
RUN echo "source ${HOME}/canadarm2_ws/install/setup.bash" >> ${HOME}/.bashrc

CMD ign gazebo
Loading
Loading