Gazebo | Ignition | Community
Ask Your Question

Georacer's profile - activity

2020-12-02 20:41:16 -0500 received badge  Famous Question (source)
2020-12-02 20:41:16 -0500 received badge  Notable Question (source)
2020-10-26 13:57:44 -0500 commented answer kinematic links use case?

My intention wasn't to use the extra link as a collision carrier, but to actually help me get its local frame state and

2020-10-26 13:38:37 -0500 received badge  Popular Question (source)
2020-10-16 10:32:58 -0500 marked best answer kinematic links use case?

Hello everybody!

I'm making some SDFs. I noticed that both the model and the link types support the <kinematic> tag.

When referring to the model, I can understand the reasoning: you want to move this model by writing velocities to its base links or to each individual joint perhaps.

But having a kinematic link doesn't work as I would expect.

Expectation: The link has no weight (since its inverse inertia is set to 0 by the ODE implementation). You cannot apply a force to it. But if you fix it to the base link (with a fixed joint) it will follow the body base link hapily.

Reality: The (child) kinematic link is fixed in place if you don't write a velocity to it. Applying a force to the base link (where the child link is attached with a fixed joint) results in no motion, because the child link prevents the whole model from moving. This sounds a bit counter productive.

Is there a good use case for a kinematic link, which you couldn't do with a kinematic model?

Thank you for your time!

2020-10-15 15:41:38 -0500 commented answer kinematic links use case?

So you're using them with a free ball joint. Great use case! "What you expect is easily made exactly as you describe --

2020-10-15 09:49:25 -0500 asked a question kinematic links use case?

kinematic links use case? Hello everybody! I'm making some SDFs. I noticed that both the model and the link types suppo

2018-11-15 11:38:09 -0500 received badge  Famous Question (source)
2018-11-15 05:39:29 -0500 commented answer Joint and link plugins: do they really exist?

Did the PR: https://bitbucket.org/osrf/gazebo_tutorials/pull-requests/523/re-wrote-the-instructions-to-specify/diff

2018-11-14 14:04:09 -0500 received badge  Notable Question (source)
2018-11-14 12:59:49 -0500 commented answer Joint and link plugins: do they really exist?

Thank you for your answer! Indeed, I checked again at the SDF documentation and there is no plugin tag for Link nor for

2018-11-14 12:56:05 -0500 marked best answer Joint and link plugins: do they really exist?

Hello everyone!

My intention is to write a plugin that will be attached directly to a link or joint, not to the model, in order to apply a force or torque.

