Skip to content

vrx_2022 scan_dock_deliver_task

M1chaelM edited this page Sep 10, 2021 · 10 revisions

Task 6: Scan and Dock and Deliver

Summary

Detect the dock and execute a controlled docking maneuver in the appropriate gate. The system should detect the color sequence emitted by the scan-the-code buoy, as this color sequence dictates the correct docking gate. Additional points will be awarded for vehicles that can successfully propel a projectile through one of the two holes in the placard at the head of the correct docking bay.

How to Practice

Step 1: Launch the example

roslaunch vrx_gazebo scan_dock_deliver.launch

Step 2: Access relevant topics and services

The following ROS topics and services are used in this task:

Topics

/vrx/task/info
/wamv/shooters/ball_shooter/fire

Services

/vrx/scan_dock_deliver/color_sequence

Using these topics and services

  1. To see the timeout counter and your current score, subscribe to the /vrx/task/info topic:
    rostopic echo /vrx/task/info
    
  2. To shoot a projectile from the ball shooter, publish a std_msgs/Empty message to the /wamv/shooters/ball_shooter/fire topic:
    rostopic pub /wamv/shooters/ball_shooter/fire std_msgs/Empty "{}" --once
    
  3. To report the scan-the-code color sequence, request a service call to the /vrx/scan_dock_deliver/color_sequence service:
    rosservice call /vrx/scan_dock_deliver/color_sequence "blue" "green" "red"
    

Step 3: Complete the task

  • Get close to the scan-the-code buoy and report the correct color sequence.
  • Identify the dock and the correct docking gate.
  • Approach the correct gate and execute a smooth docking maneuver.
  • Point to the right placard targets and shoot your projectiles.
  • Exit the gate smoothly.

Notes / Hints:

  • Only four shots are allowed during this task. If you want to practice with unlimited shots remove the line <num_shots>4</num_shots> in wamv_gazebo/urdf/ball_shooter/ball_shooter.xacro and recompile VRX.
  • Points are awarded for any successful docking maneuver, even in an incorrect gate.
  • If you launch the simulation with roslaunch vrx_gazebo scan_dock_deliver.launch extra_gazebo_args:="--verbose", you'll be able to see debug messages during your docking maneuver:
[Msg] Entering external dock activation zone in [bay2]
[Dbg] [scan_dock_scoring_plugin.cc:271] [bay2] OnExternalActivationEvent(): 1
[Msg] Leaving external dock activation zone in [bay2]
[Dbg] [scan_dock_scoring_plugin.cc:271] [bay2] OnExternalActivationEvent(): 0
[Msg] Entering internal dock activation zone, transitioning to <docking> state in [bay2].
[Dbg] [scan_dock_scoring_plugin.cc:251] [bay2] OnInternalActivationEvent(): 1
[Msg] Successfully stayed in dock for 10 seconds, transitioning to <docked> state
[Msg] Leaving internal dock activation zone in [bay2] after required time - transitioning to <exited> state.
[Dbg] [scan_dock_scoring_plugin.cc:251] [bay2] OnInternalActivationEvent(): 0
[Msg] Entering external dock activation zone in [bay2]
[Dbg] [scan_dock_scoring_plugin.cc:271] [bay2] OnExternalActivationEvent(): 1
[Msg] Successfully docked in [bay2]. Awarding 15 points.
[Msg] Docked in correct dock [bay2]. Awarding 20 more points.
Clone this wiki locally