前言
在机器人仿真中,使用了力传感器,因此需要在gazebo中添加对应的传感器
URDF编辑
力传感器需要添加在关节上,虽然号称可以添加在杆件上,但是会报错。
http://gazebosim.org/tutorials?tut=force_torque_sensor&cat=sensors#Addingaforce/torquesensortoalink
<gazebo reference="sensor_joint2">
<provideFeedback>true</provideFeedback>
<disableFixedJointLumping>true</disableFixedJointLumping>
</gazebo>
其中, disableFixedJointLumping
标签,是在使用fixed关节时使用的。若不使用,则会报错
gazebo_ros_ft_sensor plugin error: jointName: sensor_joint2 does not exist
若不使用disableFixedJointLumping
标签,关节设为revolute,关节活动上下限值都为0.
https://answers.ros.org/question/251231/gazebo-tag-disablefixedjointlumping-didnt-work/
gazebo插件编辑
<gazebo>
<plugin name="ft_sensor" filename="libgazebo_ros_ft_sensor.so">
<updateRate>100.0</updateRate>
<topicName>ft_sensor_topic</topicName>
<jointName>sensor_joint2</jointName>
</plugin>
</gazebo>
可以在其中添加一些参数,例如噪声等,具体可以通过原始代码查看。
https://github.com/ros-simulation/gazebo_ros_pkgs/blob/kinetic-devel/gazebo_plugins/include/gazebo_plugins/gazebo_ros_ft_sensor.h
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)