Husky
官方教程:
HUSKY UGV TUTORIALS
上述资料里有怎样驾驶Husky:
rostopic pub /husky_velocity_controller/cmd_vel geometry_msgs/Twist "linear:
x: 0.5
y: 0.0
z: 0.0
angular:
x: 0.0
y: 0.0
z: 0.0" -r 10
$ sudo apt-get install ros-kinetic-husky-simulator
$ roslaunch husky_gazebo husky_empty_world.launch
$ roslaunch husky_gazebo husky_playpen.launch
GitHub:
husky/husky GitHub
husky/husky_customization
启动husky_gazebo时,会有关于twist_mux的错误,如下:
ERROR: cannot launch node of type [twist_mux/twist_mux]: twist_mux
ROS path [0]=/opt/ros/kinetic/share/ros
ROS path [1]=/home/zxj/catkin_ws/src
ROS path [2]=/opt/ros/kinetic/share
解决方案:
去下载twist_mux的源码,放在ROS工作空间下编译。
ROS wiki twist_mux
twist_mux GitHub
古月居twist_mux讲解
twist_mux 有感
此项操作之后,rostopic list才能看到cmd_vel话题“/husky_velocity_controller/cmd_vel”
(补充:melodic上似乎每安装twist_mux也有上面的话题,不确定,有待日后验证)。
但是此时向这个话题发布消息,husky仍然不能移动。
此时仍然有错误:
[ERROR] [1589680551.632428424, 1298.740000000]: Could not load controller 'husky_velocity_controller' because controller type 'diff_drive_controller/DiffDriveController' does not exist.
[ERROR] [1589680551.632480294, 1298.740000000]: Use 'rosservice call controller_manager/list_controller_types' to get the available types
[ERROR] [1589680552.632838, 1299.730000]: Failed to load husky_velocity_controller
尝试按上述方法解决,即从GitHub上下载到ROS工作空间然后catkin_make:
ROS wiki diff_drive_controller
ros_controllers GitHub
但是仍然报错:
CMake Error at /opt/ros/kinetic/share/catkin/cmake/catkin_workspace.cmake:95 (message):
This workspace contains non-catkin packages in it, and catkin cannot build
a non-homogeneous workspace without isolation. Try the
'catkin_make_isolated' command instead.
Call Stack (most recent call first):
CMakeLists.txt:67 (catkin_workspace)
-- Configuring incomplete, errors occurred!
See also "/home/zxj/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/zxj/catkin_ws/build/CMakeFiles/CMakeError.log".
Invoking "cmake" failed
于是catkin_make_isolated,经过大量编译输出到屏幕上,仍然不行:
-- Could not find the required component 'four_wheel_steering_msgs'. The following CMake error indicates that you either need to install the package with the same name or change your environment so that it can be found.
CMake Error at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
Could not find a package configuration file provided by
"four_wheel_steering_msgs" with any of the following names:
four_wheel_steering_msgsConfig.cmake
four_wheel_steering_msgs-config.cmake
Add the installation prefix of "four_wheel_steering_msgs" to
CMAKE_PREFIX_PATH or set "four_wheel_steering_msgs_DIR" to a directory
containing one of the above files. If "four