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

add docker and make file #166

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
56 changes: 56 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Use the official ROS Melodic base image
FROM ros:melodic

# Set the working directory
WORKDIR /workspace

# Install additional dependencies if needed
# For example, you can uncomment the line below to install a package
# Install additional dependencies
RUN apt-get update \
&& apt-get -y --quiet --no-install-recommends install \
gcc \
git \
libxml2-dev \
libxslt-dev \
libarmadillo-dev \
ros-melodic-nlopt \
python3 \
python3-pip \
libeigen3-dev\
libpcl-dev \
ros-melodic-pcl-conversions \
libopencv-dev \
ros-melodic-cv-bridge \
ros-melodic-tf\
ros-melodic-interactive-markers\
ros-melodic-image-geometry\
ros-melodic-pcl-ros \
ros-melodic-geometry-msgs \
ros-melodic-laser-geometry \
ros-melodic-rviz

RUN pip3 install setuptools

RUN pip3 install catkin-tools
# Copy your ROS packages into the workspace
COPY . /workspace/src/

WORKDIR /workspace


# Set environment variables
ENV ROS_DISTRO melodic
ENV ROS_VERSION 1
# RUN catkin build
RUN . /opt/ros/melodic/setup.sh && catkin_make


# Source the ROS setup file
RUN echo "source /workspace/devel/setup.bash" >> ~/.bashrc

# Expose ROS master port
EXPOSE 11311

# Set entry point to start ROS
CMD ["roscore"]
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Build docker project
.PHONY : docker_build
docker_build:
docker build -t fastplanner .

# Run docker project
.PHONY : docker_run
docker_run:
docker run -it --network host --entrypoint /bin/bash fastplanner