参考blog: https://blog.csdn.net/sujun3304/article/details/18794077
kDevelop IDE设置 https://blog.csdn.net/p942005405/article/details/75715288
键盘控制s_cmdPub,输出cmd_vel(geometry_msgs包):
CMakeList.txt
cmake_minimum_required(VERSION 2.8.3)
project(s_move)
find_package(catkin REQUIRED COMPONENTS
roscpp
rospy
std_msgs
geometry_msgs
)
generate_messages(DEPENDENCIES geometry_msgs)
catkin_package(
CATKIN_DEPENDS geometry_msgs
)
add_executable(s_cmdPub src/s_cmdPub.cpp)
target_link_libraries(s_cmdPub ${catkin_LIBRARIES})
include_directories(
${catkin_INCLUDE_DIRS}
)
package.xml
<?xml version="1.0"?>
<package format="2