ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Hardware Interface for Bumper Plugin in urdf (ros_control) for gazebo

asked 2017-09-07 14:30:34 -0600

Ioskiw gravatar image

Hi all,

i have an URDF specified where i can control a robot in Gazebo, actuating and reading joint states works fine. Now i want to read the sensor data from an IMU and a contact sensor, preferably i want to define a hardware interface instead of just publishing the values the plugin.

The code for the contact sensor is

<gazebo reference="${prefix}_leg_outer">
    <mu1> 1.0 </mu1>
    <mu2> 1.0 </mu2>

  <sensor name='${prefix}_contact_sensor' type='contact'>
  <update_rate> 1000 </update_rate>

  <plugin name="${prefix}_gazebo_ros_bumper_controller" filename="">
    <hardwareInterface>ForceTorqueSensorInterface</hardwareInterface> <-- Probably wrong


I try to load the controller in a yaml config and start it via a launch file, same as the other controller. I am guessing my error must be somewhere in the urdf. Has anybody any insight on how to the define the hardware interfaces in urdf for the force torque sensor or the IMU sensor? I haven't found any examples using these hardware interfaces. Idealy i want to get the sensor data via these interfaces from gazebo. I can get them published as ros topics already, but i think the way to go is to have a hardware interface for the sensors as well.

Thanks for the help.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-11-10 08:19:01 -0600

oliverzila gravatar image


Did you manage to solve your problem? I am also trying to implement a ROS controller that requires the imu hardware interface. From what I can see, the DefaultRobotHWSim (which is used by default for simulations with Gazebo) does not contain the ImuSensorInterface. e.g.: if you try to run imu_sensor_controller you would get an error such as:

This controller requires a hardware interface of type 'hardware_interface::ImuSensorInterface'. Make sure this is registered in the hardware_interface::RobotHW class.
[ERROR] [1571710623.832441259]: Initializing controller 'imu_sensor_controller' failed

So a custom plugin would need to be implemented exposing the hardware interface for the sensors yout application needs.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2017-09-07 14:30:34 -0600

Seen: 564 times

Last updated: Sep 07 '17