Robotics StackExchange | Archived questions

basic questions & joint velocity

Hi! I spent last month struggling with Ubuntu, ROS, Gazebo etc. an I'm still having some questions totally obvious for you, but can save me lot of time. What I need to do is a 2-wheel mobile platform using Hokuyo laser to build his map. I'd appreciate if anyone tell me the easiest way to do it. I tried using ros_control but got some problems with the packge. Now I'm trying to build one gazebo model plugin subscribing to Hokuyo's topic and managing joint velocity. Still, I don't know:

  1. How could it then orientate in space to build a map. Is Gazebo providing something like the global coordinates frame or current position of a robot?

  2. In a plugin, I've thought of using a joint object in the way like here:

namespace gazebo { class SetJoints : public ModelPlugin { public: SetJoints() : ModelPlugin() {
}

public: void Load(physics::ModelPtr _model, sdf::ElementPtr _sdf)
  {
                                //left_wheel_hinge is my name for the joint in model.sdf file
 this->leftJoint = physics::Base.getByName("left_wheel_hinge");
  }

public: void OnUpdate(const common::UpdateInfo & _info)
{
leftJoint->setVelocity(1,1)
}
private: physics::Joint *leftJoint;

}; GZREGISTERMODEL_PLUGIN(SetJoints) }

Code does not work because of getByName function. Is there any way to use joint object in the plugin? Thanks for any help

Asked by pawel on 2014-01-27 17:38:23 UTC

Comments

Please update the title of your question to something more concrete to get more attention.

Asked by ffurrer on 2014-01-27 19:31:11 UTC

Answers

Answering my 2nd question, here is a set of help links: http://answers.gazebosim.org/question/5226/setting-joint-velocity-from-a-plugin/ http://gazebosim.org/wiki/Tutorials/1.3/control_robot/mobile_base_laser

Still, is it possible to orientate in 2D space using just gazebo?

Asked by pawel on 2014-01-28 08:10:49 UTC

Comments