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


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM