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

gazebo physics:: member function not found

$
0
0
I was following velodyne control plugin tutorial but as i try to build the velodyne_plugin.cc file get this error: /home/rob/velodyne_plugin/velodyne_plugin.cc:42:42: error: ‘class gazebo::physics::JointController’ has no member named ‘SetVelocityPID’ this->model->GetJointController()->SetVelocityPID( ^ /home/rob/velodyne_plugin/velodyne_plugin.cc: In member function ‘void gazebo::VelodynePlugin::SetVelocity(const double&)’: /home/rob/velodyne_plugin/velodyne_plugin.cc:71:42: error: ‘class gazebo::physics::JointController’ has no member named ‘SetVelocityTarget’ this->model->GetJointController()->SetVelocityTarget( When i saw the gazebo::physics::jointcontroller class reference [here](http://osrf-distributions.s3.amazonaws.com/gazebo/api/dev/classgazebo_1_1physics_1_1JointController.html), i can clearly see that it contatins the member function named SetVelocityTargt SetVelocityPID and others, i have a doubt that because i am using gazebo2.2 which came with ros indigo, this is happening. Do i have to upgrade my gazebo to use all features? Till this step the code builds without error: class VelodynePlugin : public ModelPlugin { public: VelodynePlugin() {} public: virtual void Load(physics::ModelPtr _model, sdf::ElementPtr _sdf) { std::cerr << "\nThe velodyne plugin is attach to model[" << _model->GetName() << "]\n"; if(_model->GetJointCount() == 0) { std::cerr<<"Invalid joint count, Velodyne plugin not loaded/n"; return; } this->model = _model; this->joint = _model->GetJoints()[0]; this->pid = common::PID(0.1,0,0); } private: physics::ModelPtr model; private: physics::JointPtr joint; private: common::PID pid; };

Viewing all articles
Browse latest Browse all 7017

Trending Articles