Home        Store        Learn        Blog

Yaw rotation speed in Gazebo

Hello.
I have a problem with my Gazebo+SITL environment.
I am building an experimental environment using “bluerov_ros_playground” created by Patrick José Pereira.
Thankfully, I was able to replicate the actual machine for moving forward, translating, and levitating. (The reproducibility is amazing!)
From here, we had a problem with yaw.
In the actual machine, at PWM1700, the yaw rotation speed was about 0.79 rad/s.
However, in the Gazebo environment, at PWM1700, the yaw rotation speed was about 0.16 rad/s.
It turns out there is a big difference in rotation speed.
To solve this problem, I set ACRO_YAW_P to 10, but there was no significant change in the yaw speed.
To all who are knowledgeable, please let me know how to speed up the yaw rotation speed in the Gazebo environment.
Any advice would be appreciated.

Hi @cymal6,

I unfortunately haven’t used the bluerov_ros_playground, and don’t have much experience with Gazebo or SITL either, so am not of much help here. I’ve asked our software team internally, and you should hopefully get a response in the next couple of days :slight_smile:

By the way, I’ve updated your title to be a bit shorter, so it’s easier to find it in searches later.

Hi @EliotBR .
I’m glad that you asked the question to your in-house software team. I hope you get an answer, even if it’s just a reference.

Thanks for changing the title, it helped me to narrow down what I wanted to ask.
Thank you for your time.

1 Like

Hi @cymal6,

I’m glad that you have it working and I hope that it can be helpful for you.

For this problem, I would recommend to edit the .xacro files or .sdf files that you are using.
Sadly I don’t have a ROS environment here and the project was created a long time ago.
For the xacro files, I believe that you should check the thruster/effort values.
For the sdf files, I would recommend to check the ArduPilot plugin configuration:

And the freebuoyancy_gazebo configuration:

I hope that helps!

1 Like

Hello @patrickelectric
Thanks for answering.
I will review the part you gave me.
Let me ask an additional question.
I am using sdf for the ROV Gazebo environment.
Can the wrong coefficients (e.g. compensation, etc.) that I enter into libfreebuoyancy_gazebo.so or libArduPilotPlugin.so cause the yaw to be slow?
I’ve just recently started, so it’s trial and error.

        <buoyancy>
          <compensation>0.25</compensation>
          <origin xyz= "-0.12585 0.111 0.1789"/>
          <limit radius="5"/>
        </buoyancy>

Continuing the discussion from Yaw rotation speed in Gazebo:

I forgot to add the libArduPilotPlugin.so part.
Sorry about that.
The following is the coefficient part, and only 0 channel is displayed.

    <plugin name="ArduPilotPlugin" filename="libArduPilotPlugin.so">
      <fdm_addr>127.0.0.1</fdm_addr>
      <fdm_port_in>9002</fdm_port_in>
      <fdm_port_out>9003</fdm_port_out>
      <imuName>BlueRov2::base_link::imu_sensor</imuName>
      <connectionTimeoutMaxCount>5</connectionTimeoutMaxCount>


        <control channel="0">
          <type>EFFORT</type>
          <offset>-0.5</offset>
          <p_gain>1</p_gain>
          <i_gain>0</i_gain>
          <d_gain>0</d_gain>
          <i_max>0</i_max>
          <i_min>0</i_min>
          <cmd_max>51</cmd_max>
          <cmd_min>-40</cmd_min>
          <linkName>BlueRov2::thruster1</linkName>
          <multiplier>102</multiplier>
        </control>

Hi @patrickelectric
Thanks to your advice, I’m on the verge of solving my problem.
Thank you!

Hi @cymal6,

I’m glad that you are finding your way to fix such problem!
If possible, please share your corrections in a pull request.

Let me know if you have questions.