Gazebo | Ignition | Community
Ask Your Question

pointer to joint_state doest works

asked 2016-09-07 07:30:57 -0500

hari1234 gravatar image

updated 2016-09-07 09:32:32 -0500

I was trying to use the joint_state class of gazebo API, but when i try to declare it as physics::JointStatePtr jointstatep; It shows:

 error: ‘JointStatePtr’ in namespace ‘gazebo::physics’ does not name a type
     private: physics::JointStatePtr js;
 error: ‘class gazebo::VelodynePlugin’ has no member named ‘JointPointer()’

How do i use the JointPointer state class, to read the joint states of any joint. I tried this one but doesn't works:

public: void SetVelocity(const double &_vel)
  // Set the joint's target velocity
      this->joint->GetScopedName(), _vel,0);

private: physics::JointState_M js;
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2016-09-07 09:19:38 -0500

nkoenig gravatar image

What version of Gazebo are you using? I don't think there is a JointStatePtr type.

I assume you followed the Velodyne tutorial. If this is true, then the VelodynePlugin does not have aJointPointer function.

Can you provide more information about what you are trying to accomplish. More code snippets will help as well.

edit flag offensive delete link more


i am using gazebo 7.23 with ros indigo, i also tried JointState_M, but no use. I am trying to understand the gazebo API this days, since i am working with API's first time i've few problems, although i am cs student i cant grab those things, for s/w dev purpose. I just want to access the JointState class functions, somehow.

hari1234 gravatar imagehari1234 ( 2016-09-07 09:23:20 -0500 )edit

Here is the gazebo API docs: The `JointState` class is only used for state logging and playback log files. If you are looking for instantaneous joint information, you should use the functions provided in the `Joint` class.

nkoenig gravatar imagenkoenig ( 2016-09-07 09:31:51 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2016-09-07 07:30:57 -0500

Seen: 122 times

Last updated: Sep 07 '16