码迷,mamicode.com
首页 > 其他好文 > 详细

路径获取

时间:2015-05-28 12:16:15      阅读:100      评论:0      收藏:0      [点我收藏+]

标签:

一: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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!