Closed freezeLUO closed 4 months ago
Here is an example:
const float duration = 0.01;
vector<float> control_input{ -0.1f, -0.1f, -0.1f, -0.1f, 0.0, 0.0, 0.0, 0.0 };
while (true) {
client.moveByMotorPWMsAsync( control_input, duration);
}
The first four entries in the control_input vector controls the four vertical thrusters in the bluerov2 model. You just need to reverse the sign.
control_input{ 0.1f, 0.1f, 0.1f, 0.1f, 0.0, 0.0, 0.0, 0.0 } can raise ROV ,but control_input{ -0.1f, -0.1f, -0.1f, -0.1f, 0.0, 0.0, 0.0, 0.0 } will not bring ROV down in my test.
do you have the most recent version? There has been slight modification sometime ago that fixed this issue. Try to pull the latest version and rebuild.
Check that the file here: AirLib/include/vehicles/rov/RotorActuator.hpp
have this line of code correct: control_signal_filter_.setInput(Utils::clip(control_signal, -1.0f, 1.0f));
this line of code is correct in my RotorActuator.hpp
Hmmm, maybe you are using an old build? can you try clean and rebuilding? If it doesn't work, maybe it's reading the file from the multirotor files of airsim, so try to change the same line of code in this file:
AirLib\include\vehicles\multirotor\RotorActuator.hpp
OK,I will have a try...
Hello, I have rebuild this project. When I run HelloROV with x64, I meet a problem (LNK1104 cannot open file “xxxxx\UNav-Sim\AirLib\lib\Win32\Debug\AirLib.lib”),I find that this file(AirLib.lib) is not generated in this directory, insteadly, there is a AirLib.lib in generated x64\Debug.
I hope the first issue is resolved.
Yes the example was not finished yet and the build system was not implemented. Please pull the latest version of UNavSim.
I have updated it. Its a simple P-Controller for the Bluerov. Feel free to try it out.
Thank you,the first issue has been resolved!
Thanks for letting us know! Glad it's sorted.
Question
What's your question?
When controlling the motion of the ROV using API(moveByMotorPWMsAsync) to manipulate the PWM of the motors, how should I reverse the motors to control the descent of the ROV?