How to performe simulation SITL with Gazebo using PX4 Autopilots Support from UAV Toolbox? ERROR displayed
Show older comments
First of all I'm on Ubuntu 20.04.6 LTS and MATLAB 2023a. I've installed the PX4 Autopilot Support from UAV toolbox.I'm trying to performe a SITL with the PX4 Autopilots Support from UAV Toolbox with Gazebo . I created a Simulink blank project, I added a PX4 accelerometer and I've connected it to scopes in order to see if the I/O connection is working. In the settings the only simulator available is jMAVsim there's no Gazebo, but nevermind I've tried the same to launch an I/O connection in SITL(PX4 Host target) with jMAVSIM to check if everything is working.The setup of the PX4 toolbox is the Design Flight Controller Algorithm in Simulink.
When I try to launch the I/O connection (SITL) an error is displayed:
MATLAB System block 'accelerometer_PX4/Accelerometer/PX4 uORB Read/SourceBlock' error occurred when invoking 'setupImpl' method of 'px4.internal.block.Subscriber'. The error was thrown from '
'/home/matteo/Documents/MATLAB/SupportPackages/R2023a/toolbox/target/supportpackages/px4/+px4/+internal/+block/Subscriber.p' at line 196
'/home/matteo/MATLAB/toolbox/target/codertarget/sltoolstrip/m/+codertarget/+internal/+sltoolstrip/ConnectedIOHandler.m' at line 106
'/home/matteo/MATLAB/toolbox/target/codertarget/sltoolstrip/m/+codertarget/+sltoolstrip/EmbeddedHardwareBoardContext.m' at line 493'.
Caused by:
Cannot create a communication link with the remote server. Please check the input arguments(ADDRESS and PORT) and make sure the server is running.
Additional Information: Connection refused [system:111]
How can I fix this problem?
I'm devoloping my master thesis and I have to design a costum controller and implement it on a quadcopter using PX4 Autopilot. Before doing this I have to do the SITL on Gazebo and then flash the controller on a PixHawk controller.
Accepted Answer
More Answers (0)
Categories
Find more on Guidance, Navigation, and Control in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!