Home | Tutorials | Wiki | Issues
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

zebGazebo crashes for contact sensor

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.

zebGazebo Gazebo crashes for contact sensor

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.

Gazebo crashes for because of contact sensor

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.

Gazebo crashes because of contact sensorWhat 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.