farhang
September 17, 2024, 1:25pm
1
PX4 Sync / Q&A: Sep 18, 2024
Agenda
Announcements
Release Discussion
Q&A
Announcements
Release Discussion
The tag is there:
Bug report / Q&A
1- @Steve_John you could consider increasing COM_RC_LOSS_T to 1 second to check this again.
2- @Karukkuvel0Killis https://discuss.px4.io/t/ist8310-external-compass-showing-inconsistency/40758: check all the rotations and try to run it from the boot with the correct rotation. Then the calibration and see if it solves. Logging before and after boot will work.
3- @Karukkuvel0Killis How to use another MCU rather than stm32f100 as IO processor? : Maybe consider using IO for now to see if the problem resolves. Besides, taking a look into the specific board specs would be helpful to debug.
4- [Bug] CI: Upload Artifacts fails when test fails · Issue #23683 · PX4/PX4-Autopilot · GitHub
rover: add descend navigation state to land detection · PX4/PX4-Autopilot@81747f3 · GitHub
differential: Add stabilized and position mode (#23669) · PX4/PX4-Autopilot@2fd4150 · GitHub
@dagar maybe the way for now is to use v3.
PRs needing review
Maybe putting this for a point release or backport ?
PX4:main
← PX4:maetugr/fix-mc-rtl-without-delay
opened 02:49PM - 18 Sep 24 UTC
### Solved Problem
Test report: Strange-looking vertical deceleration and accel… eration during the final landing phase of a multicopter RTL.
Visible in the log, reproducible in default SITL SIH:
![image](https://github.com/user-attachments/assets/8c6966a2-c5bd-45b4-be9e-2e7167959ebd)
Turns out it's because there are additional mission items at the RTL loiter altitude `RTL_DESCEND_ALT`
![image](https://github.com/user-attachments/assets/75064a73-1f45-48e3-b78b-5b11874f5268)
### Solution
Skip the RTL states between flight to home/rally point and land if there is no delay configured `RTL_LAND_DELAY = 0` (default).
This was already done
https://github.com/PX4/PX4-Autopilot/blob/26fd4c852c52837e306790e0f86b27d0b0df516e/src/modules/navigator/rtl_direct.cpp#L432-L444
before the refactor https://github.com/PX4/PX4-Autopilot/pull/21049 and was assumed not to be necessary anymore.
Note: To not break the VTOL and fixed-wing use case I had to make sure the states are can only get skipped for multirotors (or a VTOL returning as multicopter). I checked in with @KonradRudin and the additional mission items do not cause problems when flying as fixed wing even if there's no delay between them.
### Changelog Entry
```
Bugfix: unexpected vertical deceleration and acceleration durn multicopter RTL final land phase
```
### Alternatives
I'd like to eventually break out multicopter RTL from navigator. The execution should just receive the target land location and turn out rather simple and not conflicting with other vehicle types.
### Test coverage
I ran a multicopter only test in SITL SIH and the states are skipped, mission items not present hence slow down resolved:
![image](https://github.com/user-attachments/assets/bc32e757-2618-4f53-87d3-ea1caab30378)
### Context
Related links, screenshot before/after, video
Will be reviewed:
PX4:main
← dirksavage88:sf45_uart_fix
opened 10:17PM - 18 Aug 24 UTC
Fixes https://github.com/PX4/PX4-Autopilot/issues/23308 when the SF45 is on spec… ific UARTS, the sensor never reports distance data due to being stuck in init.
Also populates comms_errs if there are issues reading/writing data.
The serial uart data being read reports the start of packet invalid, payload length invalid, and CRC mismatch in the early sensor init state, so the SF_STREAM command never gets sent out. This PR restarts the state machine if there are too many consecutive errors in the beginning that are the result of UART data mismatch on what the driver expects and what the sensor sends. For unknown reasons the sensor seems to work much better on TELEM1 and TELEM2
Tested on holybro 6x where TELEM 1 and TELEM2 worked fine with the original driver, but TELEM3 did not and the start of packet invalids caused the sensor to never stream distance data. With this fix the driver actually reports distance data on telem 3.
![errors](https://github.com/user-attachments/assets/6e41e668-612c-43c2-b581-f7a37372fee7)
![sf45](https://github.com/user-attachments/assets/e36dad18-691d-4b9f-9f87-87df1a8010b1)
Pinged @DonLakeFlyer !
mavlink:master
← gillamkid:gillamkid/tab-navigation
opened 05:54AM - 18 Sep 24 UTC
# Description
There was little to no visual indication to show which buttons wh… ere focused when TAB was pressed. I added visual queues and made so the expected inputs would be focused when pressing TAB
## Sponsor
This contribution was sponsored by [Firestorm](https://www.launchfirestorm.com/)
![654d4f9476ff2a38f37e9ab9_firestorm-homepage-share-img-2](https://github.com/user-attachments/assets/bc1a2c95-b33d-4a2d-af35-4d2d8651d0a2)
## Demo of new TAB navigating ability (Light mode)
https://github.com/user-attachments/assets/819d4375-741c-479a-9782-a0b83fa66956
## Demo of new TAB navigating ability (Dark mode)
https://github.com/user-attachments/assets/e35e2702-e30a-4f99-aa53-de54b6bc8ebf
mavlink:master
← gillamkid:gillamkid/popup-enter-key-bug
opened 06:26AM - 18 Sep 24 UTC
# Description
Fix bug with Popup enter-key handling
If the event that trig… gered a Popup to open was an enter key being pressed, the Popup would immediately close because it would handle the onRelease of the press when it should listen to the onPressed. as with typing, it is expected that key strokes have an affect on press, not on release.
## Sponsor
This contribution was sponsored by [Firestorm](https://www.launchfirestorm.com/)
![654d4f9476ff2a38f37e9ab9_firestorm-homepage-share-img-2](https://github.com/user-attachments/assets/bc1a2c95-b33d-4a2d-af35-4d2d8651d0a2)
## Before (popup that was triggered to open immediately closes)
https://github.com/user-attachments/assets/5bcdae1c-2367-4103-9d6c-c5c7c6a627c1
## After (popup that is meant to be shown is shown until exited)
@
https://github.com/user-attachments/assets/03a290da-a94c-4dac-9521-70f9dcbc9ff6
mavlink:master
← gillamkid:gillamkid/value-display-update
opened 06:52AM - 18 Sep 24 UTC
# Description
This PR has 2 commits
1. Fix button sizes in TelemetryValuesBar
…
* In QGC 4.4.2 these buttons look fine, but in the master branch they were super squashed looking
2. Organize "Value Display" so it is more scannable
* Now it is organized with keys on the left and values/inputs on the right, making the form more intuitive and scannable for first time users.
* The design of the form is now more similar to other parts of QGC, namely the views seen in "Application Settings"
## Sponsor
This contribution was sponsored by [Firestorm](https://www.launchfirestorm.com/)
![654d4f9476ff2a38f37e9ab9_firestorm-homepage-share-img-2](https://github.com/user-attachments/assets/bc1a2c95-b33d-4a2d-af35-4d2d8651d0a2)
## Before
https://github.com/user-attachments/assets/92304f65-fdee-4206-aab8-cc6e3ed7a0cc
## After
https://github.com/user-attachments/assets/52c2dd33-761a-4f0a-8083-f2ba0afa5228
@dagar reviewed and commented, needs editing:
PX4:main
← iq-motion-control:main
opened 06:02PM - 14 Mar 24 UTC
High Level About this Pull Request
=============================
As previously… discussed with @dagar, this pull request seeks to further couple the relationship between the PX4 flight controller and [Vertiq modules](https://www.vertiq.co/). At its core, this PR introduces the IQUART serial protocol into PX4, and in doing so provides the flight controller with the ability to control and configure connected Vertiq modules
IQUART and its Clients
-------------------------
The IQUART serial protocol is built around its ability to communicate with a series of Clients and Entries available on Vertiq modules. All [IQUART messages](https://iqmotion.readthedocs.io/en/latest/intro.html) specify a target module ID, type ID, and type sub-ID. Type IDs refer to unique identification values given to each different IQUART client. Sub-IDs refer to specific entries within the client. For example, the Serial Interface Client (type ID 16) provides one entry with sub-ID 0.
![Screenshot 2024-03-07 125725](https://github.com/PX4/PX4-Autopilot/assets/120586722/6da96606-215f-450e-a10f-104fb8414fbd)
A key portion of this PR is the inclusion of [Vertiq’s C++ library](https://github.com/iq-motion-control/iq-module-communication-cpp) as a git submodule. The library provides a C++ representation of all possible Veritq clients as well as functions for packaging proper IQUART messages.
What We’ve Added to PX4
==================
Basic User Interface
------------------------
The following examples are performed using a Pixhawk 6c using the Generic Quadcopter airframe. These serve to help in understanding the structure of the backend Vertiq support.
Boardconfig Options
****************************
![Screenshot 2024-03-07 143926](https://github.com/PX4/PX4-Autopilot/assets/120586722/b16453d5-8f19-418b-8552-178ca443c01b)
![Screenshot 2024-03-07 143942](https://github.com/PX4/PX4-Autopilot/assets/120586722/c8ec0d1c-0531-4793-a254-18d5317f0b59)
![Screenshot 2024-03-07 143954](https://github.com/PX4/PX4-Autopilot/assets/120586722/ed5900ee-1796-466b-97e8-3191d7d198b6)
- Vertiq IO
Provides access to basic Vertiq module configuration through PX4 parameters. This configuration alone is not enough for flight through the IQUART protocol, but could be helpful in configuration where other protocols, such as DroneCAN, are being used to send throttle commands.
- Include IFCI Configuration Parameters
Provides access to parameters specific to the IQUART Flight Controller Interface. Enabling this configuration allows users to control a vehicle and receive telemetry from Vertiq modules through the serial port configured to vertiq_io.
- Include Pulsing Module Configuration Parameters
Provides access to specialized parameters available only for “pulsing modules.” These are modules equipped with specialized Vertiq firmware and our [Vertiq UP12 propeller](https://www.vertiq.co/up12).
Configuration with QGroundControl
*******************************************************
At the moment, the easiest way for users to interact with and configure our modules is through Vertiq’s [IQ Control Center software](https://github.com/iq-motion-control/iq-control-center). As you can imagine, having to unplug serial connections from PX4 and reconnect them to the Control Center is a laborious process. While users could add an extra serial connection to use serial passthrough, this is not always possible. Therefore, by providing module configuration functionality directly to the flight controller, we make our users’ lives much easier.
![Screenshot 2024-03-07 145720](https://github.com/PX4/PX4-Autopilot/assets/120586722/b1f1c739-0dbc-4090-968b-1848dced63c3)
After selecting a serial port
![Screenshot 2024-03-07 145812](https://github.com/PX4/PX4-Autopilot/assets/120586722/a75c649e-688a-449c-8206-7afafb1b0783)
When the matching baud rate is set, we see the module with the matching Module ID to TARGET_MODULE_ID’s parameters appear. With this configuration, those parameters are MAX_VELOCITY, MAX_VOLTS, CONTROL_MODE, THROTTLE_CVI, VERTIQ_FC_DIR, and VERTIQ_MOTOR_DIR.
The parameters that change based on the value of TARGET_MODULE_ID are those managed by the Vertiq Configuration Handler class.
Target Module ID 0
![Screenshot 2024-03-07 151858](https://github.com/PX4/PX4-Autopilot/assets/120586722/616a982e-da7a-4301-9d8e-e30033e35894)
Target Module ID 1
![Screenshot 2024-03-07 152106](https://github.com/PX4/PX4-Autopilot/assets/120586722/949deb91-e9fe-4f7a-b568-07189fd3abf8)
I did not change any values besides the TARGET_MODULE_ID, and you can see that the other Vertiq parameters were updated with values gotten from the module with ID 1.
Code Structure
------------------------
![image](https://github.com/PX4/PX4-Autopilot/assets/120586722/cfacd017-166d-4fc3-99da-ac517d287250)
Class Descriptions
*************************
Vertiq IO
- Responsible for spawning our task, and contains our run()
- Contains our updateOutputs function for motor control
- Contains 3 Vertiq Clients used as part of motor control: a Propeller Motor Control Client, an Arming Handler Client, and an IFCI - Client all set to broadcast to all connected modules
- Creates and updates all other objects used in the module
Vertiq Serial Interface
- Responsible for configuring the selected hardware serial port
- Responsible for reading data from the serial peripheral and passes it to the active Vertiq clients
- Responsible for taking data written by the active Vertiq clients, and writing out data to the serial peripheral
Vertiq Client Manager
- Can be given new Vertiq clients of any type to manage by any external object
- Manages a list of clients up to a predefined maximum amount
- Handles client communication by periodically telling the serial interface to transmit queued messages and to have each client process received data
Vertiq Configuration Handler
- Responsible for maintaining any Vertiq client objects which are created and destroyed as TARGET_MODULE_ID changes
- Responsible for managing a list of EntryWrapper objects
EntryWrappers are used to link together a PX4 parameter and a Vertiq Client’s Entry, and are covered in more detail later
Vertiq Telemetry Manager
- Responsible for maintaining an IQUART Flight Controller Interface client which gets created and destroyed as the Module ID for telemetry changes
- Responsible for generating the correct Module ID for the next module whose telemetry we want
- Responsible for publishing to the esc_status uORB topic the data received from modules
About EntryWrapper Objects
**************************************
As mentioned above, an EntryWrapper is an object meant to connect a PX4 parameter with a Vertiq Client Entry. The goal is to ensure that when an EntryWrapper’s PX4 parameter changes, that the same change is reflected on the connected motor with the module ID TARGET_MODULE_ID.
The process for updating EntryWrappers is described by the following diagrams. The top describes what happens at a higher level when any Vertiq parameter is changed, and the bottom describes the decisions made by the EntryWrapper itself during its update.
High Level
[<img src="https://github.com/PX4/PX4-Autopilot/assets/120586722/d5fb4044-4cfc-4c3d-9603-46bef27939ea" width="300"/>](https://github.com/PX4/PX4-Autopilot/assets/120586722/d5fb4044-4cfc-4c3d-9603-46bef27939ea)
Entry Wrapper
[<img src="https://github.com/PX4/PX4-Autopilot/assets/120586722/140ea73c-4ec3-4249-80bc-6db74f6bf64e" width ="300"/>](https://github.com/PX4/PX4-Autopilot/assets/120586722/140ea73c-4ec3-4249-80bc-6db74f6bf64e)
Parameters
-------------------
Different PX4 parameters become available depending on the build configuration set at the kconfig level. Any configuration listed also includes all parameters available in the configuration above it.
Vertiq IO Enabled
************************
- VERTIQ_IO_CFG
The serial port mapped to our module
- VERTIQ_BAUD
The baud rate to use on the serial port we open and manage
- TARGET_MODULE_ID
This is the module ID of the module that you would like to communicate with at the parameter level. All clients in the Vertiq Configuration Handler will be deleted and recreated with this module ID in their reinitialization
- TRIGGER_READ
A boolean parameter that allows you to refresh responses from the module with module ID TARGET_MODULE_ID
- CONTROL_MODE
This parameter is part of an EntryWrapper. This means that it acts as both a PX4 parameter and a Vertiq Client Entry. Specifically, this parameter interacts with the mode entry in the [ESC Propeller Input Parser Client](https://iqmotion.readthedocs.io/en/latest/modules/vertiq_2306_2200.html#epip-message-table)
- MAX_VELOCITY
This parameter is part of an EntryWrapper that interacts with the velocity_max entry in the [ESC Propeller Input Parser Client](https://iqmotion.readthedocs.io/en/latest/modules/vertiq_2306_2200.html#epip-message-table)
- MAX_VOLTS
This parameter is part of an EntryWrapper that interacts with the volts_max entry in the [ESC Propeller Input Parser Client](https://iqmotion.readthedocs.io/en/latest/modules/vertiq_2306_2200.html#epip-message-table)
- VERTIQ_MOTOR_DIR
This parameter is part of an EntryWrapper that interacts with the sign entry in the [ESC Propeller Input Parser Client](https://iqmotion.readthedocs.io/en/latest/modules/vertiq_2306_2200.html#epip-message-table)
- VERTIQ_FC_DIR
This parameter is part of an EntryWrapper that interacts with the flip_negative entry in the [ESC Propeller Input Parser Client](https://iqmotion.readthedocs.io/en/latest/modules/vertiq_2306_2200.html#epip-message-table)
IFCI Configuration Enabled
***********************************
- VERTIQ_NUM_CVS
The number of Control Values (discussed more [here](https://iqmotion.readthedocs.io/en/latest/manual/manual_ifci_control.html#iquart-flight-controller-interface)) that will be transmitted during each updateOutputs call
- DISARM_TRIGGER
This specifies the behavior to be used when the mixer disarms. The choices are enumerated as the following
- USER_MIXER_VALUE
Specifies that the output control values should match the value set as the mixer’s disarmed value for each ESC channel
- TRIGGER_MOTOR_DISARM
Sends an explicit disarm command to all connected motors
- COAST_MOTOR
Sends an explicit coast command to all connected motors. When coasted, Vertiq ESCs stop sending control voltages allowing the motor to spin freely
- SEND_PREDEFINED_VELOCITY
Sends an explicit [control velocity](https://iqmotion.readthedocs.io/en/latest/manual/manual_velocity_control_mechanisms.html#control-velocity) command to all connected motors
- ARMING_BEHAVE
This specifies the behavior to be used when the mixer arms. The choices are enumerated as the following
- FORCE_ARMING
Sends an explicit arm command to all connected motors
- USE_MOTOR_ARMING
Uses each of the connected modules’ [unique arming configurations](https://iqmotion.readthedocs.io/en/latest/manual/manual_advanced_arming.html) to decide its own behavior based on the output throttle
- THROTTLE_CVI
This parameter is part of an EntryWrapper that interacts with the throttle_cvi entry in the [IQUART Flight Controller Interface Client](https://iqmotion.readthedocs.io/en/latest/modules/vertiq_2306_2200.html#ifci-message-table)
- TELEM_IDS_1
This is a 32 bit bitmask with values 0-31 that allows users to easily select the module IDs from which they would like to receive telemetry. Combines with TELEM_IDS_2 to create a 64-bit bitmask of all possible Vertiq module IDs
- TELEM_IDS_2
This is a 32 bit bitmask with values 32-62 that allows users to easily select the module IDs from which they would like to receive telemetry. Combines with TELEM_IDS_1 to create a 64-bit bitmask of all possible Vertiq module IDs
Pulsing Configuration Enabled
****************************************
- PULSE_VOLT_MODE
This parameter is part of an EntryWrapper that interacts with the pulsing_voltage_mode entry in the [Pulsing Rectangular Input Parser Client](https://iqmotion.readthedocs.io/en/latest/modules/vertiq_2306_2200.html#prip-message-table)
- PULSE_VOLT_LIMIT
This parameter is part of an EntryWrapper that interacts with the pulsing_voltage_limit entry in the [Pulsing Rectangular Input Parser Client](https://iqmotion.readthedocs.io/en/latest/modules/vertiq_2306_2200.html#prip-message-table)
- X_CVI
This parameter is part of an EntryWrapper that interacts with the x_cvi entry in the [IQUART Flight Controller Interface Client](https://iqmotion.readthedocs.io/en/latest/modules/vertiq_2306_2200.html#ifci-message-table)
- Y_CVI
This parameter is part of an EntryWrapper that interacts with the y_cvi entry in the [IQUART Flight Controller Interface Client](https://iqmotion.readthedocs.io/en/latest/modules/vertiq_2306_2200.html#ifci-message-table)
- ZERO_ANGLE
This parameter is part of an EntryWrapper that interacts with the zero_angle entry in the [Voltage Superposition Client](https://iqmotion.readthedocs.io/en/latest/modules/vertiq_2306_2200.html#id350)
- VELOCITY_CUTOFF
This parameter is part of an EntryWrapper that interacts with the velocity_cutoff entry in the [Voltage Superposition Client](https://iqmotion.readthedocs.io/en/latest/modules/vertiq_2306_2200.html#id350)
- TORQUE_OFF_ANGLE
This parameter is part of an EntryWrapper that interacts with the propeller_torque_offset_angle entry in the [Voltage Superposition Client](https://iqmotion.readthedocs.io/en/latest/modules/vertiq_2306_2200.html#id350)
Telemetry
-----------------
With IFCI enabled, telemetry is requested from the Module IDs specified in the TELEM_IDS_1/2 in a round robin fashion. The data returned are described in the following struct:
![image](https://github.com/PX4/PX4-Autopilot/assets/120586722/9d34648a-88a5-461c-801a-b763c81d0ce6)
Using the response, we fill in the esc_status publication’s esc_rpm, esc_voltage, esc_current, esc_power, and esc_temperature. The esc_armed_flags and esc_online_flags are set high for each ESC after the first successfully received telemetry response from each expected motor.
Non-Pulsing Flight Configuration Example with a Pixhawk 6c
==========================================
In this example, our connected modules are set to a 921600 baud with module IDs 0, 26, 42, and 62 (configured using the [IQ Control Center software](https://github.com/iq-motion-control/iq-control-center))
1. Run boardconfig in order to turn on Vertiq IO and IFCI Configuration
2. Build and flash the firmware
3. Select Generic Quadcopter airframe and run sensor calibration
4. Set the VERTIQ_IO_CFG to TELEM 2 for this example. Save and reboot
5. Set the VERTIQ_BAUD parameter to 921600, and reboot
6. Connect the 4 modules to the Pixhawk in this configuration
![image](https://github.com/PX4/PX4-Autopilot/assets/120586722/32cd55ea-3438-4e0c-8979-b6a9e3c0f430)
7. Set VERTIQ_NUM_CVS to 4, TELEM_IDS_1 check 0 and 26, TELEM_IDS_2 check 42 and 62, and reboot
In this case, we have 4 modules connected, each of which supports only the Throttle Control Value. In order for each of the modules to receive their own unique throttle command, we must send 4 Control Values (CVs)
8. Set TARGET_MODULE_ID to 0, and set THROTTLE_CVI to 0, CONTROL_MODE to Voltage, and MAX_VOLTS to 12. Do the same to all MODULE_IDS where each CVI is one greater than the next (TARGET_MODULE_ID 26 should have THROTTLE_CVI 1)
9. Use the Identify & Assign Motors tool to configure the ESCs correctly for their position
10. Ensure that each VERTIQ_MOTOR_DIR is correct for the module’s vehicle position. If not, change it to either 2D Clockwise or 2D Counter Clockwise to make it correct
11. For this example, I want to use Send Explicit Disarm as DISARM_TRIGGER so that we can hear the disarming sound
12. Configure your Radio, and you are ready to fly
Attached to this PR as well as below are a video of a hover flight as well as the log from it using the configuration described here.
[vertiq_io_flight_sample.MOV](https://drive.google.com/file/d/1Bq7Sy9mv1MScE1xmjAtSksE275PnTUAN/view?usp=drive_link)
[Link to Log](https://drive.google.com/file/d/13eH0guxELt_3NYcMXRza0fIbWoi-up3p/view?usp=sharing)
farhang
September 17, 2024, 2:23pm
3
Added to the thread Andrew,
Have a few QGC Prs I’d like to have reviewed
mavlink:master
← gillamkid:gillamkid/tab-navigation
opened 05:54AM - 18 Sep 24 UTC
# Description
There was little to no visual indication to show which buttons wh… ere focused when TAB was pressed. I added visual queues and made so the expected inputs would be focused when pressing TAB
## Sponsor
This contribution was sponsored by [Firestorm](https://www.launchfirestorm.com/)
![654d4f9476ff2a38f37e9ab9_firestorm-homepage-share-img-2](https://github.com/user-attachments/assets/bc1a2c95-b33d-4a2d-af35-4d2d8651d0a2)
## Demo of new TAB navigating ability (Light mode)
https://github.com/user-attachments/assets/819d4375-741c-479a-9782-a0b83fa66956
## Demo of new TAB navigating ability (Dark mode)
https://github.com/user-attachments/assets/e35e2702-e30a-4f99-aa53-de54b6bc8ebf
mavlink:master
← gillamkid:gillamkid/popup-enter-key-bug
opened 06:26AM - 18 Sep 24 UTC
# Description
Fix bug with Popup enter-key handling
If the event that trig… gered a Popup to open was an enter key being pressed, the Popup would immediately close because it would handle the onRelease of the press when it should listen to the onPressed. as with typing, it is expected that key strokes have an affect on press, not on release.
## Sponsor
This contribution was sponsored by [Firestorm](https://www.launchfirestorm.com/)
![654d4f9476ff2a38f37e9ab9_firestorm-homepage-share-img-2](https://github.com/user-attachments/assets/bc1a2c95-b33d-4a2d-af35-4d2d8651d0a2)
## Before (popup that was triggered to open immediately closes)
https://github.com/user-attachments/assets/5bcdae1c-2367-4103-9d6c-c5c7c6a627c1
## After (popup that is meant to be shown is shown until exited)
@
https://github.com/user-attachments/assets/03a290da-a94c-4dac-9521-70f9dcbc9ff6
mavlink:master
← gillamkid:gillamkid/value-display-update
opened 06:52AM - 18 Sep 24 UTC
# Description
This PR has 2 commits
1. Fix button sizes in TelemetryValuesBar
…
* In QGC 4.4.2 these buttons look fine, but in the master branch they were super squashed looking
2. Organize "Value Display" so it is more scannable
* Now it is organized with keys on the left and values/inputs on the right, making the form more intuitive and scannable for first time users.
* The design of the form is now more similar to other parts of QGC, namely the views seen in "Application Settings"
## Sponsor
This contribution was sponsored by [Firestorm](https://www.launchfirestorm.com/)
![654d4f9476ff2a38f37e9ab9_firestorm-homepage-share-img-2](https://github.com/user-attachments/assets/bc1a2c95-b33d-4a2d-af35-4d2d8651d0a2)
## Before
https://github.com/user-attachments/assets/92304f65-fdee-4206-aab8-cc6e3ed7a0cc
## After
https://github.com/user-attachments/assets/52c2dd33-761a-4f0a-8083-f2ba0afa5228
1 Like
Looking for another look at the Vertiq module integration PR please:
PX4:main
← iq-motion-control:main
opened 06:02PM - 14 Mar 24 UTC
High Level About this Pull Request
=============================
As previously… discussed with @dagar, this pull request seeks to further couple the relationship between the PX4 flight controller and [Vertiq modules](https://www.vertiq.co/). At its core, this PR introduces the IQUART serial protocol into PX4, and in doing so provides the flight controller with the ability to control and configure connected Vertiq modules
IQUART and its Clients
-------------------------
The IQUART serial protocol is built around its ability to communicate with a series of Clients and Entries available on Vertiq modules. All [IQUART messages](https://iqmotion.readthedocs.io/en/latest/intro.html) specify a target module ID, type ID, and type sub-ID. Type IDs refer to unique identification values given to each different IQUART client. Sub-IDs refer to specific entries within the client. For example, the Serial Interface Client (type ID 16) provides one entry with sub-ID 0.
![Screenshot 2024-03-07 125725](https://github.com/PX4/PX4-Autopilot/assets/120586722/6da96606-215f-450e-a10f-104fb8414fbd)
A key portion of this PR is the inclusion of [Vertiq’s C++ library](https://github.com/iq-motion-control/iq-module-communication-cpp) as a git submodule. The library provides a C++ representation of all possible Veritq clients as well as functions for packaging proper IQUART messages.
What We’ve Added to PX4
==================
Basic User Interface
------------------------
The following examples are performed using a Pixhawk 6c using the Generic Quadcopter airframe. These serve to help in understanding the structure of the backend Vertiq support.
Boardconfig Options
****************************
![Screenshot 2024-03-07 143926](https://github.com/PX4/PX4-Autopilot/assets/120586722/b16453d5-8f19-418b-8552-178ca443c01b)
![Screenshot 2024-03-07 143942](https://github.com/PX4/PX4-Autopilot/assets/120586722/c8ec0d1c-0531-4793-a254-18d5317f0b59)
![Screenshot 2024-03-07 143954](https://github.com/PX4/PX4-Autopilot/assets/120586722/ed5900ee-1796-466b-97e8-3191d7d198b6)
- Vertiq IO
Provides access to basic Vertiq module configuration through PX4 parameters. This configuration alone is not enough for flight through the IQUART protocol, but could be helpful in configuration where other protocols, such as DroneCAN, are being used to send throttle commands.
- Include IFCI Configuration Parameters
Provides access to parameters specific to the IQUART Flight Controller Interface. Enabling this configuration allows users to control a vehicle and receive telemetry from Vertiq modules through the serial port configured to vertiq_io.
- Include Pulsing Module Configuration Parameters
Provides access to specialized parameters available only for “pulsing modules.” These are modules equipped with specialized Vertiq firmware and our [Vertiq UP12 propeller](https://www.vertiq.co/up12).
Configuration with QGroundControl
*******************************************************
At the moment, the easiest way for users to interact with and configure our modules is through Vertiq’s [IQ Control Center software](https://github.com/iq-motion-control/iq-control-center). As you can imagine, having to unplug serial connections from PX4 and reconnect them to the Control Center is a laborious process. While users could add an extra serial connection to use serial passthrough, this is not always possible. Therefore, by providing module configuration functionality directly to the flight controller, we make our users’ lives much easier.
![Screenshot 2024-03-07 145720](https://github.com/PX4/PX4-Autopilot/assets/120586722/b1f1c739-0dbc-4090-968b-1848dced63c3)
After selecting a serial port
![Screenshot 2024-03-07 145812](https://github.com/PX4/PX4-Autopilot/assets/120586722/a75c649e-688a-449c-8206-7afafb1b0783)
When the matching baud rate is set, we see the module with the matching Module ID to TARGET_MODULE_ID’s parameters appear. With this configuration, those parameters are MAX_VELOCITY, MAX_VOLTS, CONTROL_MODE, THROTTLE_CVI, VERTIQ_FC_DIR, and VERTIQ_MOTOR_DIR.
The parameters that change based on the value of TARGET_MODULE_ID are those managed by the Vertiq Configuration Handler class.
Target Module ID 0
![Screenshot 2024-03-07 151858](https://github.com/PX4/PX4-Autopilot/assets/120586722/616a982e-da7a-4301-9d8e-e30033e35894)
Target Module ID 1
![Screenshot 2024-03-07 152106](https://github.com/PX4/PX4-Autopilot/assets/120586722/949deb91-e9fe-4f7a-b568-07189fd3abf8)
I did not change any values besides the TARGET_MODULE_ID, and you can see that the other Vertiq parameters were updated with values gotten from the module with ID 1.
Code Structure
------------------------
![image](https://github.com/PX4/PX4-Autopilot/assets/120586722/cfacd017-166d-4fc3-99da-ac517d287250)
Class Descriptions
*************************
Vertiq IO
- Responsible for spawning our task, and contains our run()
- Contains our updateOutputs function for motor control
- Contains 3 Vertiq Clients used as part of motor control: a Propeller Motor Control Client, an Arming Handler Client, and an IFCI - Client all set to broadcast to all connected modules
- Creates and updates all other objects used in the module
Vertiq Serial Interface
- Responsible for configuring the selected hardware serial port
- Responsible for reading data from the serial peripheral and passes it to the active Vertiq clients
- Responsible for taking data written by the active Vertiq clients, and writing out data to the serial peripheral
Vertiq Client Manager
- Can be given new Vertiq clients of any type to manage by any external object
- Manages a list of clients up to a predefined maximum amount
- Handles client communication by periodically telling the serial interface to transmit queued messages and to have each client process received data
Vertiq Configuration Handler
- Responsible for maintaining any Vertiq client objects which are created and destroyed as TARGET_MODULE_ID changes
- Responsible for managing a list of EntryWrapper objects
EntryWrappers are used to link together a PX4 parameter and a Vertiq Client’s Entry, and are covered in more detail later
Vertiq Telemetry Manager
- Responsible for maintaining an IQUART Flight Controller Interface client which gets created and destroyed as the Module ID for telemetry changes
- Responsible for generating the correct Module ID for the next module whose telemetry we want
- Responsible for publishing to the esc_status uORB topic the data received from modules
About EntryWrapper Objects
**************************************
As mentioned above, an EntryWrapper is an object meant to connect a PX4 parameter with a Vertiq Client Entry. The goal is to ensure that when an EntryWrapper’s PX4 parameter changes, that the same change is reflected on the connected motor with the module ID TARGET_MODULE_ID.
The process for updating EntryWrappers is described by the following diagrams. The top describes what happens at a higher level when any Vertiq parameter is changed, and the bottom describes the decisions made by the EntryWrapper itself during its update.
High Level
[<img src="https://github.com/PX4/PX4-Autopilot/assets/120586722/d5fb4044-4cfc-4c3d-9603-46bef27939ea" width="300"/>](https://github.com/PX4/PX4-Autopilot/assets/120586722/d5fb4044-4cfc-4c3d-9603-46bef27939ea)
Entry Wrapper
[<img src="https://github.com/PX4/PX4-Autopilot/assets/120586722/140ea73c-4ec3-4249-80bc-6db74f6bf64e" width ="300"/>](https://github.com/PX4/PX4-Autopilot/assets/120586722/140ea73c-4ec3-4249-80bc-6db74f6bf64e)
Parameters
-------------------
Different PX4 parameters become available depending on the build configuration set at the kconfig level. Any configuration listed also includes all parameters available in the configuration above it.
Vertiq IO Enabled
************************
- VERTIQ_IO_CFG
The serial port mapped to our module
- VERTIQ_BAUD
The baud rate to use on the serial port we open and manage
- TARGET_MODULE_ID
This is the module ID of the module that you would like to communicate with at the parameter level. All clients in the Vertiq Configuration Handler will be deleted and recreated with this module ID in their reinitialization
- TRIGGER_READ
A boolean parameter that allows you to refresh responses from the module with module ID TARGET_MODULE_ID
- CONTROL_MODE
This parameter is part of an EntryWrapper. This means that it acts as both a PX4 parameter and a Vertiq Client Entry. Specifically, this parameter interacts with the mode entry in the [ESC Propeller Input Parser Client](https://iqmotion.readthedocs.io/en/latest/modules/vertiq_2306_2200.html#epip-message-table)
- MAX_VELOCITY
This parameter is part of an EntryWrapper that interacts with the velocity_max entry in the [ESC Propeller Input Parser Client](https://iqmotion.readthedocs.io/en/latest/modules/vertiq_2306_2200.html#epip-message-table)
- MAX_VOLTS
This parameter is part of an EntryWrapper that interacts with the volts_max entry in the [ESC Propeller Input Parser Client](https://iqmotion.readthedocs.io/en/latest/modules/vertiq_2306_2200.html#epip-message-table)
- VERTIQ_MOTOR_DIR
This parameter is part of an EntryWrapper that interacts with the sign entry in the [ESC Propeller Input Parser Client](https://iqmotion.readthedocs.io/en/latest/modules/vertiq_2306_2200.html#epip-message-table)
- VERTIQ_FC_DIR
This parameter is part of an EntryWrapper that interacts with the flip_negative entry in the [ESC Propeller Input Parser Client](https://iqmotion.readthedocs.io/en/latest/modules/vertiq_2306_2200.html#epip-message-table)
IFCI Configuration Enabled
***********************************
- VERTIQ_NUM_CVS
The number of Control Values (discussed more [here](https://iqmotion.readthedocs.io/en/latest/manual/manual_ifci_control.html#iquart-flight-controller-interface)) that will be transmitted during each updateOutputs call
- DISARM_TRIGGER
This specifies the behavior to be used when the mixer disarms. The choices are enumerated as the following
- USER_MIXER_VALUE
Specifies that the output control values should match the value set as the mixer’s disarmed value for each ESC channel
- TRIGGER_MOTOR_DISARM
Sends an explicit disarm command to all connected motors
- COAST_MOTOR
Sends an explicit coast command to all connected motors. When coasted, Vertiq ESCs stop sending control voltages allowing the motor to spin freely
- SEND_PREDEFINED_VELOCITY
Sends an explicit [control velocity](https://iqmotion.readthedocs.io/en/latest/manual/manual_velocity_control_mechanisms.html#control-velocity) command to all connected motors
- ARMING_BEHAVE
This specifies the behavior to be used when the mixer arms. The choices are enumerated as the following
- FORCE_ARMING
Sends an explicit arm command to all connected motors
- USE_MOTOR_ARMING
Uses each of the connected modules’ [unique arming configurations](https://iqmotion.readthedocs.io/en/latest/manual/manual_advanced_arming.html) to decide its own behavior based on the output throttle
- THROTTLE_CVI
This parameter is part of an EntryWrapper that interacts with the throttle_cvi entry in the [IQUART Flight Controller Interface Client](https://iqmotion.readthedocs.io/en/latest/modules/vertiq_2306_2200.html#ifci-message-table)
- TELEM_IDS_1
This is a 32 bit bitmask with values 0-31 that allows users to easily select the module IDs from which they would like to receive telemetry. Combines with TELEM_IDS_2 to create a 64-bit bitmask of all possible Vertiq module IDs
- TELEM_IDS_2
This is a 32 bit bitmask with values 32-62 that allows users to easily select the module IDs from which they would like to receive telemetry. Combines with TELEM_IDS_1 to create a 64-bit bitmask of all possible Vertiq module IDs
Pulsing Configuration Enabled
****************************************
- PULSE_VOLT_MODE
This parameter is part of an EntryWrapper that interacts with the pulsing_voltage_mode entry in the [Pulsing Rectangular Input Parser Client](https://iqmotion.readthedocs.io/en/latest/modules/vertiq_2306_2200.html#prip-message-table)
- PULSE_VOLT_LIMIT
This parameter is part of an EntryWrapper that interacts with the pulsing_voltage_limit entry in the [Pulsing Rectangular Input Parser Client](https://iqmotion.readthedocs.io/en/latest/modules/vertiq_2306_2200.html#prip-message-table)
- X_CVI
This parameter is part of an EntryWrapper that interacts with the x_cvi entry in the [IQUART Flight Controller Interface Client](https://iqmotion.readthedocs.io/en/latest/modules/vertiq_2306_2200.html#ifci-message-table)
- Y_CVI
This parameter is part of an EntryWrapper that interacts with the y_cvi entry in the [IQUART Flight Controller Interface Client](https://iqmotion.readthedocs.io/en/latest/modules/vertiq_2306_2200.html#ifci-message-table)
- ZERO_ANGLE
This parameter is part of an EntryWrapper that interacts with the zero_angle entry in the [Voltage Superposition Client](https://iqmotion.readthedocs.io/en/latest/modules/vertiq_2306_2200.html#id350)
- VELOCITY_CUTOFF
This parameter is part of an EntryWrapper that interacts with the velocity_cutoff entry in the [Voltage Superposition Client](https://iqmotion.readthedocs.io/en/latest/modules/vertiq_2306_2200.html#id350)
- TORQUE_OFF_ANGLE
This parameter is part of an EntryWrapper that interacts with the propeller_torque_offset_angle entry in the [Voltage Superposition Client](https://iqmotion.readthedocs.io/en/latest/modules/vertiq_2306_2200.html#id350)
Telemetry
-----------------
With IFCI enabled, telemetry is requested from the Module IDs specified in the TELEM_IDS_1/2 in a round robin fashion. The data returned are described in the following struct:
![image](https://github.com/PX4/PX4-Autopilot/assets/120586722/9d34648a-88a5-461c-801a-b763c81d0ce6)
Using the response, we fill in the esc_status publication’s esc_rpm, esc_voltage, esc_current, esc_power, and esc_temperature. The esc_armed_flags and esc_online_flags are set high for each ESC after the first successfully received telemetry response from each expected motor.
Non-Pulsing Flight Configuration Example with a Pixhawk 6c
==========================================
In this example, our connected modules are set to a 921600 baud with module IDs 0, 26, 42, and 62 (configured using the [IQ Control Center software](https://github.com/iq-motion-control/iq-control-center))
1. Run boardconfig in order to turn on Vertiq IO and IFCI Configuration
2. Build and flash the firmware
3. Select Generic Quadcopter airframe and run sensor calibration
4. Set the VERTIQ_IO_CFG to TELEM 2 for this example. Save and reboot
5. Set the VERTIQ_BAUD parameter to 921600, and reboot
6. Connect the 4 modules to the Pixhawk in this configuration
![image](https://github.com/PX4/PX4-Autopilot/assets/120586722/32cd55ea-3438-4e0c-8979-b6a9e3c0f430)
7. Set VERTIQ_NUM_CVS to 4, TELEM_IDS_1 check 0 and 26, TELEM_IDS_2 check 42 and 62, and reboot
In this case, we have 4 modules connected, each of which supports only the Throttle Control Value. In order for each of the modules to receive their own unique throttle command, we must send 4 Control Values (CVs)
8. Set TARGET_MODULE_ID to 0, and set THROTTLE_CVI to 0, CONTROL_MODE to Voltage, and MAX_VOLTS to 12. Do the same to all MODULE_IDS where each CVI is one greater than the next (TARGET_MODULE_ID 26 should have THROTTLE_CVI 1)
9. Use the Identify & Assign Motors tool to configure the ESCs correctly for their position
10. Ensure that each VERTIQ_MOTOR_DIR is correct for the module’s vehicle position. If not, change it to either 2D Clockwise or 2D Counter Clockwise to make it correct
11. For this example, I want to use Send Explicit Disarm as DISARM_TRIGGER so that we can hear the disarming sound
12. Configure your Radio, and you are ready to fly
Attached to this PR as well as below are a video of a hover flight as well as the log from it using the configuration described here.
[vertiq_io_flight_sample.MOV](https://drive.google.com/file/d/1Bq7Sy9mv1MScE1xmjAtSksE275PnTUAN/view?usp=drive_link)
[Link to Log](https://drive.google.com/file/d/13eH0guxELt_3NYcMXRza0fIbWoi-up3p/view?usp=sharing)
1 Like
I’m experiencing issues with transmitting telemetry from my drone to the ground control station (GCS) using Wi-Fi broadcast (ESP-NOW) while running QGC on an ASUS controller. Specifically, I encounter a “manual control lost” error both before arming and during flight, which triggers fail-safe mode mid-flight. This problem only occurs with Wi-Fi broadcast; everything works fine when telemetry is sent over an access point.
Could this issue be related to the transmission rate of joystick data? I’ve noticed that the frequency in the QGC joystick tab is stuck at 25Hz, and changing the parameter doesn’t seem to have any effect. This problem resembles the issue described here: frequent "Manual control lost" message when joystick is used in QGC · Issue #13702 · PX4/PX4-Autopilot · GitHub .
Are there any parameters I can adjust to increase the joystick data transmission rate, and would it be advisable to do so?
1 Like
rroche
September 18, 2024, 3:41pm
7
Hey @Steve_John maybe try relaxing the COM_RC_LOSS_T
parameter, start by increasing it to 1s, and go from there, but only if you don’t fly Stabilized or Acro where and can afford to have the stick input stuck at the last value for that amount of time. Thanks to @MaEtUgR @dagar for the response on the call.
farhang
September 20, 2024, 12:36pm
9
Thank you. I tagged Daniel and David on the issue. Hopefully, you can make it work.
lexaryb
November 8, 2024, 11:42am
10
Hi @Steve_John ! Tell me, did you solve this problem somehow?