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:
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?
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
Please update the title of your question to something more concrete to get more attention.