Home | Tutorials | Wiki | Issues
Ask Your Question

cyborg_x1's profile - activity

2017-08-17 07:12:40 -0500 received badge  Famous Question (source)
2017-04-23 01:14:11 -0500 received badge  Notable Question (source)
2017-04-18 01:05:59 -0500 received badge  Popular Question (source)
2017-03-24 11:29:16 -0500 answered a question Questions to SDF, urdf, xacro, material, textures using Gazebo

Found the way to do it. This works for me:

Well in the package.xml you need:

<run_depend>gazebo_ros</run_depend>

<export>    
  <gazebo_ros gazebo_media_path="${prefix}"/>                             
</export>

${prefix} == package directory

and the folder structure is like this:

  • media
    • materials
      • scripts
      • texture

in the xacro file:

<gazebo reference="link">                           
<material>YourMaterial</material>
</gazebo>

I guess in the process I changed the folder structure multiple times, maybe I first missed the media folder.

2017-03-24 08:50:19 -0500 asked a question Questions to SDF, urdf, xacro, material, textures using Gazebo

Hi,

My question is basically how to add material scripts with a ROS package,and to use it within xacro files like the standard Gazebo material so I also get textures.

I started this question in ros.answers.org cause I thought it has more to do with ros, catkin and xacro.

But maybe a cross link here to it, can do no harm.

I don't know if that's the correct way to do so, but it relates to both Gazebo and ROS. If the cross link to ROS answers is not wanted, you can just delete this post.

Regards,

Christian

2016-01-04 05:18:36 -0500 received badge  Famous Question (source)
2015-05-08 06:48:02 -0500 received badge  Notable Question (source)
2015-05-08 04:05:21 -0500 received badge  Famous Question (source)
2015-03-30 04:31:20 -0500 received badge  Popular Question (source)
2015-03-17 16:43:21 -0500 received badge  Scholar (source)
2015-03-11 14:27:40 -0500 commented answer ROS plugin - SDF empty robotNamespace

See in my repository ... just fixed it. Be also sure not to write /topic ! Write topic as name instead. The / means "root". https://github.com/cyborg-x1/rapidrobotxacros/blob/master/launch/multidiffdrive_bot.launch

2015-03-09 06:45:30 -0500 answered a question ROS plugin - SDF empty robotNamespace

Try using group tags in your launchfile, it worked for me automatically. Do not set robot namespace, in urdf otherwise they are not set by the group in the launch file.

2015-03-09 05:38:50 -0500 asked a question Multiple bumper sensors / Filter with the same name already exists

I have a problem when using multiple bumpers at once.

Contact manager tells me that the current filter name is already existant.

Error [ContactManager.cc:271] Filter with the same name already exists! Aborting Error [ContactManager.cc:271] Filter with the same name already exists! Aborting

Only one button is working fine. The others are there but do not work at all.

Any idea what I have to change?

<xacro:rr_m_gz_black name="bumper0"/>
  <link name="bumper1_link">
    <visual>
      <geometry>
        <box size="0.02 0.02 0.25"/>
      </geometry>
      <material name="rr_m_black"/>
    </visual>
    <collision name="bumper1_link_collision">
      <geometry>
        <box size="0.02 0.02 0.25"/>
      </geometry>
    </collision>
    <xacro:inertia_box mass="0.1" x="0.02" y="0.02" z="0.25">
      <origin rpy="0 0 0" xyz="0 0 0"/>
    </xacro:inertia_box>
  </link>
  <joint name="bumper1_base_link_joint" type="fixed">
    <parent link="base_link"/>
    <child link="bumper1_link"/>
    <origin rpy="0 0 0" xyz="0.462087247631 -0.20225 0.202255871446"/>
  </joint>
  <gazebo reference="bumper1_link">
    <sensor name="bumper1_sensor" type="contact">
      <always_on>true</always_on>
      <update_rate>30</update_rate>
      <contact>
        <collision>bumper1_link_collision</collision>
      </contact>
      <plugin filename="libgazebo_ros_bumper.so" name="bumper1_plugin">
        <bumperTopicName>bumper1</bumperTopicName>
        <frameName>bumper1</frameName>
      </plugin>
    </sensor>
  </gazebo>
  <xacro:rr_m_gz_black name="bumper1"/>
  <link name="bumper2_link">
    <visual>
      <geometry>
        <box size="0.02 0.3645 0.02"/>
      </geometry>
      <material name="rr_m_black"/>
    </visual>
    <collision name="bumper2_link_collision">
      <geometry>
        <box size="0.02 0.3645 0.02"/>
      </geometry>
    </collision>
    <xacro:inertia_box mass="0.1" x="0.02" y="0.02" z="0.04">
      <origin rpy="0 0 0" xyz="0 0 0"/>
    </xacro:inertia_box>
  </link>
  <joint name="bumper2_base_link_joint" type="fixed">
    <parent link="base_link"/>
    <child link="bumper2_link"/>
    <origin rpy="0 0 0" xyz="0.462087247631 0 0.139755871446"/>
  </joint>
  <gazebo reference="bumper2_link">
    <sensor name="bumper2_sensor" type="contact">
      <always_on>true</always_on>
      <update_rate>30</update_rate>
      <contact>
        <collision>bumper2_link_collision</collision>
      </contact>
      <plugin filename="libgazebo_ros_bumper.so" name="bumper2_plugin">
        <bumperTopicName>bumper2</bumperTopicName>
        <frameName>bumper2</frameName>
      </plugin>
    </sensor>
  </gazebo>
  <xacro:rr_m_gz_black name="bumper2"/>

