Unable to properly apply libuuv_thruster_ros_plugin.so thruster plugin
I'm trying to use the libuuv_thruster_ros_plugin.so
thruster plugin before? I'm trying to get use it for my usv model but keep getting errors:
Registered ThrusterDynamics type ZeroOrder
Registered ThrusterDynamics type FirstOrder
Registered ThrusterDynamics type Yoerger
Registered ThrusterDynamics type Bessa
Registered ConversionFunction type Basic
Registered ConversionFunction type Bessa
Registered ConversionFunction type LinearInterp
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
-19.88 -16.52 -12.6 -5.6 -1.4 0 2.24 9.52 21.28 28 33.6
Segmentation fault (core dumped)
[gazebo-2] process has died [pid 31704, exit code 139, cmd /opt/ros/melodic/lib/gazebo_ros/gzserver -e ode worlds/empty.world __name:=gazebo __log:=/home/philip/.ros/log/695c1cf8-e9f6-11ed-a0cc-d43b04207196/gazebo-2.log].
log file: /home/philip/.ros/log/695c1cf8-e9f6-11ed-a0cc-d43b04207196/gazebo-2*.log
May be there are common mistakes people usually make? I only applied the plugin to the left propeller as of now.
<gazebo>
<!-- Thruster ROS plugin -->
<plugin name="microfred5_left_thruster_model" filename="libuuv_thruster_ros_plugin.so">
<!-- Name of the thruster link -->
<linkName>"Left_Prop"</linkName>
<!-- Name of the joint between thruster and vehicle base link -->
<jointName>"Left_Prop_Joint"</jointName>
<!-- Make the thruster aware of its id -->
<thrusterID>1</thrusterID>
<!-- Gain of the input command signal -->
<gain>1</gain>
<!-- Maximum allowed input value for the input signal for thruster unit -->
<clampMax>100</clampMax>
<!-- Minimum allowed value for the input signal for thruster unit -->
<clampMin>-100</clampMin>
<!-- Minimum and maximum thrust force output allowed -->
<thrustMin>-35</thrustMin>
<thrustMax>35</thrustMax>
<!--
Value from 0 to 1 to set the efficiency of the output thrust force
Default value is 1.0
-->
<thrust_efficiency>1</thrust_efficiency>
<!--
Value from 0 to 1 to set the efficiency of the propeller as a factor
to be multiplied to the current value of the state variable at each
iteration.
Default value is 1.0
-->
<propeller_efficiency>1</propeller_efficiency>
<!-- 2) First order model -->
<dynamics>
<type>FirstOrder</type>
<timeConstant>0.05</timeConstant>
</dynamics>
<!-- 3) Linear interpolation
If you have access to the thruster's data sheet, for example,
you can enter samples of the curve's input and output values
and the thruster output will be found through linear interpolation
of the given samples.
-->
<conversion>
<type>LinearInterp</type>
<inputValues>-1.0 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1.0</inputValues>
<outputValues>-19.88 -16.52 -12.6 -5.6 -1.4 0.0 2.24 9.52 21.28 28.0 33.6</outputValues>
</conversion>
</plugin>
</gazebo>
The values in the conversion aren't something I got from a data sheet, I just copied them over from some other model I found on the web
Not sure what thuster ID is, I know it's supposed to be so,e integer value so I just gave it a 1
All the other values are copied over from the model as well Perhaps my package doesn't have the right dependencies?, here's my package.xml snippet
<build_depend>roscpp</build_depend>
<build_depend>rospy</build_depend>
<build_export_depend>roscpp</build_export_depend>
<build_export_depend>rospy</build_export_depend>
<build_depend>gazebo</build_depend>
<build_depend>gazebo_ros</build_depend>
<build_depend>hector_gazebo_plugins</build_depend>
<build_depend>velodyne_description</build_depend>
<build_depend>velodyne_gazebo_plugins</build_depend>
<build_depend>geometry_msgs</build_depend>
<build_depend>nmea_msgs</build_depend>
<exec_depend>roscpp</exec_depend>
<exec_depend>rospy</exec_depend>
<exec_depend>tf</exec_depend>
<exec_depend>uuv_gazebo_worlds</exec_depend>
<exec_depend>uuv_gazebo_ros_plugins_msgs</exec_depend>
<exec_depend>uuv_simulator</exec_depend>
<exec_depend>hector_gazebo_plugins</exec_depend>
<exec_depend>sensor_msgs</exec_depend>
<exec_depend>geometry_msgs</exec_depend>
<exec_depend>gazebo_ros</exec_depend>
<exec_depend>nav_msgs</exec_depend>
<exec_depend>nmea_msgs</exec_depend>
<exec_depend>geometry_msgs</exec_depend>
<exec_depend>gazebo</exec_depend>
<exec_depend>hector_gazebo_plugins</exec_depend>
<exec_depend>velodyne_description</exec_depend>
<exec_depend>velodyne_gazebo_plugins</exec_depend>
<export>
<architecture_independent />
</export>
Asked by distro on 2023-05-04 01:31:30 UTC
Comments