PX4 Community Q&A: February 22, 2023

February 22, 2023

Join us

Agenda

  • Community Announcement
  • Community Q&A
  • General Discussions

:loudspeaker: Community Announcement


A.1 : XRCE-DDS Documentation is finally out!!!

  • Please give it a try & any feedbacks would be welcome! (In #ros channel in Discord server)
    • E.g. Whether it works / tutorial requests / etc

A.2 : Next week 2022 Contributor report coming :muscle:

  • Wait for it!!

A.3: QGC Call this Thursday

Feel free to join QGC call this Thursday, as we need a lot of help resurrecting the development efforts there!

Please add it to your calender by visiting here: https://www.dronecode.org/calendar/

: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 : Namespace convention collision for multi vehicle simulation

PR up by Benjamin here:

Action Items: Discuss with @Jaeyoung-Lim (already approved the PR). Probably the best person with full context.

Q.2: Iridium driver, how to send the info via MAVLink?

  • Confusion in where the MAVLink parsing is happening.

Answer: mavlink_receiver, daniel will send the link.

Q.3: What is the current status of the System Failure Injection feature?

  • It notes that it only works in Simulation & is in development status as of PX4 1.12
  • Would be nice to have this feature working for the flight testings

Answer: Should work with some modifications. Daniel already started initial effort (making it work in real vehicle).

Action Item: @danielhonies will check on implementation & catch up with Daniel on what needs to be done & try it out.

Q.4: How to install px4 firmware on mateksys f405-wmn FC

Answer: F4 version probably hasn’t been supported yet, although other MATEK boards (H743) have been tried out successfully in the past. Although it is not documented as an officially supported board: Community Supported & Experimental Autopilots | PX4 User Guide

However, supporting F4 boards probably won’t be desirable.

Note: @Sir_MuEL check out Flight Controller Porting Guide | PX4 User Guide, for getting a sense on how to support a new board.

Q.5: Simulating RC inputs - Josh

I have a RC controller connected to sitl as a Joystick device. I would like that to appear to sitl as RC input not as overrides via a joystick attached to a GCS. (To test arming switches or well any other switch.)

Discord message: Discord

Answer: Currently QGC sends Manual control setpoint message to stream the RC data from the joystick, however ideally we would send RC (data?) message.

Relevant doc: Joystick · QGroundControl User Guide

Q.6: Turning off optimizations in SITL? - Josh

Currently when we set breakpoint to monitor a specific variable (RTL time estimate), but compiler optimizes the code compilation, and debugging is hard.

Answer: Daniel does it on ‘per module’ basis. He used to have debug build that doesn’t do any optimizations. In the CMakeList, add compile option o0.

Answer2: Add volatile int j = 0 and add j++ near the breakpoint, it should always hit via debugger - David

Related: Why does Visual C++ not hit a breakpoint in, or step through a specific function? - Stack Overflow

Q.7: Documentation for Underwater Unmanned Vehicle - shenchris

Trying to control UUV with PX4 (with Computer Vision). However documentation in UUV is limited. What kind of references are there?

Currently tried IMU based estimation, but position estimate drifts significantly.

Answer: There is UUV controller code in the repository. Otherwise, documentation isn’t so helpful for development.

Answer2: If there are events underwater, it’s good to use VIO, but otherwise DVL would be better to use. Using just IMUs could be possible. - Farhang

Note: Please share questions/progress in #uuv channel in Discord as well! Check out odometry doc as well: Visual Inertial Odometry (VIO) | PX4 User Guide

:thinking: General Discussions


D.1 : Is Bot in Discord annoying?

  • Reminder to write questions in the forum helps articulating the question :+1:
1 Like

Hello, I’d like to discuss about microdds-client: fix namespace convention for multi vehicle simulations by beniaminopozzan · Pull Request #21091 · PX4/PX4-Autopilot · GitHub.
In a nutshell, the current management of microdds considers two scenarios:

  1. Single vehicle simulations, enabled when the px4_instance is 0 (the default one). With px4_instance I mean the variable passed by the -i flag

    Usage for Server/daemon process: 
    
        px4 [-h|-d] [-s <startup_file>] [-t <test_data_directory>] [<rootfs_directory>] [-i <instance>] [-w <working_directory>]
    
        -s <startup_file>      shell script to be used as startup (default=etc/init.d-posix/rcS)
        <rootfs_directory>     directory where startup files and mixers are located,
                               (if not given, CWD is used)
        -i <instance>          px4 instance id to run multiple instances [0...N], default=0
        -w <working_directory> directory to change to
        -h                     help/usage information
        -d                     daemon mode, don't start pxh shell
    

    In this scenario:

    1. microdds_client is started without additional namespace.
    2. The XRCE_session_key is set to 1.
  2. Multi vehicle simulations, enabled when the px4_instance is greater than 0. In this scenario

    1. microdds_client is started with the additional namespace /px4_${px4_instance}/ (/px4_1/, /px4_2/, ecc).
    2. The XRCE_session_key is set to px4_instance.

However, gazebo-classic sitl_multiple_run.sh mixes the two scenarios as it starts the first instance with id 0.

Solution 1: Unify the startup behavior

Keep only the multi vehicle scenario. the additional prefix is always given XRCE_session_key collisions are prevented.

Solution 2: Modify sitl_multiple_run.sh

Modify the script such that it starts from instance 1

1 Like

Hi, I’ve been working on getting PX4 to receive MAVLink message through Iridium interface. I’m able to send MAVLink messages from the PX4 to Iridium, but I’m having issue receiving them when I send them through the Rock7 website (the Rock7 website is the web interface to send and receive Iridium messages).

Here’s how I proceed:

  1. I generate a MAVLink message with a simple python script and print it out into hexadecimal to something like this:0xfe0x320x00x00x00xee0x5b0x410x430x540x550x3d0x210x410x530x430x5d0x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x870xa0
  2. Then in the Rock7 website, I send a new message and use the Hex mode of sending the data and I paste the generated value in the form. I’ve tested with removing the 0x from each value, and I’ve also tested it with letting it there. Here’s a screenshot of the message I’m sending
  3. In the Iridium driver, which I’m running in verbose mode, I’m able to see that there’s has been a successful session and that the driver read the number of byte I previously send through the Rock7 website.
  4. This is where I have a problem, even though the driver reads it, and I assume notify the MAVLink instance that’s using the iridium driver, I see nothing on the MAVLink side of things.

So my questions would be, where in the code would a MAVLink instance start reading from a driver and would there be a way to add verbose messages? And how should I build my MAVLink message to send it through the Rock7 website?

Also, I think it is worth mentioning that the MAVLink message and reception works on the SITL.

Thanks a lot in advance for the help!

1 Like

Hi,
in reference to System Failure Injection | PX4 User Guide
I would like to know what the current state of the failure injector is? Does it work in flight?

1 Like

Hello, I would like to know if it will be possible (and how) to install px4 firmware on a generic flight controller, particularly the mateksys f405-wmn FC

1 Like