Gazebo | Ignition | Community
Ask Your Question
0

basic questions & joint velocity

asked 2014-01-27 16:38:23 -0500

pawel gravatar image

updated 2014-01-28 03:07:15 -0500

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

edit retag flag offensive close merge delete

Comments

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

ffurrer gravatar imageffurrer ( 2014-01-27 18:31:11 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-01-28 07:10:49 -0500

pawel gravatar image

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/controlrobot/mobilebase_laser

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

edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-01-27 16:38:23 -0500

Seen: 905 times

Last updated: Jan 28 '14