ROSturtlebot_follower让机器人跟随我们移动.doc

ROSturtlebot_follower让机器人跟随我们移动.doc

  1. 1、本文档共12页,可阅读全部内容。
  2. 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
ROSturtlebot_follower让机器人跟随我们移动

ROS turtlebot_follower :让机器人跟随我们移动 ROS turtlebot_follower 学习 首先在catkin_ws/src目录下载源码 了解代码见注释(其中有些地方我也不是很明白) follower.cpp #include ros/ros.h #include pluginlib/class_list_macros.h #include nodelet/nodelet.h #include geometry_msgs/Twist.h #include sensor_msgs/Image.h #include visualization_msgs/Marker.h #include turtlebot_msgs/SetFollowState.h #include dynamic_reconfigure/server.h #include turtlebot_follower/FollowerConfig.h #include depth_image_proc/depth_traits.h namespace turtlebot_follower { //* The turtlebot follower nodelet. /** * The turtlebot follower nodelet. Subscribes to point clouds * from the 3dsensor, processes them, and publishes command vel * messages. */ class TurtlebotFollower : public nodelet::Nodelet { public: /*! * @brief The constructor for the follower. * Constructor for the follower. */ TurtlebotFollower() : min_y_(0.1), max_y_(0.5), min_x_(-0.2), max_x_(0.2), max_z_(0.8), goal_z_(0.6), z_scale_(1.0), x_scale_(5.0) { } ~TurtlebotFollower() { delete config_srv_; } private: double min_y_; /** The minimum y position of the points in the box. */ double max_y_; /** The maximum y position of the points in the box. */ double min_x_; /** The minimum x position of the points in the box. */ double max_x_; /** The maximum x position of the points in the box. */ double max_z_; /** The maximum z position of the points in the box. 框中 点的最大z位置,以上四个字段用来设置框的大小*/ double goal_z_; /** The distance away from the robot to hold the centroid 离机器人的距离,以保持质心*/ double z_scale_; /** The scaling factor for translational robot speed 移动机器人速度的缩放系数*/ double x_scale_; /** The scaling factor for rotational robot speed 旋转机器人速度的缩放系数*/ bool enabled_; /** Enable/disable following; just prevents motor commands 启用/禁用追踪; 只是阻止电机命令,置为false后,机器人不会移动,/mobile_base/mobile_base_controller/cmd_vel topic 为空*/ // Service for start/stop following ros::Se

文档评论(0)

haihang2017 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档