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

microRTPS to XRCE in Pixhawk 5X #21095

Open
gugafelds opened this issue Feb 9, 2023 · 10 comments
Open

microRTPS to XRCE in Pixhawk 5X #21095

gugafelds opened this issue Feb 9, 2023 · 10 comments
Labels

Comments

@gugafelds
Copy link

gugafelds commented Feb 9, 2023

Hi folks,

Recently I installed the newest version of PX4 Autopilot and I would like to know how do I build the code with the possibility to use RTPS?

In another version of PX4 Autopilot I could do this with make px4_fmu-v5x_rtps, but now this new release doesn't have it anymore. Any suggestions? I have built the default firmware and can't find the RPTS_CONFIG parameter.

Has anyone tested the XRCE communication on a real drone?

@beniaminopozzan
Copy link
Member

Hi @gustavotbarros , if you want to use microRTPS you need to roll back to version 1.13. If you want to try microdds then please refer to #21120 :)
I personally used it only in simulation, but any feedback on tests on real drones would be greatly appreciated!

@gugafelds
Copy link
Author

Hi, alright

Ive read that some commands like arming the drone, changing flight mode and so on were not implemented in the latest version yet. when this is implemented, i will give it a try.

@beniaminopozzan
Copy link
Member

Even microRTPS did not have "some commands like arming the drone, changing flight mode and so on" implemented, you had to send the appropriate messages ros2 messages (vehicle_command, ecc).
microXRCE DDS changes the low level protocol but from the user POV everything is still the same, just different commands to start the bridge.

@gugafelds
Copy link
Author

Ah ok, I'll try to do some tests with micro-xrce-dds then. I have one question, is it possible to use microRTPS with Pixhawk 6X? By changing the file .px4board? I have already done that with a CubeOrange.

@beniaminopozzan
Copy link
Member

Yes, you can. I never did it personally but you need to

  • As you said, enable microRTPS and disable microDDS (they can't coexist) in .px4board. Use a tag or a release branch that is compatible with both pixhawk6x (not too old) and microRTPS (not too recent), like v1.13.2 or release/1.13 (https://docs.holybro.com/autopilot/pixhawk-6x/supported-firmware). The entries you need to add / modify are

    CONFIG_MODULES_MICRODDS_CLIENT=n
    CONFIG_MODULES_MICRORTPS_BRIDGE=y
    
  • flash the firmware and configure the microRTPS bridge.

@junwoo091400
Copy link
Contributor

Was it resolved? @gustavotbarros

@gugafelds
Copy link
Author

gugafelds commented Mar 29, 2023

@junwoo091400 Hi, not yet. I'm updating my codes to the new px4_msgs and topics. I will not use the Pixhawk 6X with RTPS, I'll try to implement the MicroXRCE to my code.

But in SITL I've already noticed that I am not able to send the yaw through TrajectorySetpoint messages.

Ok, that was a problem on my code, I've already figured it out.

Has anyone ever flown in Offboard Mode with v1.14?

@beniaminopozzan
Copy link
Member

@gustavotbarros

Has anyone ever flown in Offboard Mode with v1.14?

Last time I flown in offboard with v1.14-beta1
Holybro Pixhawk 4 mini connected via serial to a Raspberry Pi 4

@gugafelds
Copy link
Author

gugafelds commented Mar 30, 2023

@beniaminopozzan
Ok, I was trying here with the latest firmware version and I keep getting critical errors during the preflight check. The GPS light is blinking red repeatedly. I also calibrated everything, but it is not working. Even when I move the drone with my hand it will come up with the errors.
The communication with MicroXRCE via serial is working. But I cannot arm it because of the errors mentioned.
Do you know what it could be?

Update:
I've tested the stable version and these errors that were appearing during the calibration and preflight check did not occur. The Pixhawk 6X behaves as it should. I've tried both of beta1 and beta2 versions but the errors were still there.
Is it possible to use MicroXRCE with v1.13.2 or v1.13.3?

@junwoo091400
I've tested now the microRTPS Bridge on the Pixhawk 6X changing the .px4board file using the v1.13.2 firmware. The data exchange is working, I was able to configure and establish the bridge, but I didnt have time to fly in Offboard Mode. I'll test it tomorrow or next week.

@beniaminopozzan
Copy link
Member

@gustavotbarros

Is it possible to use MicroXRCE with v1.13.2 or v1.13.3?

No, it is not possible. See first note in the ROS 2 - PX4 documentation

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

No branches or pull requests

3 participants