1

Hello I have some problem using Gazebo AddRelativeForce() function.

I make Some airplane, and has 12 links.

So. I set force each link through ROS command.

Look this pic.

enter image description here

you can see 12 links

In this case, I apply force just 1 Link at position of 1 o'clock motor

I think airplane is left rolling and Nose up motion.

but motion look like this video. enter link description here

My plugin code is

public: void SetForce_C2(const double &_forceC2)
{
    this->link2->AddRelativeForce({0,0,_forceC2});
}

public: void SetForce_C3(const double &_forceC3)
{
    this->link3->AddRelativeForce({0,0,_forceC3});
}

public: void SetForce_C4(const double &_forceC4)
{
    this->link4->AddRelativeForce({0,0,_forceC4});
}
    this->link2 = model->GetLinks()[2];
    this->link3 = model->GetLinks()[3];
    this->link4 = model->GetLinks()[4];

private:
    physics::LinkPtr link2;

private:
    physics::LinkPtr link3;

private:
    physics::LinkPtr link4;

I think code is correct.

I want to motion correct, that apply force just 1 Link at position of 1 o'clock motor

and than airplane motion is rolling and nose up

I think gazebo is not calculate moment of inertia and apply to airplane.

if is correct, should i calculate moment of inertia force and apply myself?

Ps. Airplane body inertia and mass is

<mass>5315.4</mass>
    <inertia>
      <ixx>34198</ixx>
      <ixy>-0.08385</ixy>
      <ixz>-1.56572</ixz>
      <iyy>49580</iyy>
      <iyz>3959.2</iyz>
      <izz>77842</izz>
    </inertia>

enter image description here

Ps2. joint axis of Z is Up enter image description here

0 Answers0