-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support validating target reports through image stream #59
Conversation
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got this error message when running step 7 of your instructions:
caguero@cold:~/mbzirc_ws$ ign service -s /world/simple_demo/set_pose --reqtype ignition.msgs.Pose --reptype ignition.msgs.Boolean --timeout 300 --req 'name: "quadrotor_1", position: {x: 24.9.0, y:24.85, z:2}'
[libprotobuf ERROR google/protobuf/text_format.cc:307] Error parsing text-format ignition.msgs.Pose: 1:40: Already saw decimal point or exponent; can't have another one.
[libprotobuf ERROR google/protobuf/text_format.cc:307] Error parsing text-format ignition.msgs.Pose: 1:40: Expected identifier, got: .0
data: true
and this is the content of the events file:
caguero@cold:~/mbzirc_ws$ tail -f /tmp/ign/mbzirc/logs/events.yml
total_score: 48
data: vessel::640::480
- event:
id: 3
type: target_reported
time_sec: 83
elapsed_real_time: 54
elapsed_sim_time: 48
total_score: 48
data: vessel_id_success
- event:
id: 4
type: target_reported_in_stream
time_sec: 116
elapsed_real_time: 91
elapsed_sim_time: 81
total_score: 80
data: small::640::480
- event:
id: 5
type: target_reported
time_sec: 116
elapsed_real_time: 91
elapsed_sim_time: 81
total_score: 261
data: small_object_id_failure_1
- event:
id: 6
type: target_reported_in_stream
time_sec: 128
elapsed_real_time: 105
elapsed_sim_time: 93
total_score: 273
data: large::640::480
- event:
id: 7
type: target_reported
time_sec: 128
elapsed_real_time: 105
elapsed_sim_time: 93
total_score: 453
data: large_object_id_failure_1
I see a few object_id_failure
. Is this expected?
Oh, I see, there's a typo. Let me try again. |
I still see an |
Should this line in the instructions
be
? |
ah thanks for fixing the typos.
I think that's because the USV and objects have moved (due to wind and waves). Could you try opening |
I confirm that I get a successful confirmation when the objects are centered in the image.
I changed the sea state and wind by running:
|
* disable robot when it moves out of outer geofence Signed-off-by: Ian Chen <[email protected]> * make robot static instead of halting its motion Signed-off-by: Ian Chen <[email protected]> * fix test Signed-off-by: Ian Chen <[email protected]> * update comments Signed-off-by: Ian Chen <[email protected]> * Bridge competition topics (#62) * publish phase, add competition launch file Signed-off-by: Ian Chen <[email protected]> * fix and add test Signed-off-by: Ian Chen <[email protected]>
Depends on gazebosim/gz-sim#1381
Targets are to be reported by labeling their location in a live video stream. This PR adds the following functionality:
The GameLogic plugin does not actually process any incoming video images, e.g. no object recognition or image processing, etc but instead it uses the rendering engine to check if target objects are in the camera view (by checking target is within frustum and projecting ray to see if it hits the target)
To test, I find it easiest to make the UAV static first so it does not fall when we hover it over the target, e.g.
Make sure to build and install the workspace.
Launch simple demo world:
ros2 launch ros_ign_gazebo ign_gazebo.launch.py ign_args:="-v 4 -r simple_demo.sdf"
spawn quadrotor with downward looking camera:
# slot3 is downward looking camera ros2 launch mbzirc_ign spawn.launch.py name:=quadrotor_1 world:=simple_demo model:=mbzirc_quadrotor type:=uav x:=-0 y:=0 z:=1.2 R:=0 P:=0 Y:=0 slot3:=mbzirc_hd_camera
Move the quadrotor above vessel:
Use ign service to indicate that stream is to be started
Use ign service to report target vessel in stream
Open
/tmp/ign/mbzirc/logs/events.yml
to see that the vessel is successfully reported. You should see an event with data:vessel_id_success
Repeat the process for small and large target objects
You can also try reporting wrong image pos and you should see
*_object_id_success_*
events logged. Simulation stops after 3 invalid attempts.