Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

gazebo physics:: member function not found

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, i can clearly see that it contatins the member function named

SetVelocityTargt

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?

gazebo physics:: member function not found

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, i can clearly see that it contatins the member function named

SetVelocityTargt
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?

gazebo physics:: member function not found

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, 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?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);
      this->model->GetJointController()->SetVelocityPID(
      this->joint->GetScopedName(), this->pid);
    }
    private: physics::ModelPtr model;
    private: physics::JointPtr joint;
    private: common::PID pid;
  };

gazebo physics:: member function not found

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, 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);
      this->model->GetJointController()->SetVelocityPID(
      this->joint->GetScopedName(), this->pid);
    }
    private: physics::ModelPtr model;
    private: physics::JointPtr joint;
    private: common::PID pid;
  };