标签:
一:ros_path
1.cpp文件:
头文件 #include <ros/package.h>
ros::package::getPath(package_name.toStdString())
2.cmake:
catkin_package(
INCLUDE_DIRS include
LIBRARIES ${PROJECT_NAME}
CATKIN_DEPENDS
bzrobot_msgs
roscpp
roslib #添加这行
std_msgs
DEPENDS
)
3.package:
<build_depend>roslib</build_depend>
<run_depend>roslib</run_depend>
二:normo commonly path
char *home_var, *home_value;
home_var = "HOME";
home_value = getenv(home_var);
标签:
原文地址:http://www.cnblogs.com/cj2014/p/4535422.html