常用指令
- 小车运动控制节点
rostopic pub -r 10 /catvehicle/cmd_vel geometry_msgs/Twist "linear:
x: 2.0
y: 0.0
z: 0.0
angular:
x: 0.0
y: 0.0
z: 0.0"
- 查看节点数据类型
rostopic info ..
- 查看tf树
rosrun rqt_tf_tree rqt_tf_tree
- 查看节点通信
rosrun rqt_graph rqt_graph
遇到问题及解决办法
[ERROR]No p gain specified for pid. Namespace: /gazebo_ros_control/pid_gains/back_right_wheel_joint
catvehicle_control.yaml文件添加:
/gazebo_ros_control/pid_gains:
back_left_wheel_joint: {p: 100.0,i: 0.0, d: 0.0}
back_right_wheel_joint: {p: 100.0,i: 0.0, d: 0.0}
front_left_steering_joint: {p: 100000.0,i: 1.0, d: 0.0}
front_right_steering_joint: {p: 100000.0,i: 1.0, d: 0.0}
- 加载.dae文件出错将
<geometry>
<mesh filename="package://catvehicle/meshes/ford_escape_no_wheels_2.dae"/>
</geometry>
改为
<geometry>
<mesh filename="file:///$(find catvehicle)/meshes/ford_escape_no_wheels_2.dae"/>
</geometry>
[ERROR] [1567048151.098867089, 1050.129000000]: GazeboRosControlPlugin missing <legacyModeNS> while using DefaultRobotHWSim, defaults to true. This setting assumes you have an old package with an old implementation of DefaultRobotHWSim, where the robotNamespace is disregarded and absolute paths are used instead. If you do not want to fix this issue in an old package just set <legacyModeNS> to true.
添加(<legacyModeNS>true</legacyModeNS>
)
<gazebo>
<plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so">
<robotNamespace>/$(arg roboname)</robotNamespace>
<robotSimType>gazebo_ros_control/DefaultRobotHWSim</robotSimType>
<legacyModeNS>true</legacyModeNS>
</plugin>
</gazebo>
xacro: Traditional processing is deprecated. Switch to --inorder processing!To check for compatibility of your document, use option --check-order.For more infos, see http://wiki.ros.org/xacro#Processing_Order xacro.py is deprecated; please use xacro instead
将
command="$(find xacro)/xacro.py '$(find catvehicle)/urdf/
改为
command="$(find xacro)/xacro --inorder '$(find catvehicle)/urdf/