moved hokuyo to another container
This commit is contained in:
parent
c26ea1b9dc
commit
18ee097492
1
99-hokuyo.rules
Normal file
1
99-hokuyo.rules
Normal file
@ -0,0 +1 @@
|
||||
SUBSYSTEM=="tty", ATTRS{idVendor}=="15d1", ATTRS{idProduct}=="0000", SYMLINK+="hokuyo"
|
@ -21,6 +21,4 @@ echo
|
||||
echo
|
||||
|
||||
set -x
|
||||
rosrun rosaria RosAria _port:=$ARIA_PORT _tf_prefix:=${ROS_NAMESPACE} &
|
||||
rosrun hokuyo_node hokuyo_node _frame_id:="PIONIER${PIONIER_ID}/laser" &
|
||||
rosrun tf static_transform_publisher 0.16 0 0 0 0 0 ${ROS_NAMESPACE}/base_link "${ROS_NAMESPACE}/laser" 100
|
||||
rosrun rosaria RosAria _port:=$ARIA_PORT _tf_prefix:=${ROS_NAMESPACE}
|
12
hokuyo/Dockerfile
Normal file
12
hokuyo/Dockerfile
Normal file
@ -0,0 +1,12 @@
|
||||
FROM ros:noetic-ros-core
|
||||
|
||||
RUN apt-get update -y && apt-get install -y ros-noetic-urg-node \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
SHELL ["/bin/bash", "--login", "-c"]
|
||||
|
||||
RUN source /opt/ros/noetic/setup.bash && \
|
||||
echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc
|
||||
ENV ROS_MASTER_URI=http://10.104.16.29:11311/
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
6
hokuyo/entrypoint.sh
Executable file
6
hokuyo/entrypoint.sh
Executable file
@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
source /opt/ros/noetic/setup.bash
|
||||
set -x
|
||||
rosrun urg_node urg_node _frame_id:="PIONIER${PIONIER_ID}/laser" _serial_port:="/dev/hokuyo" scan:=PIONIER${PIONIER_ID}/scan &
|
||||
rosrun tf static_transform_publisher 0.149 0 0.269 0 0 0 PIONIER${PIONIER_ID}/base_link PIONIER${PIONIER_ID}/laser 100
|
@ -9,16 +9,20 @@ cd radio-lap
|
||||
docker build . -t decawave
|
||||
cd ..
|
||||
|
||||
cd hokuyo
|
||||
docker build . -t hokuyo
|
||||
cd ..
|
||||
|
||||
cd Legacy
|
||||
docker build . -t irth7/rosaria-legacy
|
||||
cd ..
|
||||
|
||||
cp 99-decawave.rules /etc/udev/rules.d/
|
||||
cp 99-hokuyo.rules /etc/udev/rules.d/
|
||||
|
||||
cp rosaria-docker.service /etc/systemd/system/
|
||||
chmod g+w /etc/systemd/system/rosaria-docker.service
|
||||
|
||||
git submodule init
|
||||
git submodule update
|
||||
systemctl daemon-reload
|
||||
systemctl enable rosaria-docker.service
|
||||
systemctl start rosaria-docker.service
|
||||
|
@ -3,4 +3,5 @@
|
||||
source /opt/ros/noetic/setup.bash
|
||||
source /ws/devel/setup.bash
|
||||
set -x
|
||||
roslaunch ros_decawave decawave_driver.launch pionier_id:=${PIONIER_ID}
|
||||
roslaunch ros_decawave decawave_driver.launch pionier_id:=${PIONIER_ID} &
|
||||
rosrun tf static_transform_publisher 0 0 0.2 0 0 0 /PIONIER${PIONIER_ID}/base_link /PIONIER${PIONIER_ID}/tag 100
|
@ -2,7 +2,9 @@
|
||||
After=network.service
|
||||
|
||||
[Service]
|
||||
RemainAfterExit=true
|
||||
ExecStart=/home/lab1_5/rosaria/run.sh
|
||||
ExecStop=/home/lab1_5/rosaria/stop.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
|
11
run.sh
11
run.sh
@ -2,10 +2,15 @@
|
||||
# Script running rosaria inside docker container
|
||||
echo "ID: $PIONIER_ID"
|
||||
|
||||
docker run -d --privileged --network=host --device=/dev/ttyS0 -i -e ROS_IP=$(hostname -I | awk '{print $1}') -e PIONIER_ID=$(hostname | sed 's/[^0-9]//g'
|
||||
) --mount type=bind,source=/home/lab1_5/rosaria/Legacy/ws_linux,target=/home/lab1_5/ws/ws_linux irth7/rosaria-legacy
|
||||
docker run --network=host --device=/dev/ttyS0 -i -e ROS_IP=$(hostname -I | awk '{print $1}') -e PIONIER_ID=$(hostname | sed 's/[^0-9]//g'
|
||||
) --mount type=bind,source=/home/lab1_5/rosaria/Legacy/ws_linux,target=/home/lab1_5/ws/ws_linux irth7/rosaria-legacy &
|
||||
|
||||
if [ -e "/dev/decawave" ]; then
|
||||
echo "found tag"
|
||||
docker run --network=host --device=/dev/decawave -e PIONIER_ID=$(hostname | sed 's/[^0-9]//g') decawave
|
||||
docker run --network=host --device=/dev/decawave -e PIONIER_ID=$(hostname | sed 's/[^0-9]//g') decawave &
|
||||
fi
|
||||
|
||||
if [ -e "/dev/hokuyo" ]; then
|
||||
echo "found lidar"
|
||||
docker run --network=host --device=/dev/hokuyo -e PIONIER_ID=$(hostname | sed 's/[^0-9]//g') hokuyo &
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user