Currently target reporting only works with video stream from one camera. This PR adds support so that target report can be done from different cameras, e.g. verify vessel report from slot0 of quad_1 and then verify small object report from slot3 of quad_2.
To test:
Apply the following patch make the quadrotor static and move Vessel B closer to coast and make it static so it's easier to test target reporting:
In another terminal, start stream from quadrotor_1 using image_transport
ros2 run image_transport republish raw --ros-args --remap in:=/quadrotor_1/slot0/optical/image_raw --remap out:=/quadrotor_1/mbzirc/target/stream/start
ros2 run image_transport republish raw --ros-args --remap in:=/quadrotor_2/slot3/optical/image_raw --remap out:=/quadrotor_2/mbzirc/target/stream/start
Signed-off-by: Ian Chen ichen@osrfoundation.org
Fixes https://github.com/osrf/mbzirc/issues/193
Depends on https://github.com/gazebosim/gz-rendering/pull/690
Currently target reporting only works with video stream from one camera. This PR adds support so that target report can be done from different cameras, e.g. verify vessel report from slot0 of quad_1 and then verify small object report from slot3 of quad_2.
To test:
Apply the following patch make the quadrotor static and move Vessel B closer to coast and make it static so it's easier to test target reporting:
patch
```diff diff --git a/mbzirc_ign/models/mbzirc_quadrotor/model.sdf.erb b/mbzirc_ign/models/mbzirc_quadrotor/model.sdf.erb index a16a8de..0cde58b 100644 --- a/mbzirc_ign/models/mbzirc_quadrotor/model.sdf.erb +++ b/mbzirc_ign/models/mbzirc_quadrotor/model.sdf.erb @@ -91,7 +91,7 @@ endbuild the workspace for changes to take place
Launch the coast environment
Spawn 2 quadrotors. One with front facing camera (slot0) and one with downward facing camera (slot3)
Position
quadrotor_1
to look at vessel:In another terminal, start stream from
quadrotor_1
usingimage_transport
Report vessel
Check
tmp/ign/mbzirc/logs/events.yml
and you should seevessel_id_success
eventKill the stream (
image_transport
process) forquadrotor_1
by pressing Ctrl+C.Move
quadrotor_2
above small target objectStart the stream from
quadrotor_2
Report small object
Verify that in
tmp/ign/mbzirc/logs/events.yml
, you see asmall_object_id_success
event