DB21
DB21M
DB21
,DB21M
start_gui_tools
, ROS tools and no-vnc
DB17
DB18
DB19
Modified 2019-05-08 by Gianmarco
This is the description of lane following demo.
Wheels calibration completed.
Camera calibration completed.
Joystick demo has been successfully launched.
Modified 2019-05-08 by Gianmarco
Modified 2019-04-02 by gibernas
Assumption about Duckietown:
Modified 2019-04-09 by gibernas
Modified 2019-04-09 by gibernas
Modified 2018-06-22 by Andrea Censi
Modified 2020-07-28 by frank-qcd-qk
Running this demo requires almost all of the main Duckietown ROS nodes to be up and running. As these span 3 Docker images (dt-duckiebot-interface
, dt-car-interface
, and dt-core
). The dt-duckiebot-interface
and dt-car-interface
container typically starts with robot startup. You will need to start dt-core
manually.
First, check to make sure that dt-duckiebot-interface
and dt-car-interface
are running on your duckiebot via portainer, if not, do:
laptop $ dts duckiebot demo --demo_name duckiebot-interface --duckiebot_name DUCKIEBOT_NAME --package_name duckiebot_interface --image duckietown/dt-duckiebot-interface:daffy-arm32v7
laptop $ dts duckiebot demo --demo_name car-interface --duckiebot_name DUCKIEBOT_NAME --package_name car_interface --image duckietown/dt-car-interface:daffy-arm32v7
Then, we are ready to start the high-level pipeline for lane following:
laptop $ dts duckiebot demo --demo_name lane_following --duckiebot_name DUCKIEBOT_NAME --package_name duckietown_demos
You have to wait a while for everything to start working. While you wait, you can check in Portainer if all the containers started successfully and in their logs for any possible issues.
Modified 2020-07-28 by frank-qcd-qk
If you have a joystick you can skip this next command, otherwise we need to run the keyboard controller:
laptop $ dts duckiebot keyboard_control DUCKIEBOT_NAME
Controls | Joystick | Keyboard |
---|---|---|
Start Lane Following | R1 | a |
Stop Lane Following | L1 | s |
Start the lane following. The Duckiebot should drive autonomously in the lane. Intersections and red lines are neglected and the Duckiebot will drive across them like it is a normal lane. You can regain control of the bot at any moment by stopping the lane following and using the (virtual) joystick. Resuming the demo is as easy as pressing the corresponding start button.
Et voilà! We are ready to drive around autonomously.
Modified 2020-07-28 by frank-qcd-qk
This step is not neccessary but provides a nice visualization of the line segments that the Duckiebot detects.
For that, we need to make lane_filter_node
publish all the image topics. To do that, you can use start_gui_tools
to get a shell that is connected to the ROS system.
laptop $ dts start_gui_tools DUCKIEBOT_NAME
Then, set the ROS parameter verbose
to true
:
container $ rosparam set /DUCKIEBOT_NAME/line_detector_node/verbose true
so that line_detector_node
will publish the image_with_lines.
For this part, you can also use no-vnc, or directly use any container that can communicate with the ROS system.
Now you can run rqt_image_view
and select the /DUCKIEBOT_NAME/line_detector_node/image_with_lines
and you should see something like this:
Modified 2019-09-29 by Aleksandar Petrov
Here are some additional things you can try:
Modified 2018-10-20 by Russell
Modified 2019-05-08 by Gianmarco
dts duckiebot keyboard_control hostname
hostname/joy
topicModified 2018-10-20 by Russell
rqt_image_view
and look at image_with_lines.Modified 2018-10-20 by Russell
This feature is not implemented for this demo. The duckiebot assumes only normal lanes during this demo.
Modified 2019-09-27 by Aleksandar Petrov
Solution (advanced):
Set alternative controller gains. While running the demo on the Duckiebot use the following to set the gains to the alternative values:
laptop $ rosparam set /DUCKIEBOT_NAME/lane_controller_node/k_d -45
laptop $ rosparam set /DUCKIEBOT_NAME/lane_controller_node/k_theta -11
Those changes are only active while running the demo and need to be repeated at every start of the demo if needed. If this improved the performance of your Duckiebot, you should think about permenantly change the default values in your catkin_ws
.