-
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
Integrate target video confirmation with comms #83
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Michael Carroll <[email protected]>
Signed-off-by: Michael Carroll <[email protected]>
Signed-off-by: Michael Carroll <[email protected]>
Signed-off-by: Michael Carroll <[email protected]>
Signed-off-by: Michael Carroll <[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]>
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]>
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]>
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]>
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]>
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]>
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]>
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
caguero
approved these changes
Apr 15, 2022
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.
Works for me as expected!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Depends on:
Update:ros_ign
'sros2
branch - needs theros_ign_interfaces::msg::StringVec
msg typeros_ign
'sgalactic
branchCompetition rule: Teams need to stream video to base station / viewing gallery for operators to confirm targets.
This PR provides 2 ROS2 topics:
/<robot_name>/mbzirc/target/stream/start
- Teams will need to publish image stream to this topic before reporting targets/<robot_name>/mbzirc/target/stream/report
- API to report vessel, small and large target objectsThese 2 topics will relay the data to a new
BaseStation
plugin over comms, which will in turn forward the data to theGameLogicPlugin
.Main changes:
video_target_relay
relay node for providing the 2 ROS2 topics mentioned aboveBaseStation
plugin with comms endpoint.mbzirc_ros/examples/video_stream_publisher.cc
- an example to show how to stream image to base stationcompetition.launch
tocompetition_local.launch
- the score, clock, etc bridges in this launch file should really be created for each vehicle. For local testing, 1 bridge is enough so renamed to have the_local
suffix.The testing procedure is similar to #59 except we'll now use ros2 topics instead of ign service calls.
To test, I find it easiest to make the UAV and vessel static first, e.g.
patch
Make sure to build and install the workspace.
Launch simple demo world:
ros2 launch mbzirc_ros competition_local.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:
ign service -s /world/simple_demo/set_pose --reqtype ignition.msgs.Pose --reptype ignition.msgs.Boolean --timeout 300 --req 'name: "quadrotor_1", position: {x: 25.0, y:25, z:80}'
In a separate terminal, stream video to the
/mbzirc/target/stream/start
ros2 topic:Open
/tmp/ign/mbzirc/logs/events.yml
and see astream_start_request
event loggedPublish a message to the
/mbzirc/target/stream/report
ros2 topic report target vessel in streamCheck
/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_failure_*
events logged. Simulation stops after 3 invalid attempts.