My Code can be found here (and above), if you want to try it:

Thanks a lot!

2015-03-09 04:54:29 -0500 received badge  Supporter (source)
2015-03-07 22:30:42 -0500 received badge  Notable Question (source)
2015-03-04 11:20:24 -0500 received badge  Self-Learner (source)
2015-03-04 11:20:24 -0500 received badge  Teacher (source)
2015-03-03 09:27:04 -0500 received badge  Popular Question (source)
2015-03-03 06:43:42 -0500 commented answer What is wrong with my Contact Sensor Code?

Thanks a lot for your help, I would give you a rate but currently I do not have enough Karma to do so ... do you know how I could get another topic from the node instead of the strange gazebo topic?

2015-03-03 06:40:27 -0500 answered a question What is wrong with my Contact Sensor Code?

Thanks to ffurer, I found the problem now. I tried to have an empty base link for easier placement of the stuff. Well but actually the bumper seems to need full inertia setup in the chain from base link. Otherwise Gazebo crashes. Now I just need how to get a more "useful" topic from that contact, which can be got from a node on a real robot.

What I tried with my code above was:

CAUTION: CODE, NOT WORKING:

<link name="base_link"/><!-- PROBLEM -->
<link name="chassis">
 <xacro:inertia_box x="${chassis_len}" y="${chassis_width}" z="${chassis_height}" mass="1">
  <origin xyz="0  0 0" rpy="0 0 0" />
</xacro:inertia_box>
<visual>
    <geometry>
        <box size="${chassis_len} ${chassis_width} ${chassis_height}" />
    </geometry>
    <material name="Green">
        <color rgba="0 1 0 0.5"/>
    </material>
</visual>
<collision>
    <geometry>
        <box size="${chassis_len} ${chassis_width} ${chassis_height}" />
    </geometry>

</collision>
</link>


<gazebo reference="chassis">
<material value="Gazebo/Green"/>

</gazebo>


<joint name="base_chassis_joint" type="fixed">
<parent link="base_link" />
<child link="chassis" />
<origin xyz="0 0 ${chassis_floor_clearance+chassis_height/2}" rpy="0 0 0" />

</joint>
2015-03-03 04:44:44 -0500 commented answer What is wrong with my Contact Sensor Code?

Hmm, ok I see the code is working, ... so I guess the fault is somewhere else in my model code.

2015-03-02 10:54:49 -0500 commented question Building Mobile Robot

So true ... made that mistake myself ... build nice SDF Model, oh sorry robot state publisher needs URDF ... :-(

2015-03-02 08:59:10 -0500 received badge  Editor (source)
2015-03-02 08:58:19 -0500 asked a question What is wrong with my Contact Sensor Code?

Hi,

For days I am trying to get my bumper working can you please tell me how to correct the following code?

I tried to get the answer on ros.answers already till I figured out yesterday that gazebo does not create the contact topic for the bumper and showes the following error:

* Internal Program Error - assertion (this->customContactPublishers.count(name) > 0) failed in std::string gazebo::physics::ContactManager::CreateFilter(const string&, const std::vector<std::basic_string<char> >&): /tmp/buildd/gazebo2-2.2.3/gazebo/physics/ContactManager.cc(329): Failed to create a custom filter Aborted (core dumped)

The question is WHY doesn't it create it and crashes instead. I tried multiple resources examples etc. I am also using the diff drive plugin, which creates contacts of the wheels properly.

The sensor itself is just a box, sitting in front of the robot on one side.

Here is the code in my xacro-URDF file.

<link name="bumper0">
<visual>
    <geometry>
        <box size="0.1 0.1 0.1" />
    </geometry>
</visual>
<collision name="bumper0_collision">
    <geometry>
        <box size="0.1 0.1 0.1" />
    </geometry>
</collision>
</link>
<joint name="chassis_bumper_joint" type="fixed">
<parent link="chassis" />
<child link="bumper0" />
<origin xyz="${chassis_len/2}  ${chassis_width/2} 0" rpy="0 0 0" />
<axis xyz="0 1 0"/> 
</joint>    

<gazebo reference="bumper0">
  <sensor name="bumper0_sensor" type="contact">
<always_on>true</always_on>
<update_rate>30</update_rate>
<contact>
  <collision>bumper0_collision</collision>
</contact>
<plugin name="bumper0_plugin" filename="libgazebo_ros_bumper.so">
  <bumperTopicName>bumper0_sensor_state</bumperTopicName>
  <frameName>bumper0</frameName>
</plugin>
</sensor>

</gazebo>

Through multiple posts I figured out that I need especially

<collision>bumper0_collision</collision>

to be either <link_name> + _collision or the name given in the name-attribute of the collision inside the link (SDF Tutorial)

<collision name="bumper0_collision">

Can anybody please help me out, and tell me what is wrong with my code?

The Gazebo Version is 2.2.3 on Kubuntu 14.04 (x64) on ROS indigo.

Thanks in advance.