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

[Bug] MicroXRCE Agent fails to connect #24053

Open
Apoorv-1009 opened this issue Nov 28, 2024 · 1 comment
Open

[Bug] MicroXRCE Agent fails to connect #24053

Apoorv-1009 opened this issue Nov 28, 2024 · 1 comment

Comments

@Apoorv-1009
Copy link

Describe the bug

Me and my friend are using the PX4 autopilot with ROS2 for a project, and initially we were getting each others topics when running ros2 topic list, so we then added ROS_LOCALHOST_ONLY=1 in our zshrc files. But recently, our MicroXRCE agent is giving small issues:
Running make px4_sitl gazebo-classic, the MicroXRCE agent connects, but running ros2 topic list does not give any topics
Running ./Tools/simulation/gazebo-classic/sitl_multiple_run.sh -m iris -n 1, the MicroXRCE agent simply does not connect, and so we dont get topics
May I know any possible reason for this problem? Thanks

To Reproduce

No response

Expected behavior

No response

Screenshot / Media

No response

Flight Log

No response

Software Version

No response

Flight controller

No response

Vehicle type

Multicopter

How are the different components wired up (including port information)

No response

Additional context

No response

@DominicMarti
Copy link

Hi @Apoorv-1009

Have you tried to start the agent independently of ROS2 interface to isolate the error sources? You can start the agent with

MicroXRCEAgent udp4 -p 8888

And in another terminal start your simulation: make px4_sitl gazebo-classic

Then you should see if the publisher and subscribers are set up properly in the agent terminal. If that works, then there might be an issue with the localhost flag.

Side Note: We had similar issues on 1.14 and corresponding MicroXRCE Agent versions, but not in Gazebo. We found the problem to be that the pixhawk would not start sending messages through the interface until it itself received a message. One way you can try to circumvent this is by sending heart beats from ROS2 through the interface on startup for a couple of seconds, just to make sure the pixhawk receives messages and starts sending as well.

Cheers!

@github-actions github-actions bot removed the stale label Jan 4, 2025
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