开始在将scout_mini的功能包编译完成后,尝试在对其进行仿真(仿真平台Ubuntu16.04 ROS-kinetic),但是遇到一些问题,rviz中小车的4个轮子无法显示,报错如下:
[ERROR] [1618482874.707291185, 13535.490000000]: Could not load controller 'scout_motor_rl_controller' because controller type 'velocity_controllers/JointVelocityController' does not exist.
[ERROR] [1618482874.707355415, 13535.490000000]: Use 'rosservice call controller_manager/list_controller_types' to get the available types
[ERROR] [1618482875.708221, 13536.500000]: Failed to load scout_motor_rl_controller
解决方法:
直接安装对应的依赖:
sudo apt-get install ros-kinetic-ros-control ros-kinetic-ros-controllers
当我重新启动仿真时输入:
roslaunch scout_bringup scout_mini_base_gazebo_sim.launch
输出如下:
[ INFO] [1618484298.056557838]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1618484298.057829516]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
[INFO] [1618484298.162548, 0.000000]: Controller Spawner: Waiting for service controller_manager/load_controller
[ INFO] [1618484298.251051242]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1618484298.257287336]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
[ INFO] [1618484299.661096591, 13532.330000000]: Loading gazebo_ros_control plugin
[ERROR] [1618484299.661406144, 13532.330000000]: 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.
[ INFO] [1618484299.661528501, 13532.330000000]: Starting gazebo_ros_control plugin in namespace: /
[ INFO] [1618484299.662827328, 13532.330000000]: gazebo_ros_control plugin is waiting for model URDF in parameter [robot_description] on the ROS param server.
[ERROR] [1618484299.777305644, 13532.330000000]: No p gain specified for pid. Namespace: /gazebo_ros_control/pid_gains/front_right_wheel
[ERROR] [1618484299.779101309, 13532.330000000]: No p gain specified for pid. Namespace: /gazebo_ros_control/pid_gains/front_left_wheel
[ERROR] [1618484299.780671013, 13532.330000000]: No p gain specified for pid. Namespace: /gazebo_ros_control/pid_gains/rear_left_wheel
[ERROR] [1618484299.782602926, 13532.330000000]: No p gain specified for pid. Namespace: /gazebo_ros_control/pid_gains/rear_right_wheel
[spawn_scout_mini_model-3] process has finished cleanly
log file: /home/hcq/.ros/log/bb158660-9dd1-11eb-8f71-1008b1dc02d7/spawn_scout_mini_model-3*.log
rviz中小车轮子显示正常:
但是以上终端输出内容中依然有如下报错:
[ERROR] [1618484299.777305644, 13532.330000000]: No p gain specified for pid. Namespace: /gazebo_ros_control/pid_gains/front_right_wheel
[ERROR] [1618484299.779101309, 13532.330000000]: No p gain specified for pid. Namespace: /gazebo_ros_control/pid_gains/front_left_wheel
[ERROR] [1618484299.780671013, 13532.330000000]: No p gain specified for pid. Namespace: /gazebo_ros_control/pid_gains/rear_left_wheel
[ERROR] [1618484299.782602926, 13532.330000000]: No p gain specified for pid. Namespace: /gazebo_ros_control/pid_gains/rear_right_wheel