git clone https://github.com/splionar/rh4.git
cd rh4
dts devel build -f --arch arm32v7 -H MY_ROBOT.local
docker -H MY_ROBOT.local run -it -e mode=avoid --rm -v /data:/data --net=host duckietown/rh4:v1-arm32v7
docker -H MY_ROBOT.local run -it -e mode=attract --rm -v /data:/data --net=host duckietown/rh4:v1-arm32v7
docker -H MY_ROBOT.local run -it -e mode=mixed --rm -v /data:/data --net=host duckietown/rh4:v1-arm32v7
Note: If duckiebot does not stop after shutting down (happens approximately 1 out of 20 times), run step 3 and step 4 again.
1. Build a docker image on top of duckietown/dt-duckiebot-interface:daffy-arm32v7 and run the following command
As I already built the required image before (splionar/colordetector), I used it for this task. You can also use the same image.
docker -H MY_ROBOT.local run -it -e ROS_MASTER_URI=http://[MY_ROBOT_IP]:11311/ -e ROS_IP=http://[MY_LAPTOP_IP]:11311/ splionar/colordetector /bin/bash
If splionar/colordetector image is not installed in your local machine, the command above should automatically look for the image in DockerHub repository and pull it first. Alternatively, you can pull the image first by running: docker pull splionar/colordetector
, then execute the command above.
rosservice call /HOSTNAME/led_emitter_node/set_pattern "pattern_name: {data: RED}"
rosservice call /HOSTNAME/led_emitter_node/set_pattern "pattern_name: {data: GREEN}"
More details: http://rosapi.duckietown.p-petrov.com/repositories/dt-duckiebot-interface/docs/source/packages/led_emitter.html#ledemitternode