Open woensug-choi opened 3 years ago
Hi @woensug-choi,
Thanks to you and this repo's authors for opensourcing this work on underwater glider dynamics and simulation.
Following our e-mail conversation, I wanted to ask the below questions. I'm commenting here since I believe this PR is yet to be merged to the main branch.
Do you know which dynamics equations might be introducing/using ENU convention in the script?
Before all, what would be the problem of calculating in ENU frame? The PR calculates vehicle motion and injects the position of the vehicle with setModelPose. Without gazebo's internal physics engine.
I believe I tried to follow conventions in the development note at https://www.overleaf.com/read/pqstymzccttj. @ashishraste Not sure whether you have access to the document.
Before all, what would be the problem of calculating in ENU frame? The PR calculates vehicle motion and injects the position of the vehicle with setModelPose. Without gazebo's internal physics engine.
There wouldn't be any problem if all equations of motion were in ENU frame. But this is not the case with the dynamics simulation script I believe - this is so because (kinematics, dynamics) terms like \eta
, \G(\eta)
, etc. are in NED frame, as described in the Latex document, and the translation and rotation state variables of pitch in \eta
are output in ENU frame. Would you be able to confirm/validate this if you have time?
The immediate effect I'd think would be on designing a controller which will have to keep in mind (and hence some hardcoding of signs) the negated-sign of variables like body-velocities in heave-axis v_z
or w
. So variables like angle-of-attack which would in theory be positive when a glider is diving would be negative if ENU values are produced.
Side notes/thoughts -
setModelPose(...)
function call) because the (kinematics) pose arguments provided by the script are in ENU frame.setModelPose
.What do you think?
@ashishraste I did find some mismatch with the latex on the Matlab script. And made an update and clean-up. Checking the original 3-DOF Matlab code (private) by Brian Claus who provided the CBSoct.mat
also plotted the m_pitch
with a negative sign. I am guessing that the recordings were made so. Also, the depth recording is opposite to NED since it may be recorded with the altimeter sensor. It made sense to me comparing the value of m_ballast_pumped
and m_battpos
. What do you think?
Rewrote dynamics code and it's working in 6-DOF
> Status of the previous branch and PR : Unstable, only work for 3-DOF (pitch-X-Z)
Last time, the 6-DOF dynamics calculation was coded based on Isa, 2014 Paper modified to EPIC-DAUG Glider dynamics Overleaf. HOWEVER, it only was stable for 3-DOF (only moving forward; only pitch-X-Z calculation). The background equations are verified at MATLAB, and 3-DOF hard input comparisons look promising. But not in Gazebo (in Gazebo, the force turms are applied as force input to the model with
this->link->AddRelativeForce(hydForce)
)How it's been resolved
matlab_dynamics
. Performance of the MATLAB code is shown atComparisons.png
ResetPhysicsStates()
function is called to strip off Gazebo's generic physics calculations.Quickstart UwGliderCommand
Here, you see the glider ascending and yawing at a constant angle. As it rotates, the roll is also affected as seen in the bottom left camera feed. You can also see that the rotation of the propeller graphically according to the thruster power command input.
frl_vehicle_msgs::UwGliderCommand::PITCH_CMD_BATT_POS
should be used.xacro
file https://github.com/Field-Robotics-Lab/glider_hybrid_whoi/blob/6d3a6cf6998e5cad4a4460e5b58c564262e5fbd2/glider_hybrid_whoi_description/urdf/glider_hybrid_whoi_base_kinematics.xacro#L164-L186Limitations and To-dos