-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
Simulated (GAZEBO) vehicle becomes unstable when trying to control a gimbal via the ActuatorControls message #12029
Comments
It seems that all offboard setpoints are ignored when the actuator setpoints are set: |
Thanks for the report @jannsta1. I think the Typhoon H480 gimbal in SITL needs some care overall. It's not really working properly in general. |
OK thanks @julianoes - if these updates are unlikely to be worked on for a while I could have a stab at them? (more than happy to leave it to the professionals if its already in the pipeline! :)). If help desired would you be able to outline any other required updates? The only other thing I've noticed while making use of the model is that the yaw control seems a bit sluggish and/or if you fly outward in a direction from the origin and then turn around and fly back to the starting point there appears to be a large steady state error. Increasing the PID gains seems to help but I also wonder if using previous imu state for the yaw setpoint could result in some drift over time. Also, from @Jaeyoung-Lim's comment above. it seems like the symptoms described by this issue are not actually contained in the gimbal controller gazebo plugin but are associated with the mavlink receiver. If this is the case then the repair might be a bit beyond me. |
I don't think anyone is currently looking into this 😞, so feel free. |
@jannsta1 Have your SITL simulation ever crashed when sending actuator setpoints? Sending actuator setpoints over mavros seem to make the SITL crash |
@Jaeyoung-Lim - it was just the vehicle that was crashing... not gazebo itself. Although I was killing the simulation fairly soon after the loss of control. Let me know if you want me to try anything in particular (e.g. send a particular message on a control group at a certain rate). I wonder if you have any suggestions on fixing the central issue? assuming you have identified the root cause (which seems reasonable), a couple of ideas spring to mind:
|
I have tried disabling the ignore flag when the For context: I am currently sending setpoint body_rates and thrust commands that make the drone follow a trajectory, while sending |
@Jaeyoung-Lim - could it be that another module is also publishing to the same actuator_controls topic at the same time? Having a look at the topic factor graph my interpretation is that the mavlink module would subscribe to actuator_controls_XX topics rather than publish to them? |
@jannsta1 Indeed, there is something resetting the gimbal control values. I made a small fix so that at least I can control the gimbal when I stream actuator setpoints at 100Hz, but this disrupts the setpoint commands for the vehicle(bodyrate and thrust) The problems that I can see are two fold.
You can see that the values are reset to 0 when the actuator_setpoints (group_mix=2) are sent at a lower rate
In both cases the body rate and thrust setpoints are sent with the same rate @julianoes Do you have any suggestions on where to look? |
Suppressing the outputs from
The pink line shows the gimbal setpoint being set continously and not being set to zero as shown in previous examples. I will clean this up and make a proper PR |
Thanks @Jaeyoung-Lim! Just a quick point, I was stopping vmount (just by appending |
@jannsta1 Thanks. You are right. Stopping |
@Jaeyoung-Lim A bit off topic but have you had other problems with running the typhoon model? As of this week, if I donwload the latest repositories and try to arm/launch the typhoon_h480 model I get messages like |
@jannsta1 have you tried |
Thanks for the idea, I probably wasn't doing make clean as often as I should. Just been through the procedure of cloning the firmware again and now if I start gazebo with |
Hang on, if you're using roslaunch, you need to do this to clean the params:
This is a known issue and really frustrating actually, see: #10686 |
Noted! But despite this I find that I can't control the typhoon_h480 model after the following Firmware commit: 43e3fc7. The previous commit 4a4d323 and prior work fine. I wonder if could confirm if you observe the same @julianoes or @Jaeyoung-Lim? |
logged bug report #12221 to document what I think might be a confounding issue. |
@jannsta1 The MountControl plugin in mavros is now merged! You can control the gimbal continuosly while controlling the vehicle offboard. |
Nice one! Will be next week before I try to integrate this but this is certainly enough to close this issue. |
The bug
Initially raised this in the sitl repo but was advised to also raise here. Simulated MAV (GAZEBO) becomes unstable when trying to control a gimbal via the ActuatorControls message (in Mavros, which in turn publishes SET_ACTUATOR_CONTROL_TARGET on mavlink). This has also been reported for LED outputs (not sure if this was also simulated or not).
To Reproduce
Steps to reproduce the behavior:
controls
field of the ActuatorControls topic).If this process is repeated with a lower publish rate (1 hz works) the vehicle remains stable.
Drone:
The text was updated successfully, but these errors were encountered: