Quantcast
Channel: Gazebo: Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 7017

How can I use the deprecated function SetAngle?

$
0
0
Hi everybody, In my plugin I want to set the angle of a revolute joint according with a particular dynamic. To do this I used the function void gazebo::physics::Joint::SetAngle ( unsigned int _index, math::Angle _angle) This function in declared as GAZEBO_DEPRECATED(version). When I try to compile the code, I have this return : warning: 'void gazebo::physics::Joint::SetAngle(unsigned int, gazebo::math::Angle)' is deprecated (declared at /usr/include/gazebo-5.2/gazebo/physics/joint.hh:396 [-Wdeprecated-declaretions]. I'm not able to understand why I can't use this function. Is there a method that enables the user to use this type of function? I tried to add this piece of code : #if defined(__GNUC__) #define GAZEBO_DEPRECATED(version) __attribute__((deprecated)) #define GAZEBO_FORCEINLINE __attribute__((always_inline)) #elif defined(_WIN32) #define GAZEBO_DEPRECATED(version) #define GAZEBO_FORCEINLINE __forceinline #else #define GAZEBO_DEPRECATED(version) () #define GAZEBO_FORCEINLINE #endif But appears an error like: may not appear in macro parameter list #define GAZEBO_FORCEINLINE __attribute__((always_inline)) Otherwise, is there other functions that can make the same thing of SetAngle? Thank you, bye!

Viewing all articles
Browse latest Browse all 7017

Trending Articles