"Exceeded maximum number of file descriptors" error while running Quadcopter​_Controlle​rWithNavig​ation model in SITL

1 次查看(过去 30 天)
I am getting this error in NSH shell while running Quadcopter_ControllerWithNavigation model in SITL mode
ERROR [uORB] vehicle_global_position advertise failed (5)
WARN [cdev] : exceeded maximum number of file descriptors, accesing /obj/vehicle_status0

采纳的回答

Manoj Velmurugan
Manoj Velmurugan 2022-12-14
PX4 PWM Output block was not releasing file descriptors correctly during the disarmed state in SITL mode. Hence it was exhausting all the available file descriptors and causing this issue.
As a workaround,
locate and open the support package root folder using the following command,
>>matlabshared.supportpkg.getSupportPackageRoot
Navigate to toolbox\target\supportpackages\px4\src folder and open MW_PX4_PWM.cpp
After the line 306,
orb_publish(ORB_ID(vehicle_status), vehicle_status_pub, &arm_vehicle_stat);
insert the following line,
orb_unsubscribe(vehicle_status_fd);
Redeploy the model from Simulink.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Event Functions 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by