Conversation
alexschmander
left a comment
There was a problem hiding this comment.
Initial review. Will continue when #2154 is merged.
17a872e to
706d150
Compare
4ed509f to
7febaa5
Compare
@alexschmander #2154 is merged, you can review this |
`/booster_camera_bridge/StereoNetNode/rectified_image` -> `booster/rectified_image` `/booster_camera_bridge/image_left_raw` -> `booster/image_left_raw` `/booster_camera_bridge/image_left_raw/camera_info` -> `booster/image_left_raw/camera_info`
- `/booster_camera_bridge/StereoNetNode/rectified_right_image` -> `booster/rectified_right_image` - `/booster_camera_bridge/StereoNetNode/stereonet_depth` -> `booster/stereonet_depth` - `/booster_camera_bridge/StereoNetNode/stereonet_visual` -> `booster/stereonet_visual` - `/booster_camera_bridge/image_right_raw` -> `booster/image_right_raw` - `/booster_camera_bridge/image_right_raw/camera_info` -> `booster/image_left_raw/camera_info`
7febaa5 to
6fc95bc
Compare
|
@schmidma you could review this again now. I should probably not review it myself, since I worked on the the last couple commits... |
| let mut stereonet_depth_camera_info_forwarder = spawn_ros_to_zenoh_forwarder::<Image>( | ||
| &mut ros_node, | ||
| zenoh_session.clone(), | ||
| "/StereoNetNode/stereonet_depth", | ||
| "camera_info", | ||
| MessageTypeName::new("sensor_msgs", "CameraInfo"), | ||
| "stereonet_depth/camera_info", | ||
| )?; |
| "/", | ||
| "joint_ctrl", | ||
| MessageTypeName::new("booster_interface", "LowCmd"), | ||
| "low_command", |
There was a problem hiding this comment.
The existing hardware interface uses booster/joint_ctrl. Is this intended to now be low_command?
| Ok(tokio::spawn(forward_ros_to_zenoh( | ||
| ros_subscription, | ||
| zenoh_session, | ||
| zenoh_topic_name, | ||
| )) | ||
| .fuse()) |
There was a problem hiding this comment.
I feel like this pattern could be much nicer, when using tokio JoinSets, but proof me wrong ;) This might be a stylistic preference
| let result = select! { | ||
| result = button_event_forwarder => result, | ||
| result = fall_down_state_forwarder => result, | ||
| result = low_state_forwarder => result, | ||
| result = origin_left_image_forwarder => result, | ||
| result = origin_right_image_forwarder => result, | ||
| result = rectified_image_forwarder => result, | ||
| result = rectified_right_image_forwarder => result, | ||
| result = stereonet_depth_forwarder => result, | ||
| result = stereonet_depth_camera_info_forwarder => result, | ||
| result = stereonet_visual_forwarder => result, | ||
| result = image_combine_raw_forwarder => result, | ||
| result = image_left_raw_forwarder => result, | ||
| result = image_left_raw_camera_info_forwarder => result, | ||
| result = image_right_raw_forwarder => result, | ||
| result = image_right_raw_camera_info_forwarder => result, | ||
| result = low_command_forwarder => result, | ||
| } | ||
| .wrap_err("failed to run forwarder to completion")?; |
There was a problem hiding this comment.
Spawning on tokio JoinSets allow to poll for the next failing task, and then error...
| ros_namespace: &'static str, | ||
| ros_topic_name: &'static str, | ||
| ros_type_name: MessageTypeName, | ||
| zenoh_topic_name: &'static str, | ||
| ) -> Result<Fuse<JoinHandle<Result<()>>>> { |
There was a problem hiding this comment.
is this 'static bound necessary here?
| @@ -0,0 +1,8 @@ | |||
| #[derive(Debug, thiserror::Error)] | |||
| pub enum Error { | |||
| // FIXME: Internal ROS error can not be wrapped due to generics | |||
Why? What?
This PR adds a bridge to make the booster ROS interfaces available via zenoh.
Blocked on #2154.
ToDo / Known Issues
Ideas for Next Iterations (Not This PR)
How to Test
Then, listen to the available zenoh topics, e.g. using zenoh-cli.