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
add ability to disable board sensors #18550
base: main
Are you sure you want to change the base?
Conversation
In general I'd like This is also related. #18332 |
You persuaded me. So, is it suitable to add a new parameter, lets say |
This sounds useful to me for more than just HITL. I nice clean way to opt out of starting all physical sensors without destroying the individual configuration. We could also try to use it for serial driver startup. #18332 |
I've added
I didn't get how board sensors (to prevent possible misunderstanding, by |
@dagar Hi, could you check this again? |
… sensor without running hil modules
6beabdf
to
4e07273
Compare
Describe problem solved by this pull request
For HITL simulators it is necessary to disable board sensors. At that moment using
SYS_HITL=1
parameter you may do it, but it will also set output mode, sensors and commander to the hitl mode that is not what we need for non mavlink based hitl simulators such as uavcan hitl in my case.Below is how it works now:
It would be nice to have some way to simply disable all board sensors without additional actions.
Describe your solution
By this PR I would like to start a discussion about extending
SYS_HITL
params possible states. As an example it might beDISABLE_BOARD_SENSORS
, butUAVCAN_HITL
is suitable as well.Here I simply modified the rcS file by adding the new possible state handler.
Describe possible alternatives
I have not discussed with anybody about possible ways to disable board sensors, so it is possible that I missed more easier way to do it. If so, I would appreciate if somebody notice this way. Before adding this state I used to manually comment corresponded board file to disable all sensors, but it was clearly not the way how it may work with clean PX4.
Test data / coverage
Here is an example of flight with uavcan hitl simulator: https://review.px4.io/plot_app?log=baefe706-04b8-4fca-8564-5ed1a981d5e9 with SYS_HITL=3.