你好,
我正在尝试在 UUV Sim 中实现车辆,我试图让我的车辆漂浮,我什至设置了<neutrally_buoyant>1</neutrally_buoyant>
标签,如图所示,但我的车辆在上传后一直沉没。 您有什么建议可以帮助使这辆车保持中立甚至正浮力吗?
你好,
感谢您的报告,我会检查一下。 同时,如果您将neutrally_buoyant
标志设置为零并设置音量,则可以使您的车辆处于正浮力状态,就像在rexrov
模型中一样https://github.com/uuvsimulator/uuv_simulator/ blob/master/uuv_descriptions/models/rexrov/urdf/rexrov.gazebo.xacro#L32。
然后使用体积来计算浮力矢量。
你好,
我试图将音量设置得很大。 没有rexrov
,而且还在下沉。 我会尝试这样做并回复您,但我试图提高音量并降低质量以迫使它漂浮。 不过,我会在一秒钟内回复你的结果。
所以我将音量设置为3.1093918 m3
,将质量设置为0.123497
,但我的车辆仍然沉没。 我可能会尝试将其设置为您为其体积设置的rexrov
确切值,甚至将<box>
标签设置为rexrov
所具有的以及它的流体动力学模型. 所以我不知道去哪里检查问题。
你设置了<neutrally_buoyant>0</neutrally_buoyant>
吗?
@musamarcusso我尝试将<neutrally_buoyant>
为0
和1
。 没有真正的改变。
嗨@atomoclast ,这是您想要建模的车辆吗?
http://www.videoray.com/images/specsheets/2016/2016_P4STANDARDBASE_FINAL.pdf
我将尝试在这里替换这些参数以重现这一点。
@musamarcusso是的,这是我要建模的车辆。
如果您需要,我有一个网格文件。
我只是尝试使用我所理解的浮力插件启动一个测试盒,并尝试将neutrally_buoyant
标签设置为0
以及1
和盒子两次仍然沉没。 它还一遍又一遍地打印[Wrn] [UnderwaterObjectPlugin.cc:207] Relative angular acceleration is invalid -nan
错误。
我有以下两个文件供您查看。 不确定是什么问题。 我添加了.txt
扩展名,以便我可以在评论中上传。
一旦您看到错误Relative angular acceleration is invalid
我们的 UnderwaterObjectPlugin 将不再施加任何力或扭矩,因为这是物理引擎损坏的明确指示。
我看了一下你的盒子定义:
<inertia ixx="0" ixy="0" ixz="0" iyy="0" iyz="0" izz="0" />
这是罪魁祸首。 任何刚体都不应具有惯性矩或质量为零。 由于 Gazebo 根据力/扭矩计算加速度的方式,这将导致除以零。
如果这能解决您的问题,请告诉我们。
@sebastianscherer这完全有道理。 我只是用一个基本的椭球体来估计我的车辆的惯性,现在它是浮动的。
继续找出 Thruster 插件! 我也遇到了一些问题。
在凉亭终端中,我看到:
[Msg] Thruster #0 initialized
[Msg] - Link: videoray_pro4/thruster_0
[Msg] - Robot model: videoray_pro4
[Msg] - Input command Gazebo topic: /videoray_pro4/thrusters/0/input
[Msg] - Thrust output Gazebo topic: /videoray_pro4/thrusters/0/thrust
[Msg] Thruster #1 initialized
[Msg] - Link: videoray_pro4/thruster_1
[Msg] - Robot model: videoray_pro4
[Msg] - Input command Gazebo topic: /videoray_pro4/thrusters/1/input
[Msg] - Thrust output Gazebo topic: /videoray_pro4/thrusters/1/thrust
[Msg] Thruster #2 initialized
[Msg] - Link: videoray_pro4/thruster_2
[Msg] - Robot model: videoray_pro4
[Msg] - Input command Gazebo topic: /videoray_pro4/thrusters/2/input
[Msg] - Thrust output Gazebo topic: /videoray_pro4/thrusters/2/thrust
[Msg] JointStatePublisher::robotNamespace=videoray_pro4
在推进器终端,我看到:
process[videoray_pro4/thruster_allocator-1]: started with pid [26422]
[INFO] [1500390755.909692, 0.000000]: ThrusterManager::update_rate=50
output_dir= /home/andrew/Development/ underwater_ws/install/share/videoray_description/config/videoray_pro4
ThrusterManager: updating thruster poses
conversion_fcn= proportional
conversion_fcn_params= {'gain': 0.00031}
transform: /videoray_pro4/base_link -> /videoray_pro4/thruster_0
could not get transform from: /videoray_pro4/base_link
to: /videoray_pro4/thruster_0
[]
我刚刚运行了rosrun tf view_frames
,这是输出。 我看到 TF 树显示了 base_link 和推进器之间的转换...
框架.pdf
world 和车辆的 base_link 之间的帧由message_to_tf
节点生成,该节点是hector_localization
包的一部分。 RexROV 模型的启动文件示例是这样的
你是如何在启动文件中说明这一点的?
@musamarcusso根据维基教程,我按如下方式调用了转换:
<!-- Publish state and tf for in relation to the world frame -->
<group ns="$(arg namespace)">
<node name="ground_truth_to_tf" pkg="message_to_tf" type="message_to_tf" output="screen">
<param name="odometry_topic" value="/$(arg namespace)/pose_gt" />
<param name="frame_id" value="/$(arg world_frame)" />
<param name="tf_prefix" value="$(arg namespace)" />
</node>
</group>
它似乎与你上面提到的那条线不同。 我现在就试试。
你能试试用这个替换你发给我的块吗
<include file="$(find uuv_descriptions)/models/common/launch/message_to_tf.launch">
<arg name="namespace" value="$(arg namespace)"/>
</include>
如果此修复有效,我将立即更正教程。
我试图用你的块替换我的块,但它不起作用。 它工作的唯一方式是将两个块一起调用。
VelocityControllerNode: initializing node
Thruster #0 - proportional - thrusters/0/input
transform: /videoray_pro4/base_link -> /videoray_pro4/thruster_1
Thruster #1 - proportional - thrusters/1/input
transform: /videoray_pro4/base_link -> /videoray_pro4/thruster_2
Thruster #2 - proportional - thrusters/2/input
transform: /videoray_pro4/base_link -> /videoray_pro4/thruster_3
could not get transform from: /videoray_pro4/base_link
to: /videoray_pro4/thruster_3
[<uuv_thrusters.models.thruster_proportional.ThrusterProportional object at 0x7efc4bdb8a50>, <uuv_thrusters.models.thruster_proportional.ThrusterProportional object at 0x7efc4bdb8c10>, <uuv_thrusters.models.thruster_proportional.ThrusterProportional object at 0x7efc4bd4c190>]
TAM=
[[ 1. 0. 0. ]
[ 0. 0. 0. ]
[ 0. 0.99999968 0.99999968]
[ 0. 0.09999997 -0.09999997]
[ 0.1 0.15249995 0.15249995]
[ 0. 0. 0. ]]
ThrusterManager: ready
ThrusterManager: ready
现在我需要看看为什么它不能从推进器 3 获得 TF。
我可以启动我的joy_velocity.launch
,但我无法用我的控制器控制车辆。
我一直在尝试调试东西,我正在比较节点的rqt_graph
可视化的输出。 这是我看到的两个网络。 不知道为什么它不能正常工作。
我刚刚意识到的另一个更新:
维基喊话: <xacro:property name="prop_mesh_file" value="file://$(find uuv_descriptions_example)/models/rov_example/mesh/propeller.dae"/>
应该是: <xacro:property name="prop_mesh_file" value="file://$(find uuv_descriptions)/models/rexrov/mesh/prop.dae"/>
嗨@atomoclast ,
不,它在教程中是正确的。 教程中的示例不是功能示例,这就是为什么我将这个README.md放在网格文件夹中的原因,所以这个prop_mesh_file
必须由制作新车辆模型的人编辑。
joy_velocity
是默认为 XBox 控制器映射定义的。 您拥有的控制器型号是什么?
你在 Github 的某个地方有你的文件吗? 我可以尝试运行它并给你一个反馈。
@musamarcusso我在这里上传了 repo: https :
你好@musamarcusso ,你有机会浏览一下这个 repo 吗?
是的,我克隆了它。 今天晚些时候我会给出反馈。