forked from Naoki-Hiraoka/rtmros_choreonoid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.kinetic
70 lines (62 loc) · 2.92 KB
/
Dockerfile.kinetic
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
####
FROM yoheikakiuchi/hrpsys:latest
SHELL ["/bin/bash", "-c"]
#### ros pkg
ENV MY_ROSWORKSPACE /catkin_ws
ENV CNOIDSIM_PARENT_SETUP /hrpsys_ws/devel/setup.bash
WORKDIR ${MY_ROSWORKSPACE}
RUN source ${CNOIDSIM_PARENT_SETUP} && \
wstool init src && \
wstool set -y -t src rtmros_tutorials https://github.com/start-jsk/rtmros_tutorials.git --git && \
wstool set -y -t src rtmros_common https://github.com/start-jsk/rtmros_common --git && \
wstool set -y -t src jsk_common https://github.com/jsk-ros-pkg/jsk_common.git --git && \
wstool set -y -t src pr2_navigation https://github.com/PR2/pr2_navigation.git --git && \
# (travis) wstool set -y -t src rtmros_choreonoid https://github.com/start-jsk/rtmros_choreonoid --git && \
wstool update -t src && \
git clone https://github.com/jsk-ros-pkg/jsk_robot.git src/jsk_robot && \
## why?
(cd src/jsk_robot; rm -rf README.md jsk_baxter_robot jsk_naoqi_robot jsk_robot doc jsk_fetch_robot jsk_pr2_robot) && \
## remove hrpsys_gazebo, hironx, hrpsys, opnehrp3 tutorials because it cause to install ros-indigo-hrpsys
(cd src/rtmros_tutorials; rm -rf hrpsys_gazebo_tutorials hironx_tutorial hrpsys_tutorials openhrp3_tutorials)
## for travis
COPY . src/rtmros_choreonoid
## should be solved ..., hrpsys-base, jsk_common, pr2_navigation ###
RUN source ${CNOIDSIM_PARENT_SETUP} && \
apt update -q -qq && \
apt install -q -qq -y ros-${ROS_DISTRO}-jsk-tilt-laser ros-${ROS_DISTRO}-jsk-recognition && \
(rosdep install -q -y -r --from-paths src --ignore-src || echo 'Ignore_rosdep_error') && \
apt clean && \
rm -rf /var/lib/apt/lists/
### build ros packages
WORKDIR ${MY_ROSWORKSPACE}
RUN /bin/bash -c "source ${CNOIDSIM_PARENT_SETUP} && catkin build hrpsys_choreonoid_tutorials jsk_robot_startup pr2_navigation_self_filter --no-status --no-notify -j 1 -p 1 && catkin clean -b -l -y"
### for run programs
RUN /bin/bash -c "source ${MY_ROSWORKSPACE}/devel/setup.bash && rosrun roseus generate-all-msg-srv.sh geometry_msgs sensor_msgs hrpsys_ros_bridge opencv_apps"
## ### create environment
## RUN echo -e '#!/bin/bash\n\
## set -e\n\
## source /my_entryrc\n\
## exec "$@"\n' >> /my_entrypoint.sh
## RUN chmod a+x /my_entrypoint.sh
## RUN echo -e '# setup ros environment\n\
## if [ -e "${DOCKER_ROS_SETUP}" ]; then\n\
## source "${DOCKER_ROS_SETUP}"\n\
## else\n\
## source "/opt/ros/$ROS_DISTRO/setup.bash"\n\
## fi\n\
## MY_IP=${DOCKER_ROS_IP:-$(hostname -i)}\n\
## if [ "$ROS_IP" == "" ]; then\n\
## export ROS_IP=${MY_IP}\n\
## fi\n\
## if [ "$ROS_HOSTNAME" == "" ]; then\n\
## export ROS_HOSTNAME=${MY_IP}\n\
## fi\n\
## if [ "${DOCKER_ROS_MASTER_URI}" != "" ]; then\n\
## export ROS_MASTER_URI=${DOCKER_ROS_MASTER_URI}\n\
## fi\n\
## export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64\n\
## export PATH=$PATH:/usr/local/cuda/bin\n' >> /my_entryrc
## #ADD ./my_entrypoint.sh /
## #ADD ./my_entryrc /
## ENTRYPOINT ["/my_entrypoint.sh"]
## CMD ["bash"]