-
Notifications
You must be signed in to change notification settings - Fork 11
/
Dockerfile-acquisition-x86
67 lines (55 loc) · 2.55 KB
/
Dockerfile-acquisition-x86
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
FROM ros:kinetic-ros-core
MAINTAINER Aleksandar Petrov <[email protected]>
# YOU ALWAYS NEED TO SPECIFY:
# ACQ_ROS_MASTER_URI_DEVICE
# ACQ_ROS_MASTER_URI_DEVICE_IP
# ACQ_ROS_MASTER_URI_SERVER
# ACQ_ROS_MASTER_URI_SERVER_IP
# ACQ_DEVICE_NAME # should match the topic, e.g. watchtower10
# OPTIONALLY YOU CAN ALSO SPECIFY + DEFAULT VALUES
ENV ACQ_ROS_MASTER_URI_DEVICE_PORT 11311
ENV ACQ_ROS_MASTER_URI_SERVER_PORT 11311
ENV ACQ_POSES_UPDATE_RATE 10
ENV ACQ_ODOMETRY_UPDATE_RATE 30
ENV ACQ_STATIONARY_ODOMETRY 0
ENV ACQ_TOPIC_RAW camera_node/image/compressed
ENV ACQ_TOPIC_CAMERAINFO camera_node/camera_info
# ENV ACQ_TOPIC_VELOCITY_TO_POSE velocity_to_pose_node/pose
ENV ACQ_TAG_SIZE 0.065
ENV ACQ_POSES_TOPIC poses
ENV ACQ_ODOMETRY_TOPIC odometry
ENV ACQ_TEST_STREAM 1
ENV ACQ_BEAUTIFY 1
# Argumens for where the different places from which we will get files from are
ARG apriltag_dir=lib-cslam/src/apriltag
ARG acquisition_src_dir=ros-cslam/src
ARG algo_dir=lib-cslam/src/duckietown_cslam/algo
# Create a directory to store the Python files and the April tag library
RUN mkdir /acquisition_node
# Install OpenCV and CvBridge
RUN apt update
RUN apt install -y python-opencv
RUN apt install -y ros-kinetic-cv-bridge
RUN apt install -y ros-kinetic-rospy
# Copy and install the April tag library and configure the environment variables for it
RUN mkdir /acquisition_node/apriltag
COPY ${apriltag_dir} /acquisition_node/apriltag
RUN cd /acquisition_node/apriltag ; mkdir build ; cd build ; cmake .. -DCMAKE_BUILD_TYPE=Release ; make -j4
ENV ACQ_APRILTAG_LIB /acquisition_node/apriltag/python
ENV ACQ_APRILTAG_SO /acquisition_node/apriltag/build/lib
# Setup the duckietown_msgs
RUN mkdir -p /catkin-ws/src
RUN /bin/bash -c "source /opt/ros/kinetic/setup.bash; cd /catkin-ws/; catkin_make"
COPY ${acquisition_src_dir}/duckietown_msgs /catkin-ws/src/duckietown_msgs
RUN /bin/bash -c "source /catkin-ws/devel/setup.bash; cd /catkin-ws/; catkin_make"
# Copy the Python files
COPY ${acquisition_src_dir}/acquisition_node/acquisitionProcessor.py /acquisition_node
COPY ${algo_dir}/image_rectifier.py /acquisition_node
COPY ${algo_dir}/aprilTagProcessor.py /acquisition_node
COPY ${acquisition_src_dir}/acquisition_node/serverSidePublisher.py /acquisition_node
COPY ${acquisition_src_dir}/acquisition_node/acquire_and_publish.py /acquisition_node
# Copy the bash wrapper
COPY ${acquisition_src_dir}/acquisition_node/wrapper.sh /acquisition_node
RUN chmod +x /acquisition_node/*.sh
# Start the processes
CMD /bin/bash -c "cd /acquisition_node; source /catkin-ws/devel/setup.bash; /acquisition_node/wrapper.sh"