how to get the pressure of the models link which touch the ground
I want to use the 'Darwin' robots from github repository to analysis the robot's walking with AI methods,but the feedback data is not enough in gazebo.
How to get the pressure of the models link which touch the ground using URDF?
attaching the Darwin description in gazebo darwin.urdf description repository
I add FT sensor in the foot link
<xacro:gazebo_pressure prefix="left" parent="left_m6" num="0" x="-0.03" y="-0.03" z="-0.034"/> <xacro:gazebo_pressure prefix="left" parent="left_m6" num="1" x="0.03" y="-0.03" z="-0.034"/> <xacro:gazebo_pressure prefix="left" parent="left_m6" num="2" x="-0.03" y="0.03" z="-0.034"/> <xacro:gazebo_pressure prefix="left" parent="left_m6" num="3" x="0.03" y="0.03" z="-0.034"/>
<xacro:gazebo_pressure prefix="right" parent="right_m6" num="0" x="-0.03" y="-0.03" z="-0.034"/> <xacro:gazebo_pressure prefix="right" parent="right_m6" num="1" x="0.03" y="-0.03" z="-0.034"/> <xacro:gazebo_pressure prefix="right" parent="right_m6" num="2" x="-0.03" y="0.03" z="-0.034"/> <xacro:gazebo_pressure prefix="right" parent="right_m6" num="3" x="0.03" y="0.03" z="-0.034"/>
I add ft_sensor in the foot
<xacro:macro name="gazebo_pressure" params="prefix parent num x y z"> <gazebo> <plugin name="ft_sensor" filename="libgazebo_ros_ft_sensor.so"> <updaterate>100.0</updaterate> <topicname>/${prefix}_foot_sensor_m${num}</topicname> <jointname>${prefix}_foot_sensor_m${num}_j</jointname> </plugin> </gazebo>
<gazebo reference="${prefix}_foot_sensor_m${num}"> <material>Gazebo/Blue</material> <mu1>9000</mu1> <mu2>9000</mu2> <kp>1000000.0</kp> <kd>10.0</kd> <mindepth>0.001</mindepth> <maxcontacts>100</maxcontacts> </gazebo>
</xacro:macro>
<xacro:gazebo_pressure prefix="left" parent="left_m6" num="0" x="-0.03" y="-0.03" z="-0.034"/> <xacro:gazebo_pressure prefix="left" parent="left_m6" num="1" x="0.03" y="-0.03" z="-0.034"/> <xacro:gazebo_pressure prefix="left" parent="left_m6" num="2" x="-0.03" y="0.03" z="-0.034"/>
python call rosservice to reset_simulation,but the topic publisher nomal pub late about 100 s, what parameters should i change?
self.subscriber = rospy.Subscriber('/left_foot_sensor_m0', WrenchStamped, self.pressure_callback) rospy.wait_for_service('/gazebo/reset_simulation') self.f_reset_simulation = rospy.ServiceProxy('/gazebo/reset_simulation', Empty)