BTW, if you are using the open pull request, I guess you reverted the faulty
commits at the end, which were done automatically by verifying the suggestions
I wrote in the discussion (which were meant to be like pseudo code only, but
then they were commited). I guess so, otherwise it probably wouldn't be
compiling...
I have so little time at hand that I still wasn't able to fix the PR myself. I
will try to do this on the weekend, it's long overdue ;)

---

All reactions


OK, actually I now realize that the mass of the disc will matter, because it
will rotate as the ball falls. The moment of inertia should then be... the
same? Or shouldn't it be greater, taking the attached ball into account?
Shouldn't I need the know the length of the string to calculate a new moment
of inertia?


** WARNING ** : This documentation is for Gazebo-classic, which has been
superseded by Gazebo. [ Click here to see the documentation for the latest
Gazebo release ](https://gazebosim.org/docs)


information.  More...

using  |  [ Scene
](namespaceignition_1_1gazebo_1_1components.html#ae140b2511ab1ae7f13da83718932277b)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) <
sdf::Scene, class SceneTag, [ serializers::SceneSerializer
](namespaceignition_1_1gazebo_1_1serializers.html#a9cf98d87ce8737d589472da92b26f9f7)
>
|  This component holds scene properties of the world.  More...

using  |  [ SelfCollide
](namespaceignition_1_1gazebo_1_1components.html#a89fe93bb88309d7b395f6f78e6370d06)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) <
bool, class SelfCollideTag >
|  A component used to hold a model's self collide property.  More...

using  |  [ Sensor
](namespaceignition_1_1gazebo_1_1components.html#ae2d25e3054c34c5737e140572d8db146)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
NoData
](namespaceignition_1_1gazebo_1_1components.html#a1bc8946395bec54053d52820e79c5ad3)
, class SensorTag >
|  A component that identifies an entity as being a link.  More...

using  |  [ SlipComplianceCmd
](namespaceignition_1_1gazebo_1_1components.html#aa1dd4ff5d4c154f728c465d49b41a2fd)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
std::vector ](http://en.cppreference.com/w/cpp/container/vector.html) < double
>, class SlipComplianceCmdTag >
|  A component type that contains the slip compliance parameters to be set on
a collision. The 0 and 1 index values correspond to the slip compliance
parameters in friction direction 1 (fdir1) and friction direction 2 (fdir2)
respectively.  More...

using  |  [ SourceFilePath
](namespaceignition_1_1gazebo_1_1components.html#a43e542c813fb1fa3a30db7fc2ecca6df)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
std::string ](http://en.cppreference.com/w/cpp/string/basic_string.html) ,
class SourceFilePathTag, [ serializers::StringSerializer
](classignition_1_1gazebo_1_1serializers_1_1StringSerializer.html) >


* [ Engineering Homework Help ](https://www.physicsforums.com/forums/engineering-and-comp-sci-homework-help.158/)


**Disadvantages**


* Oct 22, 2014


##  ◆  ThermalCamera


[ haruspex  ](/members/haruspex.334404/)


[
![@JenniferBuehler](https://avatars.githubusercontent.com/u/12842634?s=80&u=c4f3910a93a4f048638fcf101ad78f41d509d516&v=4)
](/JenniferBuehler)


Query


Next step would be to look up in the Gazebo code how exactly the velocity of
Links is updated. I can't remember exactly how it worked, but a look at the
code will tell the truth ;)


= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
math::Vector3d
](https://ignitionrobotics.org/api/math/6.8/namespaceignition_1_1math.html#a1f05093f5ee1a9ecdd54476792e4c206)
, class LinearAccelerationTag >
|  A component type that contains linear acceleration of an entity represented
by [ ignition::math::Vector3d
](https://ignitionrobotics.org/api/math/6.8/namespaceignition_1_1math.html#a1f05093f5ee1a9ecdd54476792e4c206)
.  More...

using  |  [ LinearVelocity
](namespaceignition_1_1gazebo_1_1components.html#afd2bd1db481a4000cd85efe241bbf60a)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
math::Vector3d
](https://ignitionrobotics.org/api/math/6.8/namespaceignition_1_1math.html#a1f05093f5ee1a9ecdd54476792e4c206)
, class LinearVelocityTag >
|  A component type that contains linear velocity of an entity represented by
[ ignition::math::Vector3d
](https://ignitionrobotics.org/api/math/6.8/namespaceignition_1_1math.html#a1f05093f5ee1a9ecdd54476792e4c206)
.  More...

using  |  [ LinearVelocityCmd
](namespaceignition_1_1gazebo_1_1components.html#a2fa067cac436d9da4a28f0120a68304e)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
math::Vector3d
](https://ignitionrobotics.org/api/math/6.8/namespaceignition_1_1math.html#a1f05093f5ee1a9ecdd54476792e4c206)
, class LinearVelocityCmdTag >
using  |  [ LinearVelocitySeed
](namespaceignition_1_1gazebo_1_1components.html#a6fa8a24c63fd884ae1d23c310a3d1f59)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
math::Vector3d
](https://ignitionrobotics.org/api/math/6.8/namespaceignition_1_1math.html#a1f05093f5ee1a9ecdd54476792e4c206)
, class LinearVelocitySeedTag >
|  A component type that contains linear velocity seed of an entity expressed
in the local frame of the entity and represented by [ ignition::math::Vector3d
](https://ignitionrobotics.org/api/math/6.8/namespaceignition_1_1math.html#a1f05093f5ee1a9ecdd54476792e4c206)
. This seed can used to generate linear velocities by applying transformations
and adding noise.  More...

using  |  [ Link
](namespaceignition_1_1gazebo_1_1components.html#a99d30a3ccb7f52c618da092d2cd548a6)


  * __
  * #1


[ Back ](/tutorials?cat=)


##  ◆  Link


2 participants


            this->revoluteJoint->SetName(
                model->GetName() + "__perfect_vel_ang_joint__");
            math::Pose revoluteJointOrigin;
            this->revoluteJoint->Load(this->phantomLink, _link,
                revoluteJointOrigin);
            this->revoluteJoint->Init();
            double angularMagnitude = _angularVel.GetLength();
            this->revoluteJoint->SetAxis(0, _angularVel.Normalize());
            this->revoluteJoint->SetParam("fmax", 0, _maxTorque);
            this->revoluteJoint->SetParam("vel", 0, angularMagnitude);


By Solution


* Oct 21, 2014


  * __
  * #3


= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
NoData
](namespaceignition_1_1gazebo_1_1components.html#a1bc8946395bec54053d52820e79c5ad3)
, class WorldTag >
|  A component that identifies an entity as being a world.  More...

using  |  [ WorldPoseCmd
](namespaceignition_1_1gazebo_1_1components.html#adc6f422d53a4e1cea006d85596fd66bd)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
math::Pose3d
](https://ignitionrobotics.org/api/math/6.8/namespaceignition_1_1math.html#a507d73d4a494a03691fb87691dd07215)
, class WorldPoseCmdTag >
|  A component type that contains commanded pose of an entity in the world
frame represented by [ ignition::math::Pose3d
](https://ignitionrobotics.org/api/math/6.8/namespaceignition_1_1math.html#a507d73d4a494a03691fb87691dd07215)
.  More...

##  Functions

---
|  [ IGN_GAZEBO_REGISTER_COMPONENT
](namespaceignition_1_1gazebo_1_1components.html#a0a2d037c5cc3f0e252be6b7b8c812b0c)
("ign_gazebo_components.VisibilityFlags", VisibilityFlags) using
VisibilityMask
|  This component holds an entity's visibility mask (camera sensor entities)
More...

|  [ IGN_GAZEBO_REGISTER_COMPONENT
](namespaceignition_1_1gazebo_1_1components.html#a42863429bbf525a01e7808b3de63b71a)
("ign_gazebo_components.World", World) using WorldSdf
|  A component that holds the world's SDF DOM.  More...

|  [ IGN_GAZEBO_REGISTER_COMPONENT
](namespaceignition_1_1gazebo_1_1components.html#a043b6a69fba86930464716ae10f92f7b)
("ign_gazebo_components.Level", Level) using DefaultLevel
|  This component identifies an entity as being a default level.  More...

|  [ IGN_GAZEBO_REGISTER_COMPONENT
](namespaceignition_1_1gazebo_1_1components.html#a829efa34afedd0a009f6c484ffa8f57a)


    CMake Warning at /opt/ros/kinetic/share/catkin/cmake/catkin_package.cmake:166 (message):
      catkin_package() DEPENDS on 'gazebo' but neither 'gazebo_INCLUDE_DIRS' nor
      'gazebo_LIBRARIES' is defined.
    Call Stack (most recent call first):
      /opt/ros/kinetic/share/catkin/cmake/catkin_package.cmake:102 (_catkin_package)
      CMakeLists.txt:26 (catkin_package)


There are three methods to set velocity:


What happened to R? And why no 1/2 on the KE for m?


Sorry, something went wrong.


edited


Owner


Include my email address so I can be contacted


**Advantages**


[ ![@sven-
hoek](https://avatars.githubusercontent.com/u/15048669?s=80&u=1184c86424c64f25eb98710ad8c40e72cc3fb679&v=4)
](/sven-hoek)


##  ◆  IGN_GAZEBO_REGISTER_COMPONENT()  [1/9]


using [ PhysicsEnginePlugin
](namespaceignition_1_1gazebo_1_1components.html#a4a6e54d44c9a0180ca734b18052f2042)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
std::string ](http://en.cppreference.com/w/cpp/string/basic_string.html) ,
class PhysicsEnginePluginTag, [ serializers::StringSerializer
](classignition_1_1gazebo_1_1serializers_1_1StringSerializer.html) >
---

Holds the physics engine shared library.


##  ◆  LevelEntityNames


    [Msg] Velocity for link box_link1 (collision name box::box_link1::collision): -0.179151 0.134644 -0.006592, absolute val 0.224204
    [Msg] Velocity for link box_link1 (collision name box::box_link1::collision): -0.058385 0.00709 -0.024909, absolute val 0.0638714


using [ World
](namespaceignition_1_1gazebo_1_1components.html#a7f1ab6fadbd656edee3031b8ee6ffbb2)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
NoData
](namespaceignition_1_1gazebo_1_1components.html#a1bc8946395bec54053d52820e79c5ad3)
, class WorldTag>
---

A component that identifies an entity as being a world.


using [ AngularVelocityCmd
](namespaceignition_1_1gazebo_1_1components.html#a017199549e1159d49d0cd84b84323238)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
math::Vector3d
](https://ignitionrobotics.org/api/math/6.8/namespaceignition_1_1math.html#a1f05093f5ee1a9ecdd54476792e4c206)
, class AngularVelocityCmdTag>
---

A component type that contains the commanded angular velocity of an entity, in
its own frame, represented by [ ignition::math::Vector3d
](https://ignitionrobotics.org/api/math/6.8/namespaceignition_1_1math.html#a1f05093f5ee1a9ecdd54476792e4c206)
.


##  ◆  Light


* Oct 20, 2014


#  Methods


###  Hot Threads


By clicking “Sign up for GitHub”, you agree to our [ terms of service
](https://docs.github.com/terms) and [ privacy statement
](https://docs.github.com/privacy) . We’ll occasionally send you account
related emails.


Milestone


So it compiles, but when I try to start Gazebo with our Franka robot in that
workspace, gazebo crashes and I get the following info:


* Solutions


Sorry, something went wrong.


Perhaps not that basic. Check all your steps. If you still get that, post
them.
You are also overlooking that the small mass will have KE too. The extreme
condition M << m implies you are not supposed to ignore that.


##  ◆  Geometry


    * [ Enterprise ](/enterprise)
    * [ Teams ](/team)
    * [ Startups ](/enterprise/startups)
    * [ Education  ](https://education.github.com)


###  Set Link Velocity Using PID controllers


  * Supported on all physics engines
  * Simple, only one function call
  * Object moves at target velocity right away


Copy link


* Product


using [ RenderEngineGuiPlugin
](namespaceignition_1_1gazebo_1_1components.html#a094e0772b8b4f571a9004c7fe27a19d8)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
std::string ](http://en.cppreference.com/w/cpp/string/basic_string.html) ,
class RenderEngineGuiPluginTag, [ serializers::StringSerializer
](classignition_1_1gazebo_1_1serializers_1_1StringSerializer.html) >
---

Holds the render engine gui shared library.


**[ sven-hoek ](/sven-hoek) ** commented  Mar 3, 2019


    physics::LinkPtr objLink = boost::dynamic_pointer_cast<physics::Link>(obj->GetParent());
    ignition::math::Vector3d linVel = objLink->WorldLinearVel();
    ignition::math::Vector3d angVel = objLink->WorldAngularVel();

    this->fixedJoint->Detach();

    objLink->SetLinearVel(linVel);
    objLink->SetAngularVel(angVel);


This section will show how to use the three methods to set velocity on a
joint.


#  Setting Velocity on Links


> EzequielSeattle said:
>
> (1/2)(1/2)Mω^2 + mω^2 = mgh


using [ Link
](namespaceignition_1_1gazebo_1_1components.html#a99d30a3ccb7f52c618da092d2cd548a6)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
NoData
](namespaceignition_1_1gazebo_1_1components.html#a1bc8946395bec54053d52820e79c5ad3)
, class LinkTag>
---

A component that identifies an entity as being a link.


[ A cylinder of snow rolls down a hill gathering more snow -- calculate its
speed ](/threads/a-cylinder-of-snow-rolls-down-a-hill-gathering-more-snow-
calculate-its-speed.1054015/)


IGN_GAZEBO_REGISTER_COMPONENT  |  (  |  "ign_gazebo_components.Actor"  |  ,
---|---|---|---
|  |  [ Actor
](namespaceignition_1_1gazebo_1_1components.html#ae68d27c14dc6e79c4c0d2e4f1124ad59)
|
|  )  |  |

**Initial value:**


[ Rotation of Rigid Bodies: Rotating stick with disc on top
](/threads/rotation-of-rigid-bodies-rotating-stick-with-disc-on-top.953448/)


##  ◆  LogicalAudioSource


using [ LevelEntityNames
](namespaceignition_1_1gazebo_1_1components.html#a62ca4c8f340e8085bb727b2961b62712)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
std::set ](http://en.cppreference.com/w/cpp/container/set.html) < [
std::string ](http://en.cppreference.com/w/cpp/string/basic_string.html) >,
class LevelEntityNamesTag, [ serializers::LevelEntityNamesSerializer
](classignition_1_1gazebo_1_1serializers_1_1LevelEntityNamesSerializer.html) >
---

A component that holds a list of names of entities to be loaded in a level.


[ _insert_drive_file_ Tutorials ](tutorials.html) _library_books_ Classes
_toc_ Namespaces  [ _insert_drive_file_ Files ](files.html) [ _launch_
Ignition Website ](http://ignitionrobotics.org)


**Advantages**


###  Footer navigation


  * Mar 6, 2024
Introductory Physics Homework Help


Copy link


  * __
  * #10


Okay, so I've had no experience with Gazebo plugins before and naively tried
to set the object link's velocity to its previous, without seeing a change in
behavior:


Views


##  ◆  IGN_GAZEBO_REGISTER_COMPONENT()  [6/9]


Sorry, something went wrong.


            // create prismatic joint with the world as a parent
            physics::ModelPtr model = _link->GetModel();
            physics::WorldPtr world = physics::get_world("default");
            physics::PhysicsEnginePtr engine = world->GetPhysicsEngine();
            this->joint = engine->CreateJoint("prismatic");
            this->joint->SetName(model->GetName() + "__perfect_lin_joint__");
            physics::LinkPtr worldLink = boost::dynamic_pointer_cast<physics::Link>(
                world->GetByName("world"));
            math::Pose jointOrigin;
            this->joint->Load(worldLink, _link, jointOrigin);
            this->joint->Init();
            double magnitude = _vel.GetLength();
            this->joint->SetAxis(0, _vel.Normalize());
            this->joint->SetParam("fmax", 0, _maxForce);
            this->joint->SetParam("vel", 0, magnitude);


All reactions


###  Set Joint Velocity Instantaneously


          // Add those forces to the body
          this->link->AddForce(worldForce);
          this->link->AddTorque(worldTorque);


Also, can you set [ this ](https://github.com/JenniferBuehler/gazebo-
pkgs/blob/e54939f6a80982dc1b89c3c2fb288e989f758b20/gazebo_grasp_plugin/src/GazeboGraspGripper.cpp#L236)
and [ this ](https://github.com/JenniferBuehler/gazebo-
pkgs/blob/e54939f6a80982dc1b89c3c2fb288e989f758b20/gazebo_grasp_plugin/src/GazeboGraspGripper.cpp#L250)
from 0 to 1 and post the output of that as well? Thanks :)

---

All reactions


I'll have to look into this more, unfortunately I will probably not have time
for that this week. Meanwhile, I hope you can work with it despite the
velocity reduction? Or maybe you end up finding the reason for that weird
behaviour, that would be great too :)

---

All reactions


##  ◆  JointForceCmd


[ ![@sven-
hoek](https://avatars.githubusercontent.com/u/15048669?s=80&u=1184c86424c64f25eb98710ad8c40e72cc3fb679&v=4)
](/sven-hoek)


**[ JenniferBuehler ](/JenniferBuehler) ** commented  Mar 4, 2019


> EzequielSeattle said:
>
> Some basic algebra to isolate the angular velocity gives
>  ω=√(MmghR^2)


Email Address


Finally unpause the world to see everything move. All of the methods used to
set velocity are explained below.


Copy link


using [ LogicalCamera
](namespaceignition_1_1gazebo_1_1components.html#a3cdf41667d71e17216a5c59019a43ad7)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html)
<sdf::ElementPtr, class LogicalCameraTag>
---

TODO(anyone) Substitute with sdf::LogicalCamera once that exists? This is
currently the whole <sensor> element.


using [ LevelBuffer
](namespaceignition_1_1gazebo_1_1components.html#ab21374dd5c7bd20f14096e38d4d24bbb)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html)
<double, class LevelBufferTag>
---

A component that holds the buffer setting of a level's geometry.


That's then because it is having trouble with the gazebo::physics::Physics
type itself. I'm just cloning the repo and will try as well.
Ah you're talking about the official Franka repo, cool! I love the Franka :)

---

All reactions


* Open Source


What is K_rot_m? Does the small mass rotate?


I compiled it again, leaving ` physics ` a nullptr. Somehow exactly the same
error occurs as before when I launch Gazebo. I double checked whether I am
editing/compiling the right file.

---

All reactions


[ __ Insights Author
](https://www.physicsforums.com/insights/author/haruspex/)


The set of Components assigned to an Entity also act as a key. Systems process
Entities based on their key. For example, a physics system may process only
entities that have pose and inertia components.


  * [ ignition ](namespaceignition.html)
  * [ gazebo ](namespaceignition_1_1gazebo.html)
  * [ components ](namespaceignition_1_1gazebo_1_1components.html)


##  ◆  IGN_GAZEBO_REGISTER_COMPONENT()  [3/9]


Type  |  Number of Axes
---|---
prismatic  |  1
revolute  |  1
revolute2  |  2
screw  |  1
universal  |  2

The second parameter is the velocity. It is meters per second for prismatic
joints, and radians per second for all others.


##  ◆  LinearVelocitySeed


You can’t perform that action at this time.


using [ LinearAcceleration
](namespaceignition_1_1gazebo_1_1components.html#acff53e757937857410e7fbb259c04549)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
math::Vector3d
](https://ignitionrobotics.org/api/math/6.8/namespaceignition_1_1math.html#a1f05093f5ee1a9ecdd54476792e4c206)
, class LinearAccelerationTag>
---

A component type that contains linear acceleration of an entity represented by
[ ignition::math::Vector3d
](https://ignitionrobotics.org/api/math/6.8/namespaceignition_1_1math.html#a1f05093f5ee1a9ecdd54476792e4c206)
.


OK, so I checked my algebra, and yeah, I messed that up.

My new value is

K_rot_M + K_rot_m = mgh
(1/2)(1/2)Mω^2 + mω^2 = mgh
Dividing all by m gives
(1/4)(M/m)ω^2 + ω^2 = gh

Solving for ω gives me

√(gh/(1/4(M/m)+1))

Am I on the right track? For M >> m, the velocity will end up quite small. For
m >> M, the velocity will end up quite large. Seems intuitive. Am I on the
right track?


* 👍  1 reaction


###  Set Link Velocity Using Joint Motors


Owner


Author


##  ◆  AngularAcceleration


##  ◆  Magnetometer


##  ◆  RenderEngineServerPlugin


` ldd ` locate libgazebo_grasp_fix.so` | grep gazebo `


Copy link


Toggle navigation  [
![gazebo](/assets/masthead-0bd44817978df8069f427d8ca1657998789065a2b242edfd1a3d8ab4a329dd4c.png)
](/)


[ Conservation of energy problem: Ball rolling down inclined plane and then
through a loop-the-loop ](/threads/conservation-of-energy-problem-ball-
rolling-down-inclined-plane-and-then-through-a-loop-the-loop.1060500/)


#  Ignition Gazebo


##  ◆  Imu


using [ WorldPoseCmd
](namespaceignition_1_1gazebo_1_1components.html#adc6f422d53a4e1cea006d85596fd66bd)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
math::Pose3d
](https://ignitionrobotics.org/api/math/6.8/namespaceignition_1_1math.html#a507d73d4a494a03691fb87691dd07215)
, class WorldPoseCmdTag>
---

A component type that contains commanded pose of an entity in the world frame
represented by [ ignition::math::Pose3d
](https://ignitionrobotics.org/api/math/6.8/namespaceignition_1_1math.html#a507d73d4a494a03691fb87691dd07215)
.


Oh. Fair. I hadn't considered that. The question asked for it to be put in
terms of M, and I'm not sure that the mass of the disc will matter at all now.
How can I reconcile this?


after you remove _all_ the calls to GetPhysics() then something is truly
weird. Maybe take out the call in GazeboGraspGripper too, to make sure that `
GetPhysics ` is never called. To be 100%, just comment the whole ` GetPhysics
` functions from .cpp/.h files in gazebo_version_helpers. If you still get the
same error, then it's definitely something with your build.


and in another terminal, put all other commands to one line to save you some
headaches ;) (you may need to adjust the sleep values if this doesn't go
smooth for you):


##  ◆  Collision


[
![@JenniferBuehler](https://avatars.githubusercontent.com/u/12842634?s=80&u=c4f3910a93a4f048638fcf101ad78f41d509d516&v=4)
](/JenniferBuehler)


* [ Finding electric potential of an infinite line charge at z axis ](/threads/finding-electric-potential-of-an-infinite-line-charge-at-z-axis.1058012/ "Finding electric potential of an infinite line charge at z axis")


using [ Magnetometer
](namespaceignition_1_1gazebo_1_1components.html#ab46d05d13175bd4cde240c85f70be66e)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html)
<sdf::Sensor, class MagnetometerTag, [ serializers::SensorSerializer
](namespaceignition_1_1gazebo_1_1serializers.html#a28b4f8b3bfa52760faec77e3c30686eb)
>
---

A component type that contains a magnetometer sensor, sdf::Magnetometer,
information.


  * The velocity of the gripper link is way smaller than the one of the object and this cannot be because of some lever action
  * When moving the arm back and forth with the object attached, the velocity of the object is always negative and the velocity of the gripper is always positive, no matter which direction the robot moves. Like the absolute value was taken (negated on the object's velocity, though)


##  ◆  JointAxis


__ Science Advisor


**[ sven-hoek ](/sven-hoek) ** commented  Mar 5, 2019


edited


> **Note** The value parameter must have exactly the right type. Joint motors
> require setting ` double ` parameters. This call will work `
> joint->SetParam('fmax', 0, 0.0) ` while this will have a runtime error `
> joint->SetParam('fmax', 0, 0) ` .


__ Gold Member


using [ JointForceCmd
](namespaceignition_1_1gazebo_1_1components.html#acb1fa80d3ae07408b4bd1efbeedaef15)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
std::vector ](http://en.cppreference.com/w/cpp/container/vector.html)
<double>, class JointForceCmdTag>
---

Commanded joint forces (or torques) to be applied to a joint in SI units (Nm
for revolute, N for prismatic). The component wraps a [ std::vector
](http://en.cppreference.com/w/cpp/container/vector.html "STL class. ") and
systems that set this component need to ensure that the vector has the same
size as the degrees of freedom of the joint.


    [Msg] Velocity for link box_link1 (collision name box::box_link1::collision): -0.138627 -0.174153 0.001265, absolute val 0.222594
    [Msg] Velocity for link box_link1 (collision name box::box_link1::collision): -0.138036 -0.172628 0.001995, absolute val 0.221039
    [Msg] Velocity for link box_link1 (collision name box::box_link1::collision): -0.040687 -0.013907 -0.000555, absolute val 0.0430015
    [Msg] GazeboGraspFix: Detaching box::box_link1::collision from gripper gripper.
    [Msg] PRE-DETACH Velocity for link box_link1 (collision name box::box_link1::collision): -0.040687 -0.013907 -0.000555, absolute val 0.0430015
    [Msg] POST-DETACH Velocity for link box_link1 (collision name box::box_link1::collision): -0.040687 -0.013907 -0.000555, absolute val 0.0430015

---

All reactions


And just when detaching, it seems to go down a little bit when the object
isn't touching the gripper any more, but still BEFORE it is detached (as said,
unfortunately detaching while the arm is moving doesn't work with my simple
test setup, so the velocity is already low before detaching).
However, what's most important, is that pre/post detachment doesn't affect the
velocity. It's exactly the same value, so I'm guessing that would be the same
if the velocity was higher...


Meanwhile, can you check if the velocities still remain insignificant for you,
if possible with the Jaco arm. I've updated the code and you can use the same
test prints in [ this line ](https://github.com/JenniferBuehler/gazebo-
pkgs/blob/a5500d64cbc047a9cd13438798023cc704f30a16/gazebo_grasp_plugin/src/GazeboGraspFix.cpp#L489)
and [ here ](https://github.com/JenniferBuehler/gazebo-
pkgs/blob/a5500d64cbc047a9cd13438798023cc704f30a16/gazebo_grasp_plugin/src/GazeboGraspGripper.cpp#L242)
by just setting it to ` #if 1 ` (my probably not so common way to make it
easier to comment/uncomment blocks with only one type ;D). I will remove those
test prints once we've fixed this issue here.


##  ◆  Visual


##  ◆  LinearAcceleration


              this->model->GetJoint("orange_joint")->SetParam("fmax", 0, 100.0);
              this->model->GetJoint("orange_joint")->SetParam("vel", 0, 1.0);


So it doesn't happen if you comment out ` GetPhysics(this->world) ` (so just
leave it to be a nullptr even if at runtime that would segfault), it then
compiles? No issues with the other new helper functions in
gazebo_version_helpers?

---

All reactions


  * [ Notifications ](/login?return_to=%2FJenniferBuehler%2Fgazebo-pkgs)
  * [ Fork  100  ](/login?return_to=%2FJenniferBuehler%2Fgazebo-pkgs)
  * [ Star  188  ](/login?return_to=%2FJenniferBuehler%2Fgazebo-pkgs)


Menu


Replies


##  ◆  Temperature


My first thought would be to check the links of the gripper while they are
moving obviously fast, and see if they have a reasonable velocity. Just to
confirm whether links attached to moving joints have a realistic world
velocity.
If that's the case, then maybe try to assign the velocity which the gripper
had at the moment of detachment. Though my guess would be that if the cube
doesn't have a significant velocity while it is still attached, the gripping
link probably won't be much different. But it would be worth a check.


###  Recent Insights


[ ![@sven-
hoek](https://avatars.githubusercontent.com/u/15048669?s=80&u=1184c86424c64f25eb98710ad8c40e72cc3fb679&v=4)
](/sven-hoek)


#  Velocity seems to be set to 0 after detaching  #26


**[ sven-hoek ](/sven-hoek) ** commented  Feb 17, 2019


**[ JenniferBuehler ](/JenniferBuehler) ** commented  Feb 4, 2019


Angular velocity can be set by creating a revolute joint between the world and
the link to be moved. The link will only be able to rotate about the revolute
joint axis until the joint is detached.


Hm that's weird. Your Franka repositories aren't public by any chance, so I
could try to reproduce it?


##  ◆  PerformerAffinity


` nm ` locate libgazebo_version_helpers.so` | grep GetPhysics `

---

All reactions


Assignees


|  Joint positions in SI units (rad for revolute, m for prismatic).  More...

using  |  [ JointType
](namespaceignition_1_1gazebo_1_1components.html#acea768d258d36da09082f0a28bbd6f4e)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) <
sdf::JointType, class JointTypeTag, [ serializers::JointTypeSerializer
](classignition_1_1gazebo_1_1serializers_1_1JointTypeSerializer.html) >
|  A component that contains the joint type. This is a simple wrapper around
sdf::JointType.  More...

using  |  [ JointVelocity
](namespaceignition_1_1gazebo_1_1components.html#a64427335ab235cc2ce07461b343f6eb3)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
std::vector ](http://en.cppreference.com/w/cpp/container/vector.html) < double
>, class JointVelocityTag, [ serializers::VectorDoubleSerializer
](classignition_1_1gazebo_1_1serializers_1_1VectorDoubleSerializer.html) >
|  Base class which can be extended to add serialization.  More...

using  |  [ JointVelocityCmd
](namespaceignition_1_1gazebo_1_1components.html#a576d9c565e61e34cfb56f8d9263c5848)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
std::vector ](http://en.cppreference.com/w/cpp/container/vector.html) < double
>, class JointVelocityCmdTag, [ serializers::VectorDoubleSerializer
](classignition_1_1gazebo_1_1serializers_1_1VectorDoubleSerializer.html) >
|  Base class which can be extended to add serialization.  More...

using  |  [ JointVelocityReset
](namespaceignition_1_1gazebo_1_1components.html#a645f164faa613233611b2abd7e07d198)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
std::vector ](http://en.cppreference.com/w/cpp/container/vector.html) < double
>, class JointVelocityResetTag, [ serializers::VectorDoubleSerializer
](classignition_1_1gazebo_1_1serializers_1_1VectorDoubleSerializer.html) >
|  Joint velocities in SI units (rad/s for revolute, m/s for prismatic).
More...

using  |  [ Level
](namespaceignition_1_1gazebo_1_1components.html#a4b54dd89230043e9339d2ce92fc3078c)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
NoData
](namespaceignition_1_1gazebo_1_1components.html#a1bc8946395bec54053d52820e79c5ad3)


[
![@JenniferBuehler](https://avatars.githubusercontent.com/u/12842634?s=80&u=c4f3910a93a4f048638fcf101ad78f41d509d516&v=4)
](/JenniferBuehler)


* [ Formula derivation connecting vertical water flowrate & horizontal distance moved by a suspended sphere ](/threads/formula-derivation-connecting-vertical-water-flowrate-horizontal-distance-moved-by-a-suspended-sphere.1059344/ "Formula derivation connecting vertical water flowrate & horizontal distance moved by a suspended sphere")


Yes, I did. Unfortunately it persists, I even tried it on another machine (I
was using the older version of the plugin there before, too, though). What's
really weird is that the error doesn't occur with the Jaco, even in the same
workspace. After all, it should do the same call...

---

All reactions


Energy is conserved, so K = -V.
The object has a potential energy at the initial time of m*g*h. This will all
be converted into rotational kinetic energy. Therefore, the final rotational
energy will be equal to -mgh.
(1/2)Iω^2=-mgh
The moment of inertia for a disc is (1/2)MR^2.
Some basic algebra to isolate the angular velocity gives
ω=√(MmghR^2)

Am I correct? I guess I was unsure about whether the moment of inertia
selected was correct. I also wasn't sure about the extreme conditions. Thanks
in advance!


using [ JointAxis
](namespaceignition_1_1gazebo_1_1components.html#a1c8e19f9c389eab8ce4d0212d371832d)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html)
<sdf::JointAxis, class JointAxisTag, [ serializers::JointAxisSerializer
](namespaceignition_1_1gazebo_1_1serializers.html#a7a8b725df626a36af2dd7e78214d4604)
>
---

A component that contains the joint axis . This is a simple wrapper around
sdf::JointAxis.


Sorry, something went wrong.


* [ Trending ](https://www.physicsforums.com/whats-new/hot-threads)


---

All reactions


It accepts three parameters: key, axis, and value. The key parameter is a
string that names the parameter to be changed. The axis parameter is an index
that may be 0 or 1.


Apart from the radius and angle, the only other factor that can affect the
velocity of a hanging object attached to a disc is the acceleration due to
gravity, which remains constant on Earth at 9.8 m/s².


using [ Model
](namespaceignition_1_1gazebo_1_1components.html#a81c45336dd134e03c5a29b34beb293db)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
NoData
](namespaceignition_1_1gazebo_1_1components.html#a1bc8946395bec54053d52820e79c5ad3)
, class ModelTag>
---

A component that identifies an entity as being a model.


##  ◆  Static


* Change width


[ 10 ](/threads/collision-between-asteroids.1055903/page-10)


using [ CenterOfVolume
](namespaceignition_1_1gazebo_1_1components.html#ac84839bcd9971a9dc22fad309d0513f0)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
math::Vector3d
](https://ignitionrobotics.org/api/math/6.8/namespaceignition_1_1math.html#a1f05093f5ee1a9ecdd54476792e4c206)
, class CenterOfVolumeTag>
---

A component for an entity's center of volume. Units are in meters. The Vector3
value indicates center of volume of an entity. The position of the center of
volume is relative to the pose of the parent entity.


ignition::gazebo::components::IGN_GAZEBO_REGISTER_COMPONENT  |  (  |
"ign_gazebo_components.World"  |  ,
---|---|---|---
|  |  [ World
](namespaceignition_1_1gazebo_1_1components.html#a7f1ab6fadbd656edee3031b8ee6ffbb2)
|
|  )  |  |

A component that holds the world's SDF DOM.


##  ◆  JointType


**[ JenniferBuehler ](/JenniferBuehler) ** commented  Feb 4, 2019


  * [ Forums  ](https://www.physicsforums.com/)
  * [ Homework Help  ](/#homework-help.260)
  * [ Introductory Physics Homework Help  ](/forums/introductory-physics-homework-help.153/)


  * Apr 1, 2019
Introductory Physics Homework Help


**[ JenniferBuehler ](/JenniferBuehler) ** commented  Mar 4, 2019


[ ![@sven-
hoek](https://avatars.githubusercontent.com/u/15048669?s=80&u=1184c86424c64f25eb98710ad8c40e72cc3fb679&v=4)
](/sven-hoek)


Owner


©2014 Open Source Robotics Foundation


**[ JenniferBuehler ](/JenniferBuehler) ** commented  Mar 1, 2019


          // Calculate the error between actual and target velocity
          math::Vector3 curLinearVel = this->link->GetWorldLinearVel();
          math::Vector3 curAngularVel = this->link->GetWorldAngularVel();
          math::Vector3 linearError = curLinearVel - this->targetLinearVel;
          math::Vector3 angularError = curAngularVel - this->targetAngularVel;

          // Get forces to apply from controllers
          math::Vector3 worldForce;
          math::Vector3 worldTorque;
          worldForce.x = this->controllers[0].Update(linearError.x, dt);
          worldTorque.x = this->controllers[1].Update(angularError.x, dt);
          worldForce.y = this->controllers[2].Update(linearError.y, dt);
          worldTorque.y = this->controllers[3].Update(angularError.y, dt);
          worldForce.z = this->controllers[4].Update(linearError.z, dt);
          worldTorque.z = this->controllers[5].Update(angularError.z, dt);


##  ◆  DepthCamera


---

All reactions


Already on GitHub? [ Sign in ](/login?return_to=%2FJenniferBuehler%2Fgazebo-
pkgs%2Fissues%2Fnew%2Fchoose) to your account


using [ WindMode
](namespaceignition_1_1gazebo_1_1components.html#a76d844a02651d673ff4c75d46bdc2c9b)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html)
<bool, class WindModeTag>
---

A component used to indicate whether an entity is affected by wind.


    {
      this->dataPtr->pendingJointCreation = true;
      this->dataPtr->childItem = this->dataPtr->contacts[1][1];
    }
    else if (checkContacts({1, 0}, {1, 2}))  // left + right
    {
      this->dataPtr->pendingJointCreation = true;
      this->dataPtr->childItem = this->dataPtr->contacts[1][0];
    }
    else if (checkContacts({0, 1}, {2, 1}))  // top + bottom
    {
      this->dataPtr->pendingJointCreation = true;
      this->dataPtr->childItem = this->dataPtr->contacts[0][1];
    }
  }
  // Clear contacts
  for (size_t ii = 0; ii < 3; ++ii)
  {
    for(size_t jj = 0; jj < 3; ++jj)
    {
      this->dataPtr->contacts[ii][jj] = kNullEntity;
    }
  }
  if (this->dataPtr->pendingJointCreation)
  {
    // If we need to create a new joint
    this->dataPtr->pendingJointCreation = false;
    this->dataPtr->joint = _ecm.CreateEntity();
    auto parentLink = _ecm.ParentEntity(this->dataPtr->childItem);
    _ecm.CreateComponent(
          this->dataPtr->joint,
          components::DetachableJoint({this->dataPtr->gripperEntity,
                                       parentLink, "fixed"}));
    igndbg << "Created joint between gripper and "
      << this->dataPtr->childItem
      << std::endl << "at time step " << _info.simTime.count() << std::endl;
    this->dataPtr->jointCreated = true;
  }
  if (!this->dataPtr->suctionOn && this->dataPtr->jointCreated)
  {


More options


Sorry, something went wrong.


Copy link


It takes two parameters: axis, and velocity. The axis parameter is an index,
and it may be 0 or 1. Zero means the first axis on the joint, and one means
the second if applicable.


I don't have time this week to check up on this but will try as soon as I can,
if you haven't solved it until then.

---

All reactions


Replies


  * [ Contact ](/misc/contact)
  * [ About ](https://www.physicsforums.com/insights/about-physics-forums/)
  * [ Terms ](https://www.physicsforums.com/help/terms-of-service/)
  * [ Privacy ](https://www.physicsforums.com/help/member-privacy-policy/)
  * [ Help ](/help/)
  * [ __ RSS  ](/forums/-/index.rss "RSS")


physics::PhysicsEnginePtr physics = GetPhysics(this->world);


Views


using [ GpuLidar
](namespaceignition_1_1gazebo_1_1components.html#addd750b2c6d8d2c32390572b3337ed19)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html)
<sdf::Sensor, class GpuLidarTag, [ serializers::SensorSerializer
](namespaceignition_1_1gazebo_1_1serializers.html#a28b4f8b3bfa52760faec77e3c30686eb)
>
---

A component type that contains a GPU Lidar sensor, sdf::Lidar, information.


##  ◆  IGN_GAZEBO_REGISTER_COMPONENT()  [4/9]


Then, when checking the velocities of the link before and after ` Detach() ` ,
they stay the same, even when I don't set them myself.
Did I set the velocity of the wrong object or have any other misconceptions?
Any other suggestions where the velocity could be set/reset? I also tried
working with the parent of my objLink, which was the ` Model ` with name ` Box
` (corresponding to the box I'm gripping).


##  ◆  Pose


  * __
  * #9


* [ Featured Threads ](https://www.physicsforums.com/threads/featured)


using [ Performer
](namespaceignition_1_1gazebo_1_1components.html#a27f7c38dfcdd966e9a5b742e3d474383)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
NoData
](namespaceignition_1_1gazebo_1_1components.html#a1bc8946395bec54053d52820e79c5ad3)
, class PerformerTag>
---

This component identifies an entity as being a performer.


It may be a while before I get around to reboot into Bionic and test again, so
hopefully I can help you with some suggestions and guess work in the meantime
;)


Meanwhile, general thoughts. If you still keep having the error


I just remembered my update will conflict with your settings because you're
using the PR for melodic. I'm just processing that PR to finalise it actually,
then you'll be able to use the new code on master directly.

---

All reactions


              const ignition::msgs::Contacts &_msg)
  {
    std::lock_guard<std::mutex> lock(this->mtx);
    if (_msg.contact_size())
    {
      auto contact = _msg.contact(0);
      this->contacts[idx0][idx1] = contact.collision2().id();
    }
    else
    {
      this->contacts[idx0][idx1] = kNullEntity;
    }
  }
  /// \brief Command callback
  public: void OnCmd(const ignition::msgs::Boolean &_suctionOn)
  {
    std::lock_guard<std::mutex> lock(this->mtx);
    this->suctionOn = _suctionOn.data();
  }
};
//////////////////////////////////////////////////
SuctionGripperPlugin::SuctionGripperPlugin():
  dataPtr(new SuctionGripperPrivate)
{
  for (size_t ii = 0; ii < 3; ++ii)
  {
    for (size_t jj = 0; jj < 3; ++jj)
    {
      this->dataPtr->contacts[ii][jj] = kNullEntity;
    }
  }
}
//////////////////////////////////////////////////
SuctionGripperPlugin::~SuctionGripperPlugin()
{
}
//////////////////////////////////////////////////
void SuctionGripperPlugin::Configure(const Entity &_entity,
  const std::shared_ptr<const sdf::Element> &_sdf,
  EntityComponentManager &_ecm,


Components represent data, such as position information. An Entity usually has
one or more associated components.


#  Provide feedback


###  Set Joint Velocity Using PID controllers


Gazebo is open-source licensed under [ Apache 2.0
](http://www.apache.org/licenses/LICENSE-2.0.html)


Joints motors can be used to reach a velocity by applying the exact required
force to a joint. Gazebo only supports this method when using the ODE physics
engine (the default engine). It relies on the [ ODE Joint Motor feature
](https://www.ode-
wiki.org/wiki/index.php?title=Manual:_Joint_Types_and_Functions#Stops_and_motor_parameters)
.


* [ Insights  Why Division by Zero is a Bad Idea ](/threads/why-division-by-zero-is-a-bad-idea.1058986/ "Why Division by Zero is a Bad Idea")


Copy link


using [ LogPlaybackStatistics
](namespaceignition_1_1gazebo_1_1components.html#a6ed92acfa8412180f87b093d5b93bf17)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
ignition::msgs::LogPlaybackStatistics
](https://ignitionrobotics.org/api/msgs/6.2/classignition_1_1msgs_1_1LogPlaybackStatistics.html)
, class LogPlaybackStatisticsTag, [ serializers::MsgSerializer
](classignition_1_1gazebo_1_1serializers_1_1MsgSerializer.html) >
---

A component type that contains log playback, [ systems::LogPlayback
](classignition_1_1gazebo_1_1systems_1_1LogPlayback.html "Log state playback.
") , information. The log playback is created from world entity upon the
playback plugin being loaded.


` [ Style formatting, and some test prints for issue
](/JenniferBuehler/gazebo-pkgs/commit/a5500d64cbc047a9cd13438798023cc704f30a16
"Style formatting, and some test prints for issue #26") [ #26
](https://github.com/JenniferBuehler/gazebo-pkgs/issues/26) `


  * [ Terms ](https://docs.github.com/site-policy/github-terms/github-terms-of-service)
  * [ Privacy ](https://docs.github.com/site-policy/privacy-policies/github-privacy-statement)
  * [ Security ](/security)
  * [ Status ](https://www.githubstatus.com/)
  * [ Docs ](https://docs.github.com/)
  * [ Contact ](https://support.github.com?tags=dotcom-footer)
  * Manage cookies
  * Do not share my personal information


Sorry, something went wrong.


Clear


Views


##  ◆  Gravity


    [Msg] Velocity for link box_link1 (collision name box::box_link1::collision): -0.18197 0.135352 0.000549, absolute val 0.226789
    [Msg] Velocity for link box_link1 (collision name box::box_link1::collision): -0.187825 0.039643 0.000692, absolute val 0.191964
    [Msg] Velocity for link box_link1 (collision name box::box_link1::collision): 0.001451 0.002234 0.000948, absolute val 0.00282756
    [Msg] GazeboGraspFix: Detaching box::box_link1::collision from gripper gripper.


Owner


##  ◆  MagneticField


using [ LinearVelocitySeed
](namespaceignition_1_1gazebo_1_1components.html#a6fa8a24c63fd884ae1d23c310a3d1f59)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
math::Vector3d
](https://ignitionrobotics.org/api/math/6.8/namespaceignition_1_1math.html#a1f05093f5ee1a9ecdd54476792e4c206)
, class LinearVelocitySeedTag>
---

A component type that contains linear velocity seed of an entity expressed in
the local frame of the entity and represented by [ ignition::math::Vector3d
](https://ignitionrobotics.org/api/math/6.8/namespaceignition_1_1math.html#a1f05093f5ee1a9ecdd54476792e4c206)
. This seed can used to generate linear velocities by applying transformations
and adding noise.


  * [ Index ](classes.html)
  * [ List ](annotated.html)
  * [ Hierarchy ](hierarchy.html)
  * [ Members: All ](functions.html)
  * [ Members: Functions ](functions_func.html)
  * [ Members: Variables ](functions_vars.html)
  * [ Members: Typedefs ](functions_type.html)
  * [ Members: Enumerations ](functions_enum.html)
  * [ Members: Enumerator ](functions_eval.html)


although if the arm is still moving, it will stop to release the cube first,
so you can't really throw it around with this test setup. However the
velocities reported are exactly the same as before the detachment (even if
small), so I think I wouldn't have the issue if the arm was moving.

---

All reactions


##  ◆  GpuLidar


This tutorial will describe how to programatically set velocities on Joints
and Links in Gazebo 7. This is a common task done in a custom [ plugin
](tutorials?cat=plugins) .


The controller gains must be configured for each object being moved. The
velocity target is meters per second for prismatic joints, and radians per
second for all others. [ ` JointController::Update() ` ](http://osrf-
distributions.s3.amazonaws.com/gazebo/api/dev/classgazebo_1_1physics_1_1JointController.html#aec0783b5a136e042adcc47bae4fe5291)
must be called every time step to apply forces


##  Comments


  * [ List ](namespaces.html)
  * [ Members ](namespacemembers.html)
  * [ Functions ](namespacemembers_func.html)
  * [ Typedefs ](namespacemembers_type.html)
  * [ Variables ](namespacemembers_vars.html)
  * [ Enumerations ](namespacemembers_enum.html)
  * [ Enumerator ](namespacemembers_eval.html)


If you do ` sudo updatedb && locate libgazebo_grasp_fix.so ` , does it come up
with only one library of libgazebo_grasp_fix.so?

---

All reactions


moveable).  More...

using  |  [ Collision
](namespaceignition_1_1gazebo_1_1components.html#a34b535712305c1f4bfe4613becb6e11f)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
NoData
](namespaceignition_1_1gazebo_1_1components.html#a1bc8946395bec54053d52820e79c5ad3)
, class CollisionTag >
|  A component that identifies an entity as being a collision.  More...

using  |  [ ContactSensor
](namespaceignition_1_1gazebo_1_1components.html#a1c664a3515fe885c6db0c32c826030a4)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) <
sdf::ElementPtr, class ContactSensorTag >
|  TODO(anyone) Substitute with sdf::Contact once that exists? This is
currently the whole <sensor> element.  More...

using  |  [ ContactSensorData
](namespaceignition_1_1gazebo_1_1components.html#a530ec3805091c8129b601d35b751338f)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
msgs::Contacts
](https://ignitionrobotics.org/api/msgs/6.2/classignition_1_1msgs_1_1Contacts.html)
, class ContactSensorDataTag, [ serializers::MsgSerializer
](classignition_1_1gazebo_1_1serializers_1_1MsgSerializer.html) >
|  A component type that contains a list of contacts.  More...

using  |  [ DepthCamera
](namespaceignition_1_1gazebo_1_1components.html#a94b10caa2b07ce3ae68a959153d9312f)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) <
sdf::Sensor, class DepthCameraTag, [ serializers::SensorSerializer
](namespaceignition_1_1gazebo_1_1serializers.html#a28b4f8b3bfa52760faec77e3c30686eb)
>
|  A component type that contains a depth camera sensor, sdf::Camera,
information.  More...

using  |  [ DetachableJoint
](namespaceignition_1_1gazebo_1_1components.html#a91ad2ada0de391955fb6e0f9fafe7828)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
DetachableJointInfo
](structignition_1_1gazebo_1_1components_1_1DetachableJointInfo.html) , class


  * Oct 10, 2023
Introductory Physics Homework Help


All reactions


` [ a5500d6 ](/JenniferBuehler/gazebo-
pkgs/commit/a5500d64cbc047a9cd13438798023cc704f30a16) `


[ Oscillations of a disc with a smaller disc removed (Feynman ex. 17.23)
](/threads/oscillations-of-a-disc-with-a-smaller-disc-removed-feynman-
ex-17-23.1006777/)


using [ PerformerAffinity
](namespaceignition_1_1gazebo_1_1components.html#a7c26ac2decebea3193ebb904f4e4d05b)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
std::string ](http://en.cppreference.com/w/cpp/string/basic_string.html) ,
class PerformerAffinityTag, [ serializers::StringSerializer
](classignition_1_1gazebo_1_1serializers_1_1StringSerializer.html) >
---

This component holds the address of the distributed secondary that this
performer is associated with.


Close Menu


* [ Insights  How to Solve a Multi-Atwood Machine Assembly ](/threads/how-to-solve-a-multi-atwood-machine-assembly.1060080/ "How to Solve a Multi-Atwood Machine Assembly")


[ ![](https://ignitionrobotics.org/assets/doxygen/ignition_logo.svg)
](index.html)


No branches or pull requests


##  ◆  ThreadPitch


So for another simple test I printed out the velocities retrieved by `
WorldLinearVel() ` of each link of the robot when ` GazeboGraspFix::OnUpdate()
` ist called and even when the robot is moving with considerable speed, they
stay close to zero or at least not larger than when standing still. Maybe the
` world ` variable which is set by ` model->GetWorld() ` inside `
GazeboGraspFix::Load() ` is somehow not able to access the velocities?
Do you maybe have a hint where to look in the Gazebo code, or another
possibility to get the link velocities?

---

All reactions


using [ Wind
](namespaceignition_1_1gazebo_1_1components.html#a6c40f98914db0aae7f17dc3b610e97ca)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
NoData
](namespaceignition_1_1gazebo_1_1components.html#a1bc8946395bec54053d52820e79c5ad3)
, class WindTag>
---

A component that identifies an entity as being a wind.


](namespaceignition_1_1gazebo_1_1components.html#aa2703540998ff2cc7c6ec4859ecbe882)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
math::Vector3d
](https://ignitionrobotics.org/api/math/6.8/namespaceignition_1_1math.html#a1f05093f5ee1a9ecdd54476792e4c206)
, class GravityTag >
|  Store the gravity acceleration.  More...

using  |  [ Imu
](namespaceignition_1_1gazebo_1_1components.html#a5b54cafbb965ca861020b90d5ccf7e2a)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) <
sdf::Sensor, class ImuTag, [ serializers::SensorSerializer
](namespaceignition_1_1gazebo_1_1serializers.html#a28b4f8b3bfa52760faec77e3c30686eb)
>
|  A component type that contains an IMU sensor, sdf::IMU, information.
More...

using  |  [ Inertial
](namespaceignition_1_1gazebo_1_1components.html#a01fe24873c5a974980e9fbc682dce41f)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
math::Inertiald
](https://ignitionrobotics.org/api/math/6.8/namespaceignition_1_1math.html#a37a9eeb96bfbfde10aa4345c92f7fde8)
, class InertialTag, [ serializers::InertialSerializer
](namespaceignition_1_1gazebo_1_1serializers.html#a680f3b18509d582dc7c0b353cfcfd90e)
>
|  This component holds an entity's inertial.  More...

using  |  [ Joint
](namespaceignition_1_1gazebo_1_1components.html#a8f7e10bb3296e3db3e48b8276156fbe3)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
NoData
](namespaceignition_1_1gazebo_1_1components.html#a1bc8946395bec54053d52820e79c5ad3)
, class JointTag >
|  A component that identifies an entity as being a joint.  More...

using  |  [ JointAxis
](namespaceignition_1_1gazebo_1_1components.html#a1c8e19f9c389eab8ce4d0212d371832d)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) <
sdf::JointAxis, class JointAxisTag, [ serializers::JointAxisSerializer
](namespaceignition_1_1gazebo_1_1serializers.html#a7a8b725df626a36af2dd7e78214d4604)
>


Ok, now it runs again, thanks. With your diagnostic print I realized 2 unusual
things:


* [ Challenging problem about an impact with a smooth frictionless surface ](/threads/challenging-problem-about-an-impact-with-a-smooth-frictionless-surface.1057317/ "Challenging problem about an impact with a smooth frictionless surface")


Time in seconds within animation being currently played.


[ Intro Physics Homework Help
](https://www.physicsforums.com/forums/introductory-physics-homework-
help.153/) [ Advanced Physics Homework Help
](https://www.physicsforums.com/forums/advanced-physics-homework-help.154/) [
Precalculus Homework Help ](https://www.physicsforums.com/forums/precalculus-
mathematics-homework-help.155/) [ Calculus Homework Help
](https://www.physicsforums.com/forums/calculus-and-beyond-homework-help.156/)
[ Bio/Chem Homework Help ](https://www.physicsforums.com/forums/biology-and-
chemistry-homework-help.157/) [ Engineering Homework Help
](https://www.physicsforums.com/forums/engineering-and-comp-sci-homework-
help.158/)


##  ◆  NoData


Every physics update the error between the actual velocity and the target
velocity needs to be given to the controller.


using [ LinearVelocityCmd
](namespaceignition_1_1gazebo_1_1components.html#a2fa067cac436d9da4a28f0120a68304e)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
math::Vector3d
](https://ignitionrobotics.org/api/math/6.8/namespaceignition_1_1math.html#a1f05093f5ee1a9ecdd54476792e4c206)
, class LinearVelocityCmdTag>
---

entity represented by [ ignition::math::Vector3d
](https://ignitionrobotics.org/api/math/6.8/namespaceignition_1_1math.html#a1f05093f5ee1a9ecdd54476792e4c206)
, expressed in the entity's frame.


__ Science Advisor


using [ JointType
](namespaceignition_1_1gazebo_1_1components.html#acea768d258d36da09082f0a28bbd6f4e)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html)
<sdf::JointType, class JointTypeTag, [ serializers::JointTypeSerializer
](classignition_1_1gazebo_1_1serializers_1_1JointTypeSerializer.html) >
---

A component that contains the joint type. This is a simple wrapper around
sdf::JointType.


Hi, so finally I got a spare hour to check this ;)


  * [ Forums  ](https://www.physicsforums.com/)
  * [ Homework Help  ](/#homework-help.260)
  * [ Introductory Physics Homework Help  ](/forums/introductory-physics-homework-help.153/)


Author


[
![@JenniferBuehler](https://avatars.githubusercontent.com/u/12842634?s=80&u=c4f3910a93a4f048638fcf101ad78f41d509d516&v=4)
](/JenniferBuehler)


edited


##  ◆  LogicalMicrophone


##  4\. Are there any other factors that can affect the velocity of a hanging
object attached to a disc?


**[ sven-hoek ](/sven-hoek) ** commented  Mar 6, 2019  •


Sorry, something went wrong.


V = mgh
K_rot = (1/2)Iω^2
V + K = 0


Owner


using [ ThermalCamera
](namespaceignition_1_1gazebo_1_1components.html#a2b4aea244b0e9f1d277c04c1ae865bfb)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html)
<sdf::Sensor, class ThermalCameraTag, [ serializers::SensorSerializer
](namespaceignition_1_1gazebo_1_1serializers.html#a28b4f8b3bfa52760faec77e3c30686eb)
>
---

A component type that contains a Thermal camera sensor, sdf::Sensor,
information.


using [ BatterySoC
](namespaceignition_1_1gazebo_1_1components.html#a68c8513c2b876f38fd80b17d518ec34e)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html)
<float, class BatterySoCTag>
---

A component that identifies an entity as being a battery. Float value
indicates state of charge.


[ ](https://github.com/)


[ Log in  ](/login/) [ Register  ](/login/register)


Copy link


First I would try to reduce the release tolerance (parameter `
release_tolerance ` in xacro) and see if this still happens then. Can you try
that?


##  ◆  CanonicalLink


I'm not sure about ` obj->getParent() ` , what is ` obj ` is in your case, is
it the
same object as [ here ](https://github.com/JenniferBuehler/gazebo-
pkgs/blob/f4700ea772e4757ed6a0ebffb50a288dd131dcf4/gazebo_grasp_plugin/src/GazeboGraspGripper.cpp#L183)
? Maybe try ` obj->getLink() ` ?
What is the velocity of the object before detachment? Does it have any?


Yes I've noticed the same steep drop in velocity just before detaching (as
posted above) with the Jaco, not sure why this happens. It's still when the
object is attached, but the gripper would have opened and would not be
touching the cube any more.


A component type that contains the commanded angular velocity of an entity in
the world frame represented by [ ignition::math::Vector3d
](https://ignitionrobotics.org/api/math/6.8/namespaceignition_1_1math.html#a1f05093f5ee1a9ecdd54476792e4c206)
.


Controlling both linear and angular velocity at the same time requires an
additional link. The link should be programmatically created with the same
origin as the link whose velocity is to be set. Create a prismatic joint with
the world as the parent and the phantom link as the child. Then create a
revolute joint with the phantom link as the parent and the link to be moved as
the child. Finally create joint motors on both joints to reach the target
velocity.


##  5\. What are the units of measurement used for the velocity of a hanging
object attached to a disc?


EzequielSeattle  __


currently the whole <sensor> element.  More...

using  |  [ LogicalMicrophone
](namespaceignition_1_1gazebo_1_1components.html#a8fdf60314f008577b611ac3f882997d1)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
logical_audio::Microphone
](structignition_1_1gazebo_1_1logical__audio_1_1Microphone.html) , class
LogicalMicrophoneTag, [ serializers::LogicalMicrophoneSerializer
](classignition_1_1gazebo_1_1serializers_1_1LogicalMicrophoneSerializer.html)
>
|  A component that contains a logical microphone, which is represented by [
logical_audio::Microphone
](structignition_1_1gazebo_1_1logical__audio_1_1Microphone.html "Properties of
a logical audio microphone. A microphone also has a pose, which can be stored
as a comp...") .  More...

using  |  [ LogPlaybackStatistics
](namespaceignition_1_1gazebo_1_1components.html#a6ed92acfa8412180f87b093d5b93bf17)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
ignition::msgs::LogPlaybackStatistics
](https://ignitionrobotics.org/api/msgs/6.2/classignition_1_1msgs_1_1LogPlaybackStatistics.html)
, class LogPlaybackStatisticsTag, [ serializers::MsgSerializer
](classignition_1_1gazebo_1_1serializers_1_1MsgSerializer.html) >
|  A component type that contains log playback, [ systems::LogPlayback
](classignition_1_1gazebo_1_1systems_1_1LogPlayback.html "Log state playback.
") , information. The log playback is created from world entity upon the
playback plugin being loaded.  More...

using  |  [ MagneticField
](namespaceignition_1_1gazebo_1_1components.html#a783cc4e30941b927b2df716133801f58)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
math::Vector3d
](https://ignitionrobotics.org/api/math/6.8/namespaceignition_1_1math.html#a1f05093f5ee1a9ecdd54476792e4c206)
, class MagneticFieldTag >
|  Stores the 3D magnetic field in teslas.  More...

using  |  [ Magnetometer
](namespaceignition_1_1gazebo_1_1components.html#ab46d05d13175bd4cde240c85f70be66e)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) <
sdf::Sensor, class MagnetometerTag, [ serializers::SensorSerializer


###  Set Velocity With Joint Motors


  * __
  * #6


Ok, so unfortunately it also doesn't seem to work when restoring the velocity
after [ this line ](https://github.com/JenniferBuehler/gazebo-
pkgs/blob/f4700ea772e4757ed6a0ebffb50a288dd131dcf4/gazebo_grasp_plugin/src/GazeboGraspFix.cpp#L621)
.

---

All reactions


Share:


**Advantages**


I have updated all my packages to support Melodic. You can now try again using
all my master branches.

---

All reactions


Can you please pull gazebo-pkgs again and try again?

---

All reactions


> **Note** Not all joints can be commanded to move at target velocity.
> Revolute, revolute2, prismatic, screw, and universal joints can be set.
> Ball, gearbox, and fixed joints cannot be set using any method described
> below. However, while a gearbox joint velocity cannot be set, the parent or
> child joint can be set if it is one of the supported joint types.


edited


MulticopterMotorModel and MulticopterVelocityControl systems.  More...

using  |  [ AirPressureSensor
](namespaceignition_1_1gazebo_1_1components.html#a558e71094f07d5febe3293830a234d36)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) <
sdf::Sensor, class AirPressureSensorTag, [ serializers::SensorSerializer
](namespaceignition_1_1gazebo_1_1serializers.html#a28b4f8b3bfa52760faec77e3c30686eb)
>
|  A component type that contains an air pressure sensor, sdf::AirPressure,
information.  More...

using  |  [ Altimeter
](namespaceignition_1_1gazebo_1_1components.html#aa7e9d6effc513c37e4236cbcc527204f)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) <
sdf::Sensor, class AltimeterTag, [ serializers::SensorSerializer
](namespaceignition_1_1gazebo_1_1serializers.html#a28b4f8b3bfa52760faec77e3c30686eb)
>
|  A component type that contains an altimeter sensor, sdf::Altimeter,
information.  More...

using  |  [ AngularAcceleration
](namespaceignition_1_1gazebo_1_1components.html#a363a90fb093035bb960259560c80eb2d)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
math::Vector3d
](https://ignitionrobotics.org/api/math/6.8/namespaceignition_1_1math.html#a1f05093f5ee1a9ecdd54476792e4c206)
, class AngularAccelerationTag >
|  A component type that contains angular acceleration of an entity
represented by [ ignition::math::Vector3d
](https://ignitionrobotics.org/api/math/6.8/namespaceignition_1_1math.html#a1f05093f5ee1a9ecdd54476792e4c206)
.  More...

using  |  [ AngularVelocity
](namespaceignition_1_1gazebo_1_1components.html#a8765830e03d589bc062533bb6b1cd640)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
math::Vector3d
](https://ignitionrobotics.org/api/math/6.8/namespaceignition_1_1math.html#a1f05093f5ee1a9ecdd54476792e4c206)
, class AngularVelocityTag >
|  A component type that contains angular velocity of an entity represented by
[ ignition::math::Vector3d
](https://ignitionrobotics.org/api/math/6.8/namespaceignition_1_1math.html#a1f05093f5ee1a9ecdd54476792e4c206)


###  Set Link Velocity Instantaneously


ignition::gazebo::components::IGN_GAZEBO_REGISTER_COMPONENT  |  (  |
"ign_gazebo_components.WorldPose"  |  ,
---|---|---|---
|  |  WorldPose  |
|  )  |  |

A component type that contains pose, [ ignition::math::Pose3d
](https://ignitionrobotics.org/api/math/6.8/namespaceignition_1_1math.html#a507d73d4a494a03691fb87691dd07215)
, information within a trajectory.


using [ LogicalAudioSource
](namespaceignition_1_1gazebo_1_1components.html#a9c543a6519b10ed43f788e75fe2d45a1)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
logical_audio::Source
](structignition_1_1gazebo_1_1logical__audio_1_1Source.html) , class
LogicalAudioSourceTag, [ serializers::LogicalAudioSourceSerializer
](classignition_1_1gazebo_1_1serializers_1_1LogicalAudioSourceSerializer.html)
>
---

A component that contains a logical audio source, which is represented by [
logical_audio::Source
](structignition_1_1gazebo_1_1logical__audio_1_1Source.html "Properties of a
logical audio source. A source also has a pose, which can be stored as a
component of...") .


Since your result is so obviously wrong, you should review your method. You
started from conservation of energy. It is most certainly a valid starting
point. So you may have made errors in the application of this principle to
this particular system, or errors in the subsequent algebraic manipulation.


Views


Author


* Oct 20, 2014


using [ ContactSensor
](namespaceignition_1_1gazebo_1_1components.html#a1c664a3515fe885c6db0c32c826030a4)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html)
<sdf::ElementPtr, class ContactSensorTag>
---

TODO(anyone) Substitute with sdf::Contact once that exists? This is currently
the whole <sensor> element.


Sign up for GitHub


using [ JointPositionReset
](namespaceignition_1_1gazebo_1_1components.html#ae2d25cb55c7de6129ed2b4d1aa1e0230)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
std::vector ](http://en.cppreference.com/w/cpp/container/vector.html)
<double>, class JointPositionResetTag, [ serializers::VectorDoubleSerializer
](classignition_1_1gazebo_1_1serializers_1_1VectorDoubleSerializer.html) >
---

Joint positions in SI units (rad for revolute, m for prismatic).


[
![@JenniferBuehler](https://avatars.githubusercontent.com/u/12842634?s=40&u=c4f3910a93a4f048638fcf101ad78f41d509d516&v=4)
](/JenniferBuehler)


using [ Visual
](namespaceignition_1_1gazebo_1_1components.html#a335a5a9e897b5b4f94bec2327e2c61b0)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
NoData
](namespaceignition_1_1gazebo_1_1components.html#a1bc8946395bec54053d52820e79c5ad3)
, class VisualTag>
---

A component that identifies an entity as being a visual.


[ __ Insights Author
](https://www.physicsforums.com/insights/author/haruspex/)


= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
Entity ](namespaceignition_1_1gazebo.html#ad83694d867b0e3a9446b535b5dfd208d) ,
class ParentEntityTag >
|  This component holds an entity's parent entity.  More...

using  |  [ ParentLinkName
](namespaceignition_1_1gazebo_1_1components.html#ac23e1c3d38fe3720591dc93885fbf8a6)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
std::string ](http://en.cppreference.com/w/cpp/string/basic_string.html) ,
class ParentLinkNameTag, [ serializers::StringSerializer
](classignition_1_1gazebo_1_1serializers_1_1StringSerializer.html) >
|  Holds the name of the entity's parent link.  More...

using  |  [ Performer
](namespaceignition_1_1gazebo_1_1components.html#a27f7c38dfcdd966e9a5b742e3d474383)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
NoData
](namespaceignition_1_1gazebo_1_1components.html#a1bc8946395bec54053d52820e79c5ad3)
, class PerformerTag >
|  This component identifies an entity as being a performer.  More...

using  |  [ PerformerAffinity
](namespaceignition_1_1gazebo_1_1components.html#a7c26ac2decebea3193ebb904f4e4d05b)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
std::string ](http://en.cppreference.com/w/cpp/string/basic_string.html) ,
class PerformerAffinityTag, [ serializers::StringSerializer
](classignition_1_1gazebo_1_1serializers_1_1StringSerializer.html) >
|  This component holds the address of the distributed secondary that this
performer is associated with.  More...

using  |  [ PerformerLevels
](namespaceignition_1_1gazebo_1_1components.html#a63507f357a378518e90f601e933661ba)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
std::set ](http://en.cppreference.com/w/cpp/container/set.html) < [ Entity
](namespaceignition_1_1gazebo.html#ad83694d867b0e3a9446b535b5dfd208d) >, class
PerformerLevelsTag, [ serializers::PerformerLevelsSerializer
](classignition_1_1gazebo_1_1serializers_1_1PerformerLevelsSerializer.html) >
|  Holds all the levels which a performer is in.  More...

using  |  [ PhysicsEnginePlugin


using [ SelfCollide
](namespaceignition_1_1gazebo_1_1components.html#a89fe93bb88309d7b395f6f78e6370d06)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html)
<bool, class SelfCollideTag>
---

A component used to hold a model's self collide property.


  * __
  * #8


A component type that contains linear velocity of an entity in the world frame
represented by [ ignition::math::Vector3d
](https://ignitionrobotics.org/api/math/6.8/namespaceignition_1_1math.html#a1f05093f5ee1a9ecdd54476792e4c206)
.


using  |  [ VisibilityFlags
](namespaceignition_1_1gazebo_1_1components.html#aa20d145f223c92d7e45ca336fc89602d)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) <
uint32_t, class VisibilityFlagsTag >
|  This component holds an entity's visibility flags (visual entities)
More...

using  |  [ Visual
](namespaceignition_1_1gazebo_1_1components.html#a335a5a9e897b5b4f94bec2327e2c61b0)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
NoData
](namespaceignition_1_1gazebo_1_1components.html#a1bc8946395bec54053d52820e79c5ad3)
, class VisualTag >
|  A component that identifies an entity as being a visual.  More...

using  |  [ Volume
](namespaceignition_1_1gazebo_1_1components.html#ad9a28bc9bfa323130c692fe2eddbf929)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) <
double, class VolumeTag >
|  A volume component where the units are m^3. Double value indicates volume
of an entity.  More...

using  |  [ Wind
](namespaceignition_1_1gazebo_1_1components.html#a6c40f98914db0aae7f17dc3b610e97ca)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
NoData
](namespaceignition_1_1gazebo_1_1components.html#a1bc8946395bec54053d52820e79c5ad3)
, class WindTag >
|  A component that identifies an entity as being a wind.  More...

using  |  [ WindMode
](namespaceignition_1_1gazebo_1_1components.html#a76d844a02651d673ff4c75d46bdc2c9b)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) <
bool, class WindModeTag >
|  A component used to indicate whether an entity is affected by wind.
More...

using  |  [ World
](namespaceignition_1_1gazebo_1_1components.html#a7f1ab6fadbd656edee3031b8ee6ffbb2)


##  ◆  LogPlaybackStatistics


[ gzserver: symbol lookup error  #28  ](/JenniferBuehler/gazebo-
pkgs/issues/28)


Sorry, something went wrong.


ignition::gazebo::components::IGN_GAZEBO_REGISTER_COMPONENT  |  (  |
"ign_gazebo_components.Collision"  |  ,
---|---|---|---
|  |  [ Collision
](namespaceignition_1_1gazebo_1_1components.html#a34b535712305c1f4bfe4613becb6e11f)
|
|  )  |  |

A component that holds the sdf::Collision object.


**Disadvantages**


A component type that contains the commanded linear velocity of an entity
represented by [ ignition::math::Vector3d
](https://ignitionrobotics.org/api/math/6.8/namespaceignition_1_1math.html#a1f05093f5ee1a9ecdd54476792e4c206)
, expressed in the world frame.


Replies


Copy link


This section will show how to use the three methods to set velocity on a link.


##  ◆  WindMode


using [ LogicalMicrophone
](namespaceignition_1_1gazebo_1_1components.html#a8fdf60314f008577b611ac3f882997d1)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
logical_audio::Microphone
](structignition_1_1gazebo_1_1logical__audio_1_1Microphone.html) , class
LogicalMicrophoneTag, [ serializers::LogicalMicrophoneSerializer
](classignition_1_1gazebo_1_1serializers_1_1LogicalMicrophoneSerializer.html)
>
---

A component that contains a logical microphone, which is represented by [
logical_audio::Microphone
](structignition_1_1gazebo_1_1logical__audio_1_1Microphone.html "Properties of
a logical audio microphone. A microphone also has a pose, which can be stored
as a comp...") .


Skip to content


[ __ Back  ](javascript:)


            // Create a phantom link
            this->phantomLink = model->CreateLink("__perfect_phantom_link__");
            sdf::ElementPtr config(new sdf::Element);
            config->Copy(_link->GetSDF()->Clone());
            config->GetAttribute("name")->Set("__perfect_phantom_link__");
            // Remove visuals/collisions/inertials
            while (config->HasElement("visual"))
            {
              config->RemoveChild(config->GetElement("visual"));
            }
            while (config->HasElement("collision"))
            {
              config->RemoveChild(config->GetElement("collision"));
            }
            while (config->HasElement("inertial"))
            {
              config->RemoveChild(config->GetElement("inertial"));
            }
            this->phantomLink->Load(config);
            this->phantomLink->Init();

            // create prismatic joint with parent "world" and child phantomLink
            this->prismaticJoint = engine->CreateJoint("prismatic");
            this->prismaticJoint->SetName(
                model->GetName() + "__perfect_vel_lin_joint__");
            physics::LinkPtr worldLink = boost::dynamic_pointer_cast<physics::Link>(
                world->GetByName("world"));
            math::Pose prismaticJointOrigin;
            this->prismaticJoint->Load(worldLink, this->phantomLink,
                prismaticJointOrigin);
            this->prismaticJoint->Init();
            double linearMagnitude = _linearVel.GetLength();
            this->prismaticJoint->SetAxis(0, _linearVel.Normalize());
            this->prismaticJoint->SetParam("fmax", 0, _maxForce);
            this->prismaticJoint->SetParam("vel", 0, linearMagnitude);

            // create revolute joint with parent phantomLink and child _link
            this->revoluteJoint = engine->CreateJoint("revolute");


##  Footer


    * [ CI/CD & Automation ](/solutions/ci-cd/)
    * [ DevOps ](/solutions/devops/)
    * [ DevSecOps  ](https://resources.github.com/devops/fundamentals/devsecops/)


this->jointController->Update();


A [ PID controller ](https://en.wikipedia.org/wiki/PID_controller) can be used
to apply forces on the joint axes. The class [ ` physics::JointController `
](http://osrf-
distributions.s3.amazonaws.com/gazebo/api/dev/classgazebo_1_1physics_1_1JointController.html)
can manager the PID controllers for you.


##  ◆  Joint


using [ PerformerLevels
](namespaceignition_1_1gazebo_1_1components.html#a63507f357a378518e90f601e933661ba)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
std::set ](http://en.cppreference.com/w/cpp/container/set.html) < [ Entity
](namespaceignition_1_1gazebo.html#ad83694d867b0e3a9446b535b5dfd208d) >, class
PerformerLevelsTag, [ serializers::PerformerLevelsSerializer
](classignition_1_1gazebo_1_1serializers_1_1PerformerLevelsSerializer.html) >
---

Holds all the levels which a performer is in.


` roslaunch grasp_execution_jaco_tutorial spawn_and_reach_test_cube.launch &&
sleep 1.5 && rosrun grasp_execution_jaco_tutorial grasp_cube_test && sleep 1
&& rosrun grasp_execution_jaco_tutorial set_arm_to_cube_test --home --no-
fingers `


using [ Imu
](namespaceignition_1_1gazebo_1_1components.html#a5b54cafbb965ca861020b90d5ccf7e2a)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html)
<sdf::Sensor, class ImuTag, [ serializers::SensorSerializer
](namespaceignition_1_1gazebo_1_1serializers.html#a28b4f8b3bfa52760faec77e3c30686eb)
>
---

A component type that contains an IMU sensor, sdf::IMU, information.


  * __
  * #7


voko


##  ◆  Altimeter


using [ ThreadPitch
](namespaceignition_1_1gazebo_1_1components.html#a5d971354591252162a5d84e5f5452da7)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html)
<double, class ThreadPitchTag>
---

A component used to store the thread pitch of a screw joint.


Sorry, something went wrong.


##  ◆  LevelBuffer


  * [ Tutorials ](/tutorials)
  * [ Download ](/download)
  * [ Blog ](/blog.html)
  * [ Media ](/media)
  * [ Projects ](/projects)


this->model->GetJoint("gray_joint")->SetVelocity(0, 1.0);


[
![@JenniferBuehler](https://avatars.githubusercontent.com/u/12842634?s=80&u=c4f3910a93a4f048638fcf101ad78f41d509d516&v=4)
](/JenniferBuehler)


Copy link


[ ![@sven-
hoek](https://avatars.githubusercontent.com/u/15048669?s=80&u=1184c86424c64f25eb98710ad8c40e72cc3fb679&v=4)
](/sven-hoek)


You signed in with another tab or window. [ Reload ]() to refresh your
session.  You signed out in another tab or window. [ Reload ]() to refresh
your session.  You switched accounts on another tab or window. [ Reload ]() to
refresh your session.  Dismiss alert


using [ JointPosition
](namespaceignition_1_1gazebo_1_1components.html#abd9a243e876698cd52bc1955c68e05f1)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
std::vector ](http://en.cppreference.com/w/cpp/container/vector.html)
<double>, class JointPositionTag, [ serializers::VectorDoubleSerializer
](classignition_1_1gazebo_1_1serializers_1_1VectorDoubleSerializer.html) >
---

Joint positions in SI units (rad for revolute, m for prismatic). The component
wraps a [ std::vector ](http://en.cppreference.com/w/cpp/container/vector.html
"STL class. ") of size equal to the degrees of freedom of the joint.


I've just used my Jaco test setup to test this, and I printed the velocities.
For me they actually make sense - only while the object is not moving, there
is still a very small (insignificant) velocity. However I've so far only
tested it on my current work computer with Indigo with the default install of
Gazebo 2, which is ancient. I will test it with a newer Gazebo version and
report back.


using [ Name
](namespaceignition_1_1gazebo_1_1components.html#a501c2b6aeb7302e017055ef1a442faab)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
std::string ](http://en.cppreference.com/w/cpp/string/basic_string.html) ,
class NameTag, [ serializers::StringSerializer
](classignition_1_1gazebo_1_1serializers_1_1StringSerializer.html) >
---

This component holds an entity's name. The component has no concept of scoped
names nor does it care about uniqueness.


[ Find the maximum KE of a charged Disc ](/threads/find-the-maximum-ke-of-a-
charged-disc.1009327/)


[
![@JenniferBuehler](https://avatars.githubusercontent.com/u/12842634?s=52&v=4)
](/JenniferBuehler) [ ![@sven-
hoek](https://avatars.githubusercontent.com/u/15048669?s=52&v=4) ](/sven-hoek)


A [ PID controller ](http://osrf-
distributions.s3.amazonaws.com/gazebo/api/7.1.0/classgazebo_1_1common_1_1PID.html)
can be used to set a velocity by appling forces or torques. This requires
tuning constants for each object whose velocity is to be set.


**[ JenniferBuehler ](/JenniferBuehler) ** commented  Feb 12, 2019


Views


* [ Insights  The Lambert W Function in Finance ](/threads/the-lambert-w-function-in-finance.1059849/ "The Lambert W Function in Finance")


__ Gold Member


[ 2 ](/threads/a-cylinder-of-snow-rolls-down-a-hill-gathering-more-snow-
calculate-its-speed.1054015/page-2)


Owner


The radius of the disc is a crucial factor in calculating the velocity of a
hanging object. It determines the distance the object must travel in a
circular motion, which affects the time taken for the object to complete one
revolution and thus, its velocity.


ignition::gazebo::components::IGN_GAZEBO_REGISTER_COMPONENT  |  (  |
"ign_gazebo_components.Sensor"  |  ,
---|---|---|---
|  |  [ Sensor
](namespaceignition_1_1gazebo_1_1components.html#ae2d25e3054c34c5737e140572d8db146)
|
|  )  |  |

Name of the transport topic where a sensor is publishing its data. For sensors
that publish on more than one topic, this will usually be the prefix common to
all topics of that sensor.


Replies


No milestone


[ Contact us ](/misc/contact)


##  ◆  Performer


|  A component that contains the joint axis . This is a simple wrapper around
sdf::JointAxis.  More...

using  |  [ JointForce
](namespaceignition_1_1gazebo_1_1components.html#a1dc573543b67913400b084bde0f69112)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
std::vector ](http://en.cppreference.com/w/cpp/container/vector.html) < double
>, class JointForceTag, [ serializers::VectorDoubleSerializer
](classignition_1_1gazebo_1_1serializers_1_1VectorDoubleSerializer.html) >
|  Force applied to a joint in SI units (Nm for revolute, N for prismatic).
More...

using  |  [ JointForceCmd
](namespaceignition_1_1gazebo_1_1components.html#acb1fa80d3ae07408b4bd1efbeedaef15)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
std::vector ](http://en.cppreference.com/w/cpp/container/vector.html) < double
>, class JointForceCmdTag >
|  Commanded joint forces (or torques) to be applied to a joint in SI units
(Nm for revolute, N for prismatic). The component wraps a [ std::vector
](http://en.cppreference.com/w/cpp/container/vector.html "STL class. ") and
systems that set this component need to ensure that the vector has the same
size as the degrees of freedom of the joint.  More...

using  |  [ JointPosition
](namespaceignition_1_1gazebo_1_1components.html#abd9a243e876698cd52bc1955c68e05f1)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
std::vector ](http://en.cppreference.com/w/cpp/container/vector.html) < double
>, class JointPositionTag, [ serializers::VectorDoubleSerializer
](classignition_1_1gazebo_1_1serializers_1_1VectorDoubleSerializer.html) >
|  Joint positions in SI units (rad for revolute, m for prismatic). The
component wraps a [ std::vector
](http://en.cppreference.com/w/cpp/container/vector.html "STL class. ") of
size equal to the degrees of freedom of the joint.  More...

using  |  [ JointPositionReset
](namespaceignition_1_1gazebo_1_1components.html#ae2d25cb55c7de6129ed2b4d1aa1e0230)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
std::vector ](http://en.cppreference.com/w/cpp/container/vector.html) < double
>, class JointPositionResetTag, [ serializers::VectorDoubleSerializer
](classignition_1_1gazebo_1_1serializers_1_1VectorDoubleSerializer.html) >


#  Search code, repositories, users, issues, pull requests...


    * [ All features ](/features)
    * [ Documentation  ](https://docs.github.com)
    * [ GitHub Skills  ](https://skills.github.com/)
    * [ Blog  ](https://github.blog)


  * Nov 27, 2021
Introductory Physics Homework Help


Copy link


**[ JenniferBuehler ](/JenniferBuehler) ** commented  Mar 1, 2019  •


using [ Geometry
](namespaceignition_1_1gazebo_1_1components.html#a328ff3e2ce4d1cd4df6115390f2ece4e)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html)
<sdf::Geometry, class GeometryTag, [ serializers::GeometrySerializer
](namespaceignition_1_1gazebo_1_1serializers.html#a12b083c5faaa8bc89d0113037c3cbf75)
>
---

This component holds an entity's geometry.


Classes  |  Typedefs  |  Functions


**[ JenniferBuehler ](/JenniferBuehler) ** commented  Feb 7, 2019


#  Saved searches


* [ Advanced Physics Homework Help ](https://www.physicsforums.com/forums/advanced-physics-homework-help.154/)


##  ◆  Camera


using [ JointVelocity
](namespaceignition_1_1gazebo_1_1components.html#a64427335ab235cc2ce07461b343f6eb3)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
std::vector ](http://en.cppreference.com/w/cpp/container/vector.html)
<double>, class JointVelocityTag, [ serializers::VectorDoubleSerializer
](classignition_1_1gazebo_1_1serializers_1_1VectorDoubleSerializer.html) >
---

Base class which can be extended to add serialization.


Additional navigation options


* [ Calculus Homework Help ](https://www.physicsforums.com/forums/calculus-and-beyond-homework-help.156/)


[ Sign in
](/login?return_to=https%3A%2F%2Fgithub.com%2FJenniferBuehler%2Fgazebo-
pkgs%2Fissues%2F26)


##  ◆  Name


              // Link velocity instantaneously without applying forces
              model->GetLink("white_link_0")->SetLinearVel({0, 1, 0});
              model->GetLink("white_link_1")->SetLinearVel({0, 1, 0});
              model->GetLink("white_link_1")->SetAngularVel({1, 0, 0});
              model->GetLink("white_link_2")->SetAngularVel({1, 0, 0});


Owner


##  ◆  PerformerLevels


**[ JenniferBuehler ](/JenniferBuehler) ** commented  Mar 4, 2019


Note that the [ EntityComponentManager
](classignition_1_1gazebo_1_1EntityComponentManager.html "The
EntityComponentManager constructs, deletes, and returns components and
entities. A component can be of any class which inherits from
components::BaseComponent. ") also keeps the parent-child relationship stored
in a graph, and that information should be kept in sync with the parent entity
components. Therefore, it is recommended that the ` ParentEntity ` component
is never edited by hand, and instead, entities should be created using the ` [
gazebo::SdfEntityCreator ](classignition_1_1gazebo_1_1SdfEntityCreator.html
"Provides convenient functions to spawn entities and load their plugins from
SDF elements, to remove them, and to change their hierarchy. ") ` class.


* Oct 22, 2014


##  ◆  ParentLinkName


I'm using an earlier commit of the PR, where everything version-related was
enclosed by ` #if ` -macros. Thanks for your support and for your work! Hope,
I can be of help by trying to resolve this. I'll check if the velocity
restoration works when done in the update method of the plugin.

---

All reactions


Copy link


Sorry, something went wrong.


##  ◆  AxisAlignedBox


The error occurs with or without setting the cmake variables before
(re)compilation. Also after cleaning the workspace or adding our packages to
the new jaco workspace, it still remained. But weirdly, it doesn't occur when
starting gazebo with the jaco packages.
Any idea why this symbol lookup error could occur despite using the same
Gazebo and plugin version?

---

All reactions


* [ Insights  Digital Filtering and Exact Reconstruction of Digital Audio ](/threads/digital-filtering-and-exact-reconstruction-of-digital-audio.1058252/ "Digital Filtering and Exact Reconstruction of Digital Audio")


  * Mar 3, 2024
Introductory Physics Homework Help


using [ Volume
](namespaceignition_1_1gazebo_1_1components.html#ad9a28bc9bfa323130c692fe2eddbf929)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html)
<double, class VolumeTag>
---

A volume component where the units are m^3. Double value indicates volume of
an entity.


##  Homework Equations


using [ Sensor
](namespaceignition_1_1gazebo_1_1components.html#ae2d25e3054c34c5737e140572d8db146)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
NoData
](namespaceignition_1_1gazebo_1_1components.html#a1bc8946395bec54053d52820e79c5ad3)
, class SensorTag>
---

A component that identifies an entity as being a link.


The velocity of a hanging object attached to a disc can be calculated using
the formula v = √(g*R*(1-cosθ)), where v is the velocity, g is the
acceleration due to gravity, R is the radius of the disc, and θ is the angle
at which the object is hanging.


Explore


  * __
  * #2


A component type that contains pose, [ ignition::math::Pose3d
](https://ignitionrobotics.org/api/math/6.8/namespaceignition_1_1math.html#a507d73d4a494a03691fb87691dd07215)
, information in world frame.


using [ JointVelocityCmd
](namespaceignition_1_1gazebo_1_1components.html#a576d9c565e61e34cfb56f8d9263c5848)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
std::vector ](http://en.cppreference.com/w/cpp/container/vector.html)
<double>, class JointVelocityCmdTag, [ serializers::VectorDoubleSerializer
](classignition_1_1gazebo_1_1serializers_1_1VectorDoubleSerializer.html) >
---

Base class which can be extended to add serialization.


          // Add a PID controller for each DoF
          for (int i = 0; i < 3; i++)
          {
            common::PID controller_translation(linear_p, linear_i, linear_d,
                linear_imax, -linear_imax, _maxForce, -_maxForce);
            common::PID controller_rotation(angular_p, angular_i, angular_d,
                angular_imax, -angular_imax, _maxTorque, -_maxTorque);
            this->controllers.push_back(controller_translation);
            this->controllers.push_back(controller_rotation);
          }


` gzserver: symbol lookup error:
/home/franka2/marcus_ws/devel/lib/libgazebo_grasp_fix.so: undefined symbol:
_ZN6gazebo10GetPhysicsERKN5boost10shared_ptrINS_7physics5WorldEEE `


JavaScript is disabled. For a better experience, please enable JavaScript in
your browser before proceeding.


Note, that I am using Gazebo9 with the plugin modifications from the open pull
request in this repo, so the method names should be ` GetWorldLinearVel ` , `
GetWorldAngularVel ` for Gazebo versions below 8.

---

All reactions


](structignition_1_1gazebo_1_1components_1_1DetachableJointInfo.html#details)

class  |  [ Factory ](classignition_1_1gazebo_1_1components_1_1Factory.html)
|  A factory that generates a component based on a string type. [ More...
](classignition_1_1gazebo_1_1components_1_1Factory.html#details)

class  |  [ StorageDescriptor
](classignition_1_1gazebo_1_1components_1_1StorageDescriptor.html)
|  A class for an object responsible for creating storages. [ More...
](classignition_1_1gazebo_1_1components_1_1StorageDescriptor.html#details)

class  |  [ StorageDescriptorBase
](classignition_1_1gazebo_1_1components_1_1StorageDescriptorBase.html)
|  A base class for an object responsible for creating storages. [ More...
](classignition_1_1gazebo_1_1components_1_1StorageDescriptorBase.html#details)

##  Typedefs

---
using  |  [ Actor
](namespaceignition_1_1gazebo_1_1components.html#ae68d27c14dc6e79c4c0d2e4f1124ad59)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) <
sdf::Actor, class ActorTag, [ serializers::ActorSerializer
](namespaceignition_1_1gazebo_1_1serializers.html#afa3a1d25225b2c00e0a21a5a816c28a6)
>
|  This component contains actor source information. For more information on
actors, see [ SDF's Actor element
](http://sdformat.org/spec?ver=1.6&elem=actor) .  More...

using  |  [ Actuators
](namespaceignition_1_1gazebo_1_1components.html#a0f945cf498a7361223925d9790ab824f)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
msgs::Actuators
](https://ignitionrobotics.org/api/msgs/6.2/classignition_1_1msgs_1_1Actuators.html)
, class ActuatorsTag, [ serializers::MsgSerializer
](classignition_1_1gazebo_1_1serializers_1_1MsgSerializer.html) >
|  A component type that contains a [ msgs::Actuators
](https://ignitionrobotics.org/api/msgs/6.2/classignition_1_1msgs_1_1Actuators.html)
message. This is used for example, to communicate between the


[ sven-hoek ](/sven-hoek) opened this issue  Feb 3, 2019  · 30 comments


All physics engines used by gazebo support setting an instananeous velocity.
Objects move at the target speed without any forces or torques being applied.
This means calls to [ ` Joint::GetForceTorque() ` ](http://osrf-
distributions.s3.amazonaws.com/gazebo/api/7.1.0/classgazebo_1_1physics_1_1Joint.html#a85f6b25f1d0d6451a84875c18c57535d)
, [ ` Link::GetWorldForce() ` ](http://osrf-
distributions.s3.amazonaws.com/gazebo/api/7.1.0/classgazebo_1_1physics_1_1Link.html#ab6d63e2c37c0273d1f8fd820d208f894)
and [ ` Link::GetWorldTorque() ` ](http://osrf-
distributions.s3.amazonaws.com/gazebo/api/7.1.0/classgazebo_1_1physics_1_1Link.html#ab4f3ec4a752b81b69198055b525cc026)
will not show any additional forces or torques when using this method.


###  Search


Replies


Components represent data, such as position information. An Entity usually has
one or more associated components.  More...


              this->jointController.reset(new physics::JointController(
                    this->model));
              this->jointController->AddJoint(model->GetJoint("purple_joint"));
              std::string name = model->GetJoint("purple_joint")->GetScopedName();
              this->jointController->SetVelocityPID(name, common::PID(100, 0, 0));
              this->jointController->SetVelocityTarget(name, 1.0);


using [ Joint
](namespaceignition_1_1gazebo_1_1components.html#a8f7e10bb3296e3db3e48b8276156fbe3)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
NoData
](namespaceignition_1_1gazebo_1_1components.html#a1bc8946395bec54053d52820e79c5ad3)
, class JointTag>
---

A component that identifies an entity as being a joint.


Owner


  if (this->dataPtr->jointCreated)
  {
    contact.set_data(true);
    this->dataPtr->contactPublisherCenter.Publish(contact);
    this->dataPtr->contactPublisherLeft.Publish(contact);
    this->dataPtr->contactPublisherRight.Publish(contact);
    this->dataPtr->contactPublisherTop.Publish(contact);
    this->dataPtr->contactPublisherBottom.Publish(contact);
  }
  else
  {
    contact.set_data(this->dataPtr->contacts[1][1] != kNullEntity);
    this->dataPtr->contactPublisherCenter.Publish(contact);
    contact.set_data(this->dataPtr->contacts[1][0] != kNullEntity);
    this->dataPtr->contactPublisherLeft.Publish(contact);
    contact.set_data(this->dataPtr->contacts[1][2] != kNullEntity);
    this->dataPtr->contactPublisherRight.Publish(contact);
    contact.set_data(this->dataPtr->contacts[0][1] != kNullEntity);
    this->dataPtr->contactPublisherTop.Publish(contact);
    contact.set_data(this->dataPtr->contacts[2][1] != kNullEntity);
    this->dataPtr->contactPublisherBottom.Publish(contact);
  }
  if (!this->dataPtr->jointCreated && this->dataPtr->suctionOn)
  {
    // check that two sensors are making contact with the same object
    auto checkContacts =
      [&](std::pair<int, int> idx0, std::pair<int, int> idx1) -> bool {
        auto contact0 = this->dataPtr->contacts[idx0.first][idx0.second];
        auto contact1 = this->dataPtr->contacts[idx1.first][idx1.second];
        return
          (contact0 != kNullEntity &&
           contact1 != kNullEntity &&
           contact0 == contact1);
      };
    bool contactMade =
      (checkContacts({1, 1}, {1, 0}) ||  // Center + left
       checkContacts({1, 1}, {1, 2}) ||  // Center + right
       checkContacts({1, 1}, {0, 1}) ||  // Center + top
       checkContacts({1, 1}, {2, 1}));   // Center + bottom
    if (contactMade)


Labels


[ Downloaded an example plugin here
](http://github.com/osrf/gazebo_tutorials/raw/master/set_velocity/examples/set_vel_plugin/)
. Follow these steps to build and run the plugin.


using [ Collision
](namespaceignition_1_1gazebo_1_1components.html#a34b535712305c1f4bfe4613becb6e11f)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
NoData
](namespaceignition_1_1gazebo_1_1components.html#a1bc8946395bec54053d52820e79c5ad3)
, class CollisionTag>
---

A component that identifies an entity as being a collision.


Development


Sorry, something went wrong.


##  ◆  BatterySoC


__ Top


##  ◆  JointVelocityCmd


using [ Light
](namespaceignition_1_1gazebo_1_1components.html#ace2004cd1adcacef8cc16a5dd636af1a)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html)
<sdf::Light, class LightTag, [ serializers::LightSerializer
](namespaceignition_1_1gazebo_1_1serializers.html#a9c3b4b9cfa738abf3ca2b304aa0cde37)
>
---

This component contains light source information. For more information on
lights, see [ SDF's Light element
](http://sdformat.org/spec?ver=1.6&elem=light) .


Views


Joint motors can be used to move links by creating a joint connecting the link
to the world. It is critical that the joints are created when the velocity is
to be applied, and deleted afterwards.


##  ◆  SlipComplianceCmd


##  ◆  JointForce


Resources


[ ![@sven-
hoek](https://avatars.githubusercontent.com/u/15048669?s=80&u=1184c86424c64f25eb98710ad8c40e72cc3fb679&v=4)
](/sven-hoek)


####  Table of Contents


using [ DetachableJoint
](namespaceignition_1_1gazebo_1_1components.html#a91ad2ada0de391955fb6e0f9fafe7828)
= [ Component ](classignition_1_1gazebo_1_1components_1_1Component.html) < [
DetachableJointInfo
](structignition_1_1gazebo_1_1components_1_1DetachableJointInfo.html) , class
DetachableJointTag, [ serializers::DetachableJointInfoSerializer
](classignition_1_1gazebo_1_1serializers_1_1DetachableJointInfoSerializer.html)
>
---

A component that identifies an entity as being a detachable joint. It also
contains additional information about the joint.


#include <ignition/plugin/Register.hh>
#include <ignition/transport/Node.hh>
#include <ignition/msgs/contacts.pb.h>
#include <ignition/msgs.hh>
#include <ignition/gazebo/components.hh>
#include <ignition/gazebo/Model.hh>
#include "SuctionGripper.hh"
using namespace mbzirc;
using namespace ignition;
using namespace gazebo;
class mbzirc::SuctionGripperPrivate
{
  /// \brief The item being moved
  public: Entity childItem{kNullEntity};
  /// \brief The gripper link name
  public: std::string linkName;
  /// \brief Used to store the joint when we attach to an object
  public: Entity joint{kNullEntity};
  /// \brief The gripper link entity
  public: Entity gripperEntity{kNullEntity};
  /// \brief The transport node
  public: transport::Node node;
  /// \brief Used for determining when the suction is on.
  public: bool suctionOn{false};
  /// \brief Set to true when we detect the suction gripper is in contact
  public: bool pendingJointCreation{false};
  /// \brief True when we are holding an object
  public: bool jointCreated{false};
  /// \brief mutex for accessing member variables
  public: std::mutex mtx;
  /// \brief Two-dimensional array of contact points
  public: std::array<std::array<Entity, 3>, 3> contacts;
  /// \brief Publisher for contact points
  public: transport::Node::Publisher contactPublisherCenter;
  public: transport::Node::Publisher contactPublisherLeft;
  public: transport::Node::Publisher contactPublisherRight;
  public: transport::Node::Publisher contactPublisherTop;
  public: transport::Node::Publisher contactPublisherBottom;
  /// \brief Callback for when contact is made
  public: void OnContact(int idx0, int idx1,


##  Use saved searches to filter your results more quickly


Also, what's the output of


**[ JenniferBuehler ](/JenniferBuehler) ** commented  Mar 8, 2019


##  ◆  RenderEngineGuiPlugin


    * [ Learning Pathways  ](https://resources.github.com/learn/pathways/)
    * [ White papers, Ebooks, Webinars  ](https://resources.github.com/)
    * [ Customer Stories ](/customer-stories)
    * [ Partners  ](https://partner.github.com/)


Hi,
Yes I should get rid of the warnings at some point, however they relate to the
catkin_package() command and that shouldn't be related to the issue you're
having.
It looks like the grasp fix plugin may have been compiled with the wrong
version, though it's strange it happens only with that line then.
Have you tried to completely re-compile all packages including your Franka
package, by removing the ` build ` and ` devel ` directories in your catkin
workspace and compile again?
Let me know if the issue still comes up then.

---

All reactions


It happens right when opening the gripper (the messages stop afterwards but
the object is not being detached).