Bug #336
closedEmulation of bidirectional rotors
Description
Hello Anthony,
Not a bug report per se. However, I am working on a controller that requires rotor velocities in both directions, and I was wondering if something could be done to let mrsim-gazebo emulate this.
So far I use rotorcraft-genom3, and seems to me it accepts the negative rotor_input without issues, but it's not clear to me if ignores the sign of direction when it communicates with the pty of mrsim-genom3, or mrsim-genom3 is agnostic to the the sign.
I would appreciate your insight on this.
Regards,
Youssef
Updated by Antonio Franchi about 3 years ago
- for a project we need to deliver a work in which we use bidirectional propellers in which we need to do simulations, simulations have to be done no later than this month (11/21)
- if it is not possible in mrsim then we need to use another simulator
- so it is very important for the project to know if this is possible/available in mrsim otherwise we need quickly to migrate to another simulator or modify the existing one in some other way
Updated by Anthony Mallet about 3 years ago
Right, there are several issues that curently prevent from inverting
the spipnning direction. The sign of the target velocity is ignored in
several places.
Thanks for the report, I will check if this can be fixed easily.
Updated by Anthony Mallet about 3 years ago
- Status changed from New to Feedback
Could you please test the last commits and report if it fixed the
issue for you?
You need libmrsim:9422b9392 and mrsim-gazebo:e5432d5c4
Updated by Youssef Aboudorra about 3 years ago
Hello Anthony,
Thanks, for your fast response.
Now the spinning velocity can be inverted along with the corresponding thrust, however this was only possible when I send the set points using set_velocity() of rotorcraft.
If I use the servo() function to rely on the rotor_input port connected to the controller component, and a switch in the spinning is commanded from the controller: all rotors stop spinning. So I think the change of spin triggers something in servo() to stop the rotors.
Appreciate your support
Updated by Anthony Mallet about 3 years ago
Thanks for testing.
When rotors stop, could you check if the servo() activity reports a
"e_rotor_failure" exception?
Since while reverting, the rotors temporarily pass through a "not
spinning" state, this might be the explanation. I'll try to find a
proper fix.
Updated by Anthony Mallet about 3 years ago
In the meatime, I attempted a fix in rotorcraft-genom3.
You might want to try the last update, at least
rotorcraft-genom3:39d9a11615. For me it seems to work (although
I don't have any suitable controller for in-depth testing).
Updated by Youssef Aboudorra about 3 years ago
Hello,
Thanks Anthony!
Now it works with the last fix. I will keep testing and if I find something strange, will report it.
P.S. I have another point regarding the max spinning velocity, but I will post in another issue to conclude this one.
Thank a lot for your support
Regards,
Youssef
Updated by Anthony Mallet about 3 years ago
- Status changed from Feedback to Closed
Good! I'm closing the issue, then.