UUVsimulator仿真

UUV Simulator: Based on Gazebo
使用版本:Ubuntu20.04 + ros Noetic + gazebo 11

下载
https://github.com/arturmiller/uuv_simulator/tree/noetic
或者直接通过命令行下载

git clone --branch noetic https://github.com/arturmiller/uuv_simulator.git

编译及环境变量配置

source ./devel/setup.bash

运行仿真

roslaunch uuv_gazebo start_pid_demo_with_teleop.launch

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

在这里插入图片描述
在这里插入图片描述

键盘控制运动

运行键盘代码,代码在miscauv@ubuntu:~/uuvsimulator_ws/src/uuv_simulator-noetic/uuv_teleop/launch/uuv_keyboard_teleop.launch
打开新窗口运行键盘控制程序需要source ./devel/setup.bash

roslaunch uuv_keyboard_teleop.launch uuv_name:=rexrov

在这里插入图片描述
用键盘控制运动(需选定在此终端进行按键)
在Rviz中通过Odometry的箭头可以看到运动
在这里插入图片描述
查看仿真真值

rostopic echo /gazebo/model_states

查看向航行器发送的速度

rostopic echo /rexrov/cmd_vel

在这里插入图片描述

查看gps数据

rostopic echo /rexrov/gps

在这里插入图片描述
查看imu数据

rostopic echo /rexrov/imu

在这里插入图片描述

查看DVL时提示????
ERROR: Cannot load message class for [uuv_sensor_ros_plugins_msgs/DVL]. Are your messages built?
在这里插入图片描述
解决:
查看以下都有数据

/rexrov/dvl
/rexrov/dvl/state
/rexrov/dvl_sonar0
/rexrov/dvl_twist

在该终端的worspace运行

source devel/setup.bash

问题:
RLException: [uuv_keyboard_teleop.launch] requires the ‘uuv_name’ arg to be set The traceback for the exception was written to the log file
解决:需要加uuv_name:=rexrov

问题:
rostopic list里有/rexrov/dvl
但运行rostopic echo /rexrov/dvl时报错
ERROR: Cannot load message class for [uuv_sensor_ros_plugins_msgs/DVL]. Are your messages built?
解决: source ./devel/setup.bash

问题:
通过键盘控制运动,接收不到/cmd_vel消息

rosrun teleop_twist_keyboard teleop_twist_keyboard.py

Waiting for subscriber to connect to /cmd_vel
Waiting for subscriber to connect to /cmd_vel
Waiting for subscriber to connect to /cmd_vel

pub -r 10 /cmd_vel geometry_msgs/Twist控制运动没有反应
查看/cmd_vel消息报错:
rostopic echo /rexrov/cmd_vel
WARNING: no messages received and simulated time is active.
Is /clock being published?

解决:
1.


本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!

相关文章

立即
投稿

微信公众账号

微信扫一扫加关注

返回
顶部