How to define the hardware interface of imu_sensor_controller in urdf?
My robot need the imu_sensor_controller to simulation(ubuntu16.04 ros-kinetic) ,but I don't know how to define the interface in urdf suitably. when defined like :
<transmission name="dummy_imu_trans">
<type>transmission_interface/SimpleTransmission</type>
<actuator name="dummy_imu_motor">
<mechanicalReduction>1</mechanicalReduction>
</actuator>
<joint name="imu_joint">
<hardwareInterface>hardware_interface/VelocityJointInterface</hardwareInterface>
</joint>
</transmission>
I get:
[ERROR] [1591166801.075328037, 0.267000000]: This controller requires a hardware interface of type 'hardware_interface::ImuSensorInterface'. Make sure this is registered in the hardware_interface::RobotHW class.
[ERROR] [1591166801.075388813, 0.267000000]: Initializing controller 'imu_sensor_controller' failed
[ERROR] [1591166802.076290, 1.182000]: Failed to load imu_sensor_controller
[INFO] [1591166802.076768, 1.182000]: Controller Spawner: Loaded controllers: joint_state_controller, mobile_base_controller
[INFO] [1591166802.096104, 1.197000]: Started controllers: joint_state_controller, mobile_base_controller
Then,I change it like this:
<transmission name="dummy_imu_trans">
<type>transmission_interface/SimpleTransmission</type>
<actuator name="dummy_imu_motor">
<mechanicalReduction>1</mechanicalReduction>
</actuator>
<joint name="imu_joint">
<hardwareInterface>hardware_interface/ImuSensorInterface</hardwareInterface>
</joint>
</transmission>
Now,I get:
[FATAL] [1591166695.521981171, 0.001000000]: No matching hardware interface found for '>hardware_interface/ImuSensorInterface' while loading interfaces for imu_joint
[FATAL] [1591166695.522106417, 0.001000000]: Could not initialize robot simulation interface
......
[WARN] [1591166723.912112, 23.884000]: Controller Spawner couldn't find the expected controller_manager ROS interface.
I am looking forward to your reply.Thank you in advance.
I have been checking the imu_sensor_controller packagen and seems like you are using the correct HI tool.
Maybe a missing dependency?
just in case, i think the dependencies should be:
Thanks for your reply.I have a try as what you said ,but those are the newest version.Maybe other reasons.
I don't believe IMUs are typically exposed via
gazebo_ros_control
, but added directly as a sensor plugin in your Gazebo model.Thanks for your reply! I get it what you said,but I need a [imu _sensor_controlle].(http://docs.ros.o...
In the first way, I wrote it based on a successful autonomous navigation case, but I directly rewrote the parameters and did not load the imu controller in, which made the deviation of my robot larger due to skidding and the increase of simulation time.