Gazebo | Ignition | Community
Ask Your Question

kaldo's profile - activity

2017-07-08 13:09:10 -0600 received badge  Famous Question (source)
2017-07-08 13:09:10 -0600 received badge  Notable Question (source)
2017-06-26 14:34:37 -0600 received badge  Famous Question (source)
2017-06-26 14:34:37 -0600 received badge  Notable Question (source)
2017-06-26 14:34:37 -0600 received badge  Popular Question (source)
2017-05-28 08:35:27 -0600 received badge  Famous Question (source)
2017-02-19 03:49:45 -0600 received badge  Famous Question (source)
2017-02-07 14:39:27 -0600 received badge  Notable Question (source)
2017-02-07 13:14:41 -0600 received badge  Popular Question (source)
2017-01-27 17:10:04 -0600 commented answer Why can't I set PID gains through JointController?

Actually, reading the doc had led me to think I would get the actual objects. So I was surprised at the actual behavior and wondering if it was intended.

2017-01-27 12:36:53 -0600 asked a question Why can't I set PID gains through JointController?


When I set the gains of my PID object using a direct reference it works, as :

common::PID pid = common::PID(0.1, 0, 0);
std::cout << pid.GetPGain();

std::cout << pid.GetPGain();



However, when I access it through the joint controller, the gain value isn't set.

std::cout << model->GetJointController()->GetPositionPIDs()[joint->GetScopedName()]->GetPGain();


std::cout << model->GetJointController()->GetPositionPIDs()[joint->GetScopedName()]->GetPGain();



Does GetPositionPIDs not provide you with the actual PID objects, but a bunch of copies?


2017-01-26 23:27:32 -0600 received badge  Popular Question (source)
2017-01-25 11:47:21 -0600 received badge  Supporter (source)
2017-01-25 10:24:05 -0600 received badge  Teacher (source)
2017-01-25 10:24:05 -0600 received badge  Self-Learner (source)
2017-01-25 03:08:50 -0600 received badge  Organizer (source)
2017-01-24 23:43:02 -0600 asked a question Attach plugin to included laser model


My sdf model contains an included Hokuyo laser, and I tried to attach the rather standard plugin, as follows:

<model name="my_laser">
        <pose>-0.22 0 0.10500000000000001 0 0 3.141592653589793</pose>
        <plugin name="laser_plugin" filename="" />

I get this error:

Model[my_laser] is attempting to load a plugin, but detected an incorrect plugin type.

Indeed, from what I see in the example, the plugin is meant for <sensor> elements.

So can I access the sensor itself, and attach the plugin to it directly?

If not, how do you suggest I use the plugin?


2017-01-24 03:20:48 -0600 commented answer Rotate joint around given axis (steer car)

Thank you :) Gazebo is already verbose and said nothing. And I'm using an adapted version of the "standard" cart with front steering, so I don't expect to have any extravagant link. I split my joint as you suggested, but can get only one to move at a time. Could you please elaborate on the dummy link?

2017-01-24 01:14:53 -0600 received badge  Scholar (source)
2017-01-24 01:14:40 -0600 answered a question Can't load plugin with roslaunch

As a workaround, I set the GAZEBO_PLUGIN_PATH directly in my launch file, adding an <env> tag at the beginning :

  <!-- Set up env variable so plugin are found -->
  <env name="GAZEBO_PLUGIN_PATH" value="$(find car_gazebo)/plugins"/>
2017-01-23 13:37:39 -0600 asked a question Rotate joint around given axis (steer car)


I have a car whose front wheel are connected to chassis in this manner :

<joint name="wheel_front_left_steer_spin" type="universal">
    <xyz>0 -1 0</xyz>
    <xyz>0 0 1</xyz>

In order to steer my car, I want to set the position around axis2 to 30 degrees. So I tried this (inside my plugin):

 this->joint_ = model_->GetJoint("car::wheel_front_left_steer_spin");

 this->steer_pid_ = common::PID(0.1, 0, 0);

 this->model_->GetJointController()->SetPositionPID(joint_->GetScopedName(), steer_pid_);

 double position = -3.14159265 / 6;
 this->model_->GetJointController()->SetVelocityTarget(joint_->GetScopedName(), position);

But it sends my car bouncing and jumping uncontrollably. So how do I set the angle of my wheels? I haven't found clear examples and couldn't figure it out from the doc.

Thanks in advance,

EDIT: So I split my joint into two revolute joints, but can only get one moving at a time. How can I link the two so I keep the 2 degrees of freedom?

<joint name="wheel_front_right_steer" type="revolute">
        <xyz>0 -1 0</xyz>

<link name="wheel_front_right_steer_link">
     <!-- Not sure what to put here -->

<joint name="wheel_front_right_spin" type="revolute">
        <xyz>0 0 1</xyz>
2017-01-23 09:23:21 -0600 received badge  Enthusiast
2017-01-19 04:12:39 -0600 received badge  Notable Question (source)
2017-01-13 09:06:28 -0600 received badge  Popular Question (source)
2017-01-12 12:37:59 -0600 received badge  Editor (source)
2017-01-12 12:08:45 -0600 commented question Can't load plugin with roslaunch

Thanks for the input! I have modified the launch file to run in verbose mode, and an error came up! I have edited the question.

2017-01-12 11:09:07 -0600 asked a question Can't load plugin with roslaunch

My world file (adapted from the tutorial) contains a plugin :

<model name="my_car">
    <plugin name="car_control" filename="car_plugin/build/">

What works

The plugin loads and displays the expected message when I do this :

$ export GAZEBO_MODEL_PATH="$CATKIN_WS/src/tas_group_2/car_gazebo/models"
$ export GAZEBO_PLUGIN_PATH="$CATKIN_WS/src/tas_group_2/car_gazebo/plugins"
$ gazebo worlds/

What doesn't

However I can't get it to launch through roslaunch with :

$ roslaunch car_gazebo car.launch

and I get te following error :

[Err] [Plugin.hh:165] Failed to load plugin car_plugin/build/ car_plugin/build/ cannot open shared object file: No such file or directory

My files contain : package.xml (car_gazebo) :

<?xml version="1.0"?>

        <gazebo_ros gazebo_model_path="${prefix}/models"/>
        <gazebo_ros gazebo_plugin_path="${prefix}/plugins"/>

car.launch :

  <include file="$(find gazebo_ros)/launch/empty_world.launch">
    <arg name="world_name" value="$(find car_gazebo)/worlds/" />
    <arg name="verbose" value="true" />

My question

I thought the two methods where equivalent. Because I specified the environment variables in the <export> tag.

<gazebo_ros gazebo_model_path="${prefix}/models"/> allowed gazebo to find my model, while <gazebo_ros gazebo_plugin_path="${prefix}/plugins"/> doesn't help find my plugin. How come?

Any idea how to get the plugin to work with the roslaunch command?