I see in this tutorial (http://gazebosim.org/tutorials?tut=ro...) that the gazebo tag can accept the reference argument, which can be pointed to the link or joint of choice.

However, it is not clear to me what this reference is or where it is accessed by the plugin code.

The standard Load() function of the ModelPlugin accepts as arguments a ModelPtr _model and a SDFElement _sdf (for the sdf structure of the plugin tag/environment itself).

How will I go about obtaining the reference link/joint directly?

P.S. I know that I could pass a link_name argument in the plugin and get that from the plugin code, from the _sdf->GetElement("link_name"), but this doesn't take advantage of the reference tag.

Thank you in advance, George

edit: Fixed link to point to the correct internal link

2018-11-14 09:35:59 -0500 received badge  Popular Question (source)
2018-11-14 09:24:02 -0500 commented answer Joint and link plugins: do they really exist?

I've examined the API and examples dozens of times. The actual question is if this information on passing link and joint

2018-11-14 09:22:08 -0500 edited question Joint and link plugins: do they really exist?

Joint and link plugins: do they really exist? Hello everyone! My intention is to write a plugin that will be attached d

2018-11-14 09:21:05 -0500 edited question Joint and link plugins: do they really exist?

Joint and link plugins: do they really exist? Hello everyone! My intention is to write a plugin that will be attached d

2018-11-14 08:51:02 -0500 asked a question Joint and link plugins: do they really exist?

Joint and link plugins: do they really exist? Hello everyone! My intention is to write a plugin that will be attached d

2016-12-02 07:16:55 -0500 received badge  Student (source)
2016-12-02 07:16:49 -0500 received badge  Famous Question (source)
2016-12-02 07:16:49 -0500 received badge  Notable Question (source)
2016-12-02 07:16:49 -0500 received badge  Popular Question (source)
2016-11-03 02:42:39 -0500 received badge  Famous Question (source)
2016-09-25 05:16:42 -0500 received badge  Notable Question (source)
2016-09-05 13:11:57 -0500 asked a question AddRelativeForce doesn't work with Bullet engine

I have written a plugin communicating with ROS, which subscribes to a "wrench" topic and uses link->AddRelativeForce() to apply the force to the link.

While it works ok with the ODE engine, it doesn't seem to work with Bullet. The body simply doesn't move. link->AddForce() doesn't work either.

In contrast, link->SetForce() seems to work fine.

Am I missing something here?

I don't have a bitbucket account to submit a bug report, so here is the next best place for me.

2016-09-05 03:12:19 -0500 received badge  Popular Question (source)
2016-09-05 02:27:34 -0500 answered a question Uncontrollable robot with bullet physics (works ok with ode)

I have the same problem. My model responds fine with ODE but doesn't respond to API-set force and torques.

Test: I run an empty world with gazebo -e bullet and place any object on the scene, say the Coke can.

Then I right-click->apply force-torque and set any force. The model never moves.

EDIT:

Clarification: Running on Gazebo 7 installed from ROS Kinetic, from precompiled binaries. Does anyone know if Bullet still needs Gazebo compilation from source?

EDIT 2:

According to this Bullet is included in the current Gazebo binary.

EDIT 3:

I don't know which method the hector_quadrotor plugins use to move the model, but if they use AddRelativeForce or AddForce, then it may have to do with this

2016-09-04 22:35:55 -0500 received badge  Teacher (source)
2016-09-04 06:29:21 -0500 answered a question member of one class pointing to member of another class

You are slightly confused: SetVelocityPID() is a member function of JointControllerclass, as seen on the API: http://osrf-distributions.s3.amazonaw...

2016-09-03 02:44:15 -0500 received badge  Enthusiast
2016-09-02 06:49:08 -0500 received badge  Editor (source)
2016-09-02 06:32:28 -0500 received badge  Supporter (source)
2016-09-02 05:42:45 -0500 asked a question Oscillations in simulated acceleration

Hello everyone,

I am writing some custom aerodynamics plugins and I want to query Gazebo for the linear acceleration (among others).

I have placed this code inside one of my plugins, similar to libgazebo_ros_imu:

  common::Time cur_time = this->world->GetSimTime();
  double dt = this->last_time.Double() - cur_time.Double();
  if (dt != 0)
  {
    tempVect = (this->last_velLin - this->model->GetWorldLinearVel())/dt;
    ignition::math::Vector3d gravity(this->world->Gravity()); // Read gravity acceleration in inertial frame
    tempVect = tempVect - math::Vector3(gravity.X(), gravity.Y(), gravity.Z()); // Subtract gravity
    tempVect = this->modelPose.rot*tempVect; // Rotate acceleration to body frame
    this->modelState.acceleration.linear.x = tempVect.x;
    this->modelState.acceleration.linear.y = tempVect.y;
    this->modelState.acceleration.linear.z = tempVect.z;

    this->last_velLin = this->model->GetWorldLinearVel();
    this->last_time = cur_time;
  }

  this->rosPub.publish(this->modelState);

However, the output of the simulation, e.g. on the z-axis is: image description

There is a 10m/s^2 oscillation around the real value.

I noticed that increasing the simulation step size doesn't solve the problem. Increasing physics CFM value makes the spikes less frequent but of the same amplitude.

There are some related questions here and here

I should note that, despite what is said in the first link, the output of GetWorldLinearAcc() is exactly the same as differentiating the linear velocity.

Glad to provide more details on request, thanks in advance!

EDIT: Switched to Bullet engine. The acceleration trajectory is by far better (although the overall situation is by far worse), since its API seems broken: image description

EDIT 2:

I tried various bodies, with the IMU sensor attached onto them. For testing purposes, I monitored the z-axis, with the following IMU noise profile:

<z>
    <noise type="gaussian">
        <mean>0.0</mean>
        <stddev>0.0</stddev>
        <bias_mean>0.0</bias_mean>
        <bias_stddev>0.000</bias_stddev>
    </noise>
</z>

It seems that the heavier a body is, the more erratic is the calculated acceleration.

  • The coke_can registers about a_z=9.87+-0.03m/s^2
  • A 0.1kg "noisy_imy" model registers about a_z=9.79m/s^2 with sparse 0.08m/s^2 spikes
  • A 1kg "noisy_imy" model registers about a_z=9.75+-0.25m/s^2, sometimes peaking to 0m/s^2

Gravity is set to the default 9.8m/s^2

2015-12-15 07:41:29 -0500 received badge  Famous Question (source)
2015-12-07 23:38:08 -0500 received badge  Notable Question (source)