diff --git a/Dockerfile b/Dockerfile index bf5117cc7f1632bb36ccbbfea782a580db493181..4c7d2d60d03f251a7172a9fc415a0e4e3f3ffd58 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ RUN apt update; apt install -y vim tmux git sudo stow RUN adduser user --home /home/user RUN echo 'root:root'|chpasswd RUN echo 'user:user'|chpasswd -RUN echo "user ALL=(ALL:ALL) ALL" >> /etc/sudoers +RUN echo "user ALL=(ALL:ALL) NOPASSWD:ALL" >> /etc/sudoers #RUN echo "source /opt/ros/melodic/setup.bash" >> /home/user/.bashrc # covenience, this entire block can be removed without affecting the functionality USER user @@ -30,5 +30,8 @@ WORKDIR /home/user/catkin_ws/src WORKDIR /home/user/catkin_ws USER root #RUN chmod u+x /home/user/catkin_ws/scripts/* && chown user: /home/user/catkin_ws/scripts/* +COPY ./scripts/all.sh /home/user/entrypoint.sh +RUN chmod +x /home/user/entrypoint.sh USER user +CMD ["/bin/bash", "/home/user/entrypoint.sh"] diff --git a/Makefile b/Makefile index 134f5de6c997e60e5295f95f51484f0472aa6dea..2e68a81a6d9449d3f5401343d5cfff615d0a5fb9 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,10 @@ build: docker build -t container . run: echo running:|figlet - docker run -e DISPLAY=${DISPLAY} -v /tmp/.X11-unix:/tmp/.X11-unix \ + docker run \ + --rm \ + -e DISPLAY=${DISPLAY} \ + -v /tmp/.X11-unix:/tmp/.X11-unix \ -v $(shell readlink -e ./manipulability_metrics):/home/user/catkin_ws/src \ -v $(shell readlink -e ./scripts):/home/user/catkin_ws/scripts \ -it container diff --git a/scripts/all.sh b/scripts/all.sh index eb24821326303ec16efce0350a298971563efaf8..0021ce56fbe6363db158dc9dad294733085260d4 100644 --- a/scripts/all.sh +++ b/scripts/all.sh @@ -1,2 +1,12 @@ -. ./scripts/prepare.sh -. ./scripts/start.sh +## prepare +# install dependencies +rosdep update +rosdep install --from-paths src --ignore-src -r -y + +# make and setup +catkin_make +source devel/setup.bash + +## start +# run launch file from example +roslaunch manipulability_metrics_examples panda_manipulability_demo.launch