PX4 Community Q&A: June 28, 2023

June 28, 2023

Join us

Agenda

  • Community Announcement
  • Community Q&A
  • General Discussions

:loudspeaker: Community Announcement


A.1 :v1.14 Release update

  • Waiting on 2 issues until release candidate it out

A.2: PX4 Dev Summit CFP

Deadline within 2 weeks now! Please apply and hopefully meet you at the summit!

:people_holding_hands: Community Q&A (No deep technical discussions)


:exclamation: Guideline for asking a Question

  1. Specify what you are trying to achieve
  2. Specify what environment / platform you are using
  3. Prepare a Link or Document to help understand if possible
  4. First, ask the question on Discord or create a Github Issue!
  5. If you take over 5 minutes for the question, please continue in Discord or a Github Issue.

Q.1 : ROS2 and Gazebo simulation trouble

Will talk with beniamino separately. Then discuss about NAV2.

Q.2: PX4 SITL starting location modification

Could be the issue in Gazebo side, so need to investigate / debug further.

Q.3: Indoor flight with Optitrack using XRCE DDS bridge

vehicle_visual_odometry is not getting used by EKF2.

  • No velocity information
  • Frame set to ENU
  • Timestamps are being set
  • 60Hz rate
  • Covariance fields set to 0

Yaw is getting used, but position and height are not being used (as indicated by the estimator).

Answers

  • Please share the log when available!

Q.4: Using ROS2 simulation in parallel to ROS1 simulation environment

Yes that’s possible, and make sure to source the right ros version in the terminal.

Q.5: v1.14 beta - Fixed Wing showing weird errors

Message link: [v1.14 Release Candidate] - Flight testing & Flight Issues (logs) · Issue #21358 · PX4/PX4-Autopilot · GitHub

Discord thread: Discord

  • This issue was fixed in the release/1.14 branch, so we just need to tag the new beta / release candidate.
  • We need to test the PWM changes from Matthias before merging to 1.14 branch

Jakob will wait for the release candidate to be released.

RTL_TYPE (being 0) still doesn’t allow uploading the mission in the 1.14 beta. This is a regression, so Jakob will create a new Issue report.

Q.6: Airtraffic warning trigger without hardware

  • Can MAVSDK be used? Or something internally using PX4?

Simulating within PX4 could be convenient, like fake IMU for example.

:thinking: General Discussions


D.1 :

My end goal it to use NAV2 on a Jetson Nano to have a drone navigate around obstacles in a 2D plane. I need to simulate a depth camera and eventually a lidar before I put this on a real system.

I’m having a difficult time simulating PX4 with ROS2. There are plenty of tutorials on simulating with ROS2 and Gazebo, and I understand how to simulate my own sitl with PX4, but I can’t get ROS2 to play with my PX4 Gazebo simulations. I want to be able to import my own models and worlds. I know the docs explain how to do it but I feel like I am fighting Gazebo at every turn because it usually doesn’t do what the docs say it will do.

I know about ros/gazebo bridge packages, but I can’t get gazebo set up how I want for me to be able to really use those.

I’ve been told that you can open your own instance of gazebo and then open a px4 instance and it will spawn the model in your first instance, but that didn’t work for me. The two just ran separately like the other wasn’t there.

Here’s a link to the discord discussion on it.

I’m new to ROS2 and PX4 and have only been working with them for about two months. These issues with simulation feel a little overwhelming. If someone would be willing to hop on a call after the Q&A call after we talk about this a little I would really appreciate it.

I’m running this using ROS2 Humble on Ubuntu 22.04. I’ve tried using both Gazebo and Gazebo Classic and ran into similar issues on both.

Thank you! I really appreciate the help!

Hello !

I try to integrate a heightmap of the world in Gazebo to simulate realistic collisions for my drone. However, even when exporting correctly PX4_HOME_ALT, PX4_HOME_LON and PX4_HOME_LAT, my drone does not appear at the correct wanted location. I’ve wrote my issue here with way more details.
I’m using PX4 1.13 and Everything is running in a Docker image based on ubuntu:20.04 on which we run the Tools/setup/ubuntu.sh script

If you have any clues, contacts or tips, I’d love to get them!

Thank you very much!

Hello, this is abit late but I am trying to achieve indoor flight with an Optitrack setup using uXRCE dds bridge and ROS2. However, it seems that the optitrack data is not fusing into the ekf2 estimator.

My setup is as follows:

1.) Flash PX4 (master branch firmware) into Pixhawk 6X using QGC
2.) Change UXRCE_DDS_CFG parameter to Telem2
3.) Change EKF2_EV_CTRL parameter to use external vision for everything
4.) Run ROS2 script to publish optitrack data to /fmu/in/vehicle_visual_odometry topic
5.) Run microros agent on the companion computer (Ubuntu 22.04 with ros2 Humble) to start the uXRCE dds agent. The uXRCE dds bridge is connected from FCU (Pixhawk 6x) to the on board computer through telem2 serial.

I can echo out the topics published by the uXRCE dds bridge and I have checked that the optitrack data is indeed being streamed in to the FCU by checking the vehicle_visual_odometry uORB topic in the nsh. EKF2 does not seem to be using the optitrack pose because vehicle_local_position uORB message isn’t converging with the optitrack pose… I have looked through the forums / github issues but can’t seem to figure out whats wrong. Did I miss anything out? Do let me know. Thanks!

1 Like

Hello ,
Can we install and run ROS2 on an ubuntu platform in parallel to an existing ROS1 Gazebo PX4_SITL installation . I mean can we switch between ROS 1 and ROS 2 in simulation

1 Like

Hey! I think that I could help you a bit with it.

1 Like

Is there a way to trigger Airtraffic warnings without having the actual Hardware?

I triggered it with such idea of the structure:

    # Create the ADS-B vehicle message
    adsb_vehicle = AdsbVehicle(
        icao_address=2,  # Unique ICAO address for the virtual vehicle
        latitude_deg=latitude_deg,
        longitude_deg=longitude_deg,
        absolute_altitude_m=100.0,  # Initial altitude
        heading_deg=0.0,  # Initial heading
        horizontal_velocity_m_s=10.0,  # Initial velocity (north direction)
        vertical_velocity_m_s=0.0,  # Initial vertical velocity
        callsign="Virtual Traffic",  # Callsign for the virtual vehicle
        emitter_type=AdsbEmitterType.LARGE,  # ADS-B emitter type
        squawk=1000,  # Squawk code
        tslc_s=0  # Time since last communication in seconds
    )
1 Like

Just a note, this seems to be the same issue as here:

Also may be related: