Skip to content
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

ROS2 RTK setup - replacement for gcs_bridge #1905

Open
diablo1281 opened this issue Oct 9, 2023 · 4 comments
Open

ROS2 RTK setup - replacement for gcs_bridge #1905

diablo1281 opened this issue Oct 9, 2023 · 4 comments

Comments

@diablo1281
Copy link

Issue details

Hi, I am trying to connect RTK node to mavros node.
I have a device on the network that sends Mavlink messages with RTCM for all UAVs in the network (it is seen as a vehicle with its own ID).
On ROS1 I used gcs_bridge and it worked fine. Now as I updated to ROS2 I can't get it to work. I tried to modify mavros_node to accept additional GCS in the router setup, but messages are not visible in the Mavlink Inspector on QGCS and the drone doesn't receive any RTCM messages.

I would appreciate any help on this topic.

MAVROS version and platform

Mavros: ros2 branch
ROS: Humble (compiled from source)
Ubuntu: Debian Bullseye RT

Autopilot type and version

[ ] ArduPilot
[ X] PX4

Version: 1.13.1

@vooon
Copy link
Member

vooon commented Oct 9, 2023

You don't need gcs_bridge anymore. Just call router to add additional link: https://github.com/mavlink/mavros/blob/ros2/mavros_msgs/srv/EndpointAdd.srv

Note that router doesn't pass messages from the same endpoint type. So message coming from GCS will be routed to FCU, but not to other GCS (i.e. QGC).

@vooon
Copy link
Member

vooon commented Oct 9, 2023

See also:

/**
* Router class implements MAVROS Router node
*
* Router is essential part that connects several MAVLink devices together.
* In general there are three device classes that router uses:
* - a FCU endpoint - should be faced to autopilot firmware(s),
* - a GCS endpoint - that ep connects control software
* - a UAS endpoint - special type of endpoint that is used to connect MAVROS UAS node(s) to FCU(s)
*
* Some traffic rules:
* 1. FCU broadcast -> GCS, UAS, but not to any other FCU
* 2. FCU targeted system/component -> GCS/UAS endpoint that have matching address
* 3. FCU targeted system -> same as for p.2
* 4. GCS broadcast -> FCU, UAS
* 5. GCS targeted -> FCU/UAS maching addr
* 6. UAS broadcast -> FCU, GCS
* 7. UAS targeted -> FCU/GCS
*/

@diablo1281
Copy link
Author

diablo1281 commented Nov 10, 2023

@vooon thanks for anwers.

I still didn't get it to work. After trying to create an endpoint for the RTK station there are no incoming messages to MAVROS from it.
I did try it through C++ module code and service. Also, I disabled the block for exchanging messages between the same type of endpoint to find out it using QGC. As a result, in Mavlink Inspector I can see UAV and QGC messages, but no RTK.
Also, I did try to connect 2 QGC with different IDs and there is some strange behavior - sometimes it connects, sometimes not. Messages are getting laggy also.

I think I tried everything but without luck. Do you have any tips?

@vooon
Copy link
Member

vooon commented Nov 10, 2023

That's odd. Probably you can try to put mavlink-router in front of mavros router as a workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants