Skip to content

Conversation

Siri2K
Copy link
Contributor

@Siri2K Siri2K commented Oct 9, 2025

Solved Problem

rc_mc_defaults.sh was not being generated when MC_Rate_Controller=n, thus leading to an error 512

Fixes #21248

Solution

  • Refactored ROMFS/px4fmu_common/init.d/CMakeLists.txt to force file generation

Changelog Entry

For release notes:

Feature/Bugfix #21248 

@dakejahl
Copy link
Contributor

dakejahl commented Oct 9, 2025

This adds those files to all builds, that's not what we want. Can you elucidate the issue?

@Siri2K
Copy link
Contributor Author

Siri2K commented Oct 9, 2025

@dakejahl Originally, (from when I started to last week) when I turned ff mc_rate_controller and mc_autotune_att_control. The build would failed with an error 512, becuase the simulators required rc.mc_default. When I try to locate the required file, I also noticed the error would not be limited to the just the px4_sitl file. So I adjusted the CMakelist.txt to avoid that problem

Here's the list of files that need the missing file
log.txt

@Siri2K
Copy link
Contributor Author

Siri2K commented Oct 9, 2025

Screenshot from 2025-10-09 17-49-17 This is the error I'm fixing with my fix

@dakejahl
Copy link
Contributor

dakejahl commented Oct 9, 2025

If you're using a custom build then you should use a custom airframe file. Look at the output, SYS_AUTOSTART is 10015, this means 10015_gazebo-classic_iris airframe is getting loaded.

@Siri2K
Copy link
Contributor Author

Siri2K commented Oct 9, 2025

This is the specific airframe I was using:
airframe file

But that's my specific case. The issue is that a good chunck have this line at the beginning
. ${R}etc/init.d/rc.mc_defaults

At the beginning.

@dakejahl
Copy link
Contributor

dakejahl commented Oct 9, 2025

Right, that's the airframe file for the iris in gazebo classic. If you are doing something custom you should use a custom airframe file. By removing the mc rate controller from the build this is by definition custom.
https://docs.px4.io/main/en/dev_airframes/adding_a_new_frame.html

@dakejahl dakejahl closed this Oct 9, 2025
@Siri2K
Copy link
Contributor Author

Siri2K commented Oct 9, 2025

So the issue itself, is not an actual issue. Just a error started by a custom airframe build, not the actual gazebo-classic? If that's the case, I believe you should also close #21248, since that's the original error I was trying to fix

@dakejahl
Copy link
Contributor

Correct. The issue is that you're using the airframe file for the iris, which is intended for normal use with PX4 in gazebo classic. You are removing modules, therefore customizing PX4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Gazebo exits with exit code 256 when bypassing MC_Rate_Control

2 participants