how to deploy Control algorithm and Verify it in gazebo environment
4 次查看（过去 30 天）
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
- 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)
- 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?