ROS与C++

  • 构建工作空间 catkin_make
  • 构建Catkin包 catkin_create_pkg
# This is an example, do not try to run this
# catkin_create_pkg <package_name> [depend1] [depend2] [depend3]

自定义容器分配器:

ROS_DECLARE_MESSAGE_WITH_ALLOCATOR(visualization_msgs::Marker, MyMarker, MyAllocator);
序列化: ros::serialization::serialize()
反序列: ros::serialization::deserialize()
  • 服务
  • 参数服务器
roscpp有两个版本的API接口:bare版和handle版。
bare版:在 ros::param 命令空间下。
handle版:通过ros::NodeHandle接口使用。
  • NodeHandles
  • Logging(日志)
  • Time(时间)
roslib提供所有时间版本构建:
ros::Time, ros::Duration, ros::Rate
ros::WallTime, ros::WallDuration, ros::WallRate
  • Exceptions(异常)

roscpp所有的异常都继承基类ros::Exception

参考链接: https://www.ncnynl.com/archives/201701/1273.html

posted @ 2019-01-11 15:03  不止所见  阅读(1530)  评论(0编辑  收藏  举报