-
Notifications
You must be signed in to change notification settings - Fork 13.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SITL: unify all init scripts #10222
SITL: unify all init scripts #10222
Conversation
Tangential comment, but the POSIX shell stuff seems to have broken mixer loading on external SITL setups (e.g when launching PX4 via roslaunch). |
7113583
to
7c0743b
Compare
Great! ShellCheck was already on my list for CI. It's small enough we can add it to px4io/px4-dev-base. https://github.com/PX4/containers/blob/master/docker/px4-dev/Dockerfile_base Killing off the other fake posix_sitl builds (posix_sitl_{ekf2, lpe, inav, etc}) would also be nice. |
@@ -0,0 +1,30 @@ | |||
#!nsh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could use #!sh
everywhere.
I don't know why we don't currently have a /bin/
in NuttX.
@mhkabir let's get something simple with roslaunch in the CI system. Likewise for building PX4 in a catkin workspace. This has to be the minimum bar for support. |
Yes I have that on the list for one of the next iterations. |
8dd5ff3
to
06b182e
Compare
I updated the NuttX submodule, should be good to go/review. |
The command is now: 'make posix none_shell' which means: don't start a simulator and run a minimal shell only.
Use 'if ! <cmd>' instead.
RC input is now handled via rc_input module
This also removes the HIGHRES_IMU mavlink stream to the GCS. I don't see why it's needed and it adds noticeable CPU load.
This info is on the dev-guide now
Use './Tools/run-shellcheck.sh ROMFS/px4fmu_common' to run it.
…ly enumerating them
Rebased on master to fit into px4fmu-v2. |
06b182e
to
20b957b
Compare
This combines all SITL startup scripts into a common rcS file with separate autostart files for each model using the same structure as we have on NuttX. The
rc.vehicle_setup
from NuttX is now also used in SITL, which starts all vehicle type-specific apps and loads the mixer. So a considerable portion of the scripts is now shared.Bash does not allow empty 'if then else' clauses, so I added 'if ! ' support for NuttX and changed all existing occurrences.
I tested all the models with gazebo (rover doesn't seem to work, but it does not on master either).
Mutli-vehicle simulation works now generically.
This depends on PX4/NuttX-apps#2.
It's probably best to review commit by commit.
Note that LPE needs to be selected with
export PX4_ESTIMATOR=lpe
now.@hamishwillee docs will follow.
Script testing
I found ShellCheck, a static analyzer for (bash) scripts. I added a script to run it, and we should add it to CI via:
It will test the NuttX scripts as well.