long is a 32-bit signed integer, which means the maximum it will hold is 0x7FFFFFFF.
strtol is overflowing, resulting in clamping the value to LONG_MAX (or 0x7FFFFFFF) and returns that instead.
Fixes by using strtoul, which corrects the returned value.
Can be tested by building a UAVCAN Node on the tag v1.16.1, flashing and checking the value displayed in dronecan_gui_tool. Screenshot added for convenience.
Fix return value bug in px4_task_spawn_internal returning the arg-parsing
loop variable instead of the task index. Add pthread_attr_destroy calls
to prevent resource leaks on task creation failure, deletion, and exit.
Fix race condition in px4_task_delete by unlocking the mutex before
pthread_join and properly joining after pthread_cancel. Fix mutex unlock
placement in px4_task_exit to only unlock when the mutex was acquired.
Protobuf-generated code in gz_msgs triggers -Wdouble-promotion warnings
from the Abseil library. Since this is external code we cannot modify,
disable the warning for this specific target.
Fixes#26533
* removed commented out parts
* changed the height controller to work in Altitude mode and moved the controller to the uuv_pos_control.hpp instead of uuv_att_control.hpp
* Updated format changes etc. Removed one parameter, that is not used anymore(UUV_HGT_MODE) added my correct email
* added a rotation to the thrust, that with different roll and pitch values, x y z thrust is still working as if roll/pitch is zero.
* fixed constant roll/pitch to be 0.0 again
* added parameter for maximum distance between controlled des height and current height.
Added state observation to reset the desired height to current height when altitude mode is turned on.
* added first short descriptions of manual modes.
* update descriptions
* removed vector dependency
* feat: updated gz submodule
* fix: newline
* fix: gz submodule
---------
Co-authored-by: Pedro Roque <roque@caltech.edu>
Fix generate_msg_docs.py IndexError when a .msg file declares a single
topic that does not match the camel_to_snake default (e.g.
AuxGlobalPosition.msg). The error message referenced self.topics[1]
(out of bounds) instead of self.topics[0].
Fix camel_to_snake() regex to correctly convert names like
"AuxGlobalPosition" to "aux_global_position". The previous regex
produced "aux_globalposition" because it failed to insert an underscore
between a lowercase letter and an uppercase letter mid-word.
Also remove stderr redirection (2>&1) from all make targets in
metadata_sync.sh so that errors are visible in CI logs even in
non-verbose mode, making failures easier to diagnose.
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
Refactor auxiliary global position fusion to support multiple AGP
sources. Add AgpSourceControl manager class that routes AGP messages
to the correct AgpSource instance based on configured source IDs.
Only instantiate AgpSource slots that have a configured ID on boot.
Move AGP subscriptions to manager class for correct message routing.
When switching modes, navigator resets the position setpoint triplet to
idle. In the case of entering RTL, it is not replaced immediately by the
correct triplet, but published once and only corrected a split second
later. This causes zero thrust to come from control_idle in
FixedWingModeManager
Fix by calling run(true) on the appropriate sub-mode at the end of
RTL::on_activation(), same as in the on_active just below.
The submode is in inactive at that point, but run(true) triggers:
- on_activation of the submode
- set_rtl_item, which calls:
- mission_item_to_position_setpoint
- _navigator->set_position_setpoint_triplet_updated
and therefore the navigator publishes the position setpoint triplet
immediately (which was already being correctly set).
Navigator: RTL: also update subs on actiavation
Navigator: RTL: also disable mission RTL if direct RTL
matching the logic in on_active exactly