clydemcqueen / orca4

ROS2 AUV based on the BlueROV2, ArduSub and Navigation2
MIT License
73 stars 21 forks source link

Initial position estimate #30

Open figuernd opened 1 month ago

figuernd commented 1 month ago

Hi Clyde,

Been using your codebase for a ROS2 educational workshop, thanks for making this public.

Is this part of this README still accurate? Not seeing where the vision position estimate or default pose is sent to ArduSub.

https://github.com/clydemcqueen/orca4/blob/c91b80c46ee0fadcb3af728c3d938947d4396f22/orca_base/README.md?plain=1#L94

Thanks in advance.

clydemcqueen commented 1 month ago

Been using your codebase for a ROS2 educational workshop, thanks for making this public.

Cool! I hope it is going well.

Not seeing where the vision position estimate or default pose is sent to ArduSub.

orca_base publishes the vision position estimate to the /mavros/vision_pose/pose topic. Mavros subscribes to this topic and publishes VISION_POSITION_ESTIMATE on MAVLink.

https://github.com/clydemcqueen/orca4/blob/c91b80c46ee0fadcb3af728c3d938947d4396f22/orca_base/src/base_controller.cpp#L389

https://github.com/clydemcqueen/orca4/blob/c91b80c46ee0fadcb3af728c3d938947d4396f22/orca_base/src/base_controller.cpp#L176

https://github.com/mavlink/mavros/blob/b0da849a06eb1a215b9205b92b8cf39c6d7cf88f/mavros_extras/src/plugins/vision_pose_estimate.cpp#L115

It took me a while to trace through the mavros code to see how ROS topics turn into MAVLink messages, and vice versa. It would be nice to document some of this in orca4, I suppose.

ArduPilot's DDS support is getting better, it might be possible to remove mavros entirely one day. :-)

figuernd commented 1 month ago

@clydemcqueen thanks! That helps. My issue has been waiting for an EKF pose back from ArduSub so that go_auv() can arm. I thought maybe the EKF wasn't initializing without an initial pose but looks like that wouldn't be it.