how to deploy Control algorithm and Verify it in gazebo environment

10 次查看(过去 30 天)
Hello,
I am trying to deploy my controller algorithm in px4 software and verify it in gazebo environment.
I know that PX4_SITL communicates via UDP with jMAVSIM or Gazebo, so after I deploy my control algorithm(using build button), I execute
make px4_sitl_nolockstep gazebo
And I can verify that I can deploy it. Below is my test deploy simulink model and I can verify it is properly operate when execute it in gazebo environment.
However, When I try to execute my control algorithm, It doesn't work.
The reason I am suspecting is that uORB read part in simulink file. It seems reading topic is not done appropriately and cannot generate control signal.
The Question is, is there a Debug method to check whether my controller algorithm is working appropriately or not in gazebo environment?
Below are my trials
  1. Use Monitor and Tune to see signal information where the problem occurs. However, It seems monitor and tune doesn't support gazebo simulation. (By the way, even in jmavsim, time pollout error occured)
  2. Use Ros Toolbox to connect Gazebo and Simulink to see the joint velocity(motor). However, this is very limited because I can see only joint velocity value and cannot see any signal information ahead of it.
I already verify my controller algorithm in simulink environment by making simulink plant model and simulink controller.
So what I am trying to do now is verify it in gazebo environment.
In short, Is there any method I can debug my controller algorithm in gazebo environment?
Thank you.
  2 个评论
Manoj Velmurugan
Manoj Velmurugan 2023-4-17
You could try using the listener command (in SITL command window) to know if the topic is published in the first place.
listener <uorb_topic name>

请先登录,再进行评论。

回答(0 个)

产品


版本

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by