资源简介
基于Turtlebot的自主移动机器人仿真. 本文中所述的自主移动机器人采用turtlebot, 从Kinect 采集点云传入obstacle avoidance 节点中,给出避障转向; navigation节点根据机器人避障转向信息和收到的指令信息做出最终的控制决策,传入到locomotion节点; 最后locomotion节点给出机器人的运动控制命令.
代码片段和文件信息
/**
* @copyright Manfredas Zabarauskas 2013. All rights reserved. This project is released under
* CC BY-NC-SA (Creative Commons Attribution-NonCommercial-ShareAlike) license.
*/
#include
// STL includes
#include
// Kobuki includes
#include
// RPLocomotion includes
#include
#include
int main(int argc char** argv)
{
// Initialize ROS
ros::init(argc argv “turtlebotslam_locomotion“);
// Get the handle to the ROS node
ros::NodeHandle node;
// Start the worker node
RPLocomotionNode worker_node(node);
}
RPLocomotionNode::RPLocomotionNode(ros::NodeHandle& node) :
node(node)
processing_bumper_event(false)
locomotion_message(new geometry_msgs::Twist())
FRAMING_LINEAR_VELOCITY(FRAMING_LINEAR_VELOCITY_DEFAULT)
FRAMING_ANGULAR_VELOCITY(FRAMING_ANGULAR_VELOCITY_DEFAULT)
OBSTACLE_AVOIDANCE_LINEAR_VELOCITY(OBSTACLE_AVOIDANCE_LINEAR_VELOCITY_DEFAULT)
OBSTACLE_AVOIDANCE_ANGULAR_VELOCITY(OBSTACLE_AVOIDANCE_ANGULAR_VELOCITY_DEFAULT)
{
// Initialize publishers/subscribers/timers
locomotion_publisher = node.advertise(“/turtlebotslam/locomotion/velocity“ 1);
state_publisher = node.advertise(“/turtlebotslam/locomotion/state“ 1);
motor_power_publisher = node.advertise(“/turtlebotslam/locomotion/motor_power“ 1);
navigation_subscriber = node.subscribe(“/turtlebotslam/navigation/driving_direction_and_source“ 1 &RPLocomotionNode::navigationMessageCallback this);
bumper_subscriber = node.subscribe(“/mobile_base/events/bumper“ 1 &RPLocomotionNode::bumperEventCallback this);
double approximate_sleep_time = 2.0 * M_PI / OBSTACLE_AVOIDANCE_ANGULAR_VELOCITY;
bumper_timer = node.createWallTimer(ros::WallDuration(approximate_sleep_time) &RPLocomotionNode::bumperTimerCallback this true false);
setProcessingBumperEvent(false);
clearLocomotionMessage();
motorsEnabled(true);
// Spin at 5 Hz
ros::Rate rate(5);
while (ros::ok())
{
locomotion_message_mutex.lock();
{
locomotion_publisher.publish(locomotion_message);
}
locomotion_message_mutex.unlock();
ros::spinOnce();
rate.sleep();
}
};
void RPLocomotionNode::getOverridableParameters()
{
node.getParamCached(“/turtlebotslam/locomotion_node/framing_linear_velocity“ FRAMING_LINEAR_VELOCITY);
node.getParamCached(“/turtlebotslam/locomotion_node/framing_angular_velocity“ FRAMING_ANGULAR_VELOCITY);
node.getParamCached(“/turtlebotslam/locomotion_node/obstacle_avoidance_linear_velocity“ OBSTACLE_AVOIDANCE_LINEAR_VELOCITY);
node.getParamCached(“/turtlebotslam/locomotion_node/obstacle_avoidance_angular_velocity“ OBSTACLE_AVOIDANCE_ANGULAR_VELOCITY);
}
void RPLocomotionNode::setProcessingBumperEvent(bool processing)
{
processing_bumper_event
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2017-04-05 12:37 turtlebotslam_gazebo\
文件 2147 2017-04-05 12:16 turtlebotslam_gazebo\package.xm
文件 6843 2017-04-05 12:16 turtlebotslam_gazebo\CMakeLists.txt
目录 0 2017-04-05 12:31 turtlebotslam_gazebo\rviz\
文件 11555 2018-01-31 09:58 turtlebotslam_gazebo\rviz\navigation.rviz
目录 0 2018-02-22 08:08 turtlebotslam_gazebo\worlds\
文件 8540 2018-02-22 08:07 turtlebotslam_gazebo\worlds\cafe.world
文件 58091 2017-04-11 14:07 turtlebotslam_gazebo\worlds\barrier.world
文件 53024 2017-04-10 09:32 turtlebotslam_gazebo\worlds\playground.world
文件 669 2016-09-27 06:39 turtlebotslam_gazebo\worlds\empty.world
文件 15798 2015-09-16 02:57 turtlebotslam_gazebo\worlds\corridor.world
目录 0 2018-01-31 09:48 turtlebotslam_gazebo\launch\
文件 730 2018-01-31 09:49 turtlebotslam_gazebo\launch\gmapping_demo.launch
文件 666 2016-11-09 07:58 turtlebotslam_gazebo\launch\keyop.launch
文件 146 2017-04-05 13:21 turtlebotslam_gazebo\launch\turtlebotslam_rviz.launch
文件 2452 2018-02-23 08:04 turtlebotslam_gazebo\launch\turtlebotslam_gazebo.launch
文件 486 2017-04-12 10:15 turtlebotslam_gazebo\launch\keyboard_teleop.launch
目录 0 2017-04-05 12:16 turtlebotslam_gazebo\src\
目录 0 2017-04-11 08:55 turtlebotslam_gazebo\launch\includes\
文件 1217 2017-04-11 10:56 turtlebotslam_gazebo\launch\includes\kobuki.launch.xm
文件 1431 2015-09-16 02:57 turtlebotslam_gazebo\launch\includes\create.launch.xm
文件 1431 2015-09-16 02:57 turtlebotslam_gazebo\launch\includes\roomba.launch.xm
目录 0 2017-04-11 06:38 turtlebotslam_locomotion\
文件 6908 2017-04-11 06:38 turtlebotslam_locomotion\CMakeLists.txt
文件 2257 2017-04-11 06:33 turtlebotslam_locomotion\package.xm
目录 0 2013-09-18 09:12 turtlebotslam_locomotion\param\
文件 151 2013-09-18 09:12 turtlebotslam_locomotion\param\keyop_smoother.yaml
目录 0 2013-09-18 09:12 turtlebotslam_locomotion\launch\
文件 2039 2017-04-11 13:42 turtlebotslam_locomotion\launch\locomotion.launch
目录 0 2017-04-11 06:35 turtlebotslam_locomotion\src\
文件 8028 2017-04-13 01:30 turtlebotslam_locomotion\src\locomotion.cpp
............此处省略28个文件信息
相关资源
- ROS 传感器消息及RVIZ可视化Laserscan和
- ROS结合科大讯飞的语音识别包
- 武汉大学Rost虚拟学习团队提供的语料
- Cross-Scale Cost Aggregation Code
- rational rose 图书管理系统 用例图 时序
- 用于SLAM的,如何比较两断轨迹,以及
- ROS:实现串口解析GPS协议,并发布到
- Prosys_OPC_UA_Simulation_Server_UserManual.pdf
- 添加Microsoft Visual Studio 解决方案平台
- microsoft calendar control 11.0.5510.0
- MicroStation V8i视频教程
- 51单片机 红外循迹 红外避障小车 双
- Tinyslam /Coreslam
- Microsoft.Web.Services3
- 改电子盘ID,Routeros电子盘修改
- 机械臂避障路径规划仿真 蚁群算法
- ros中LaserScan 消息转化成PointCloud2d 的
- 智能语音识别避障机器人电路模块设
- microsoft office document imaging writer安装版
- 寻迹避障小车简单避障程序
- 树莓派智能小车 循迹 超声波避障 红
- stm32智能小车程序
- SLAM十四讲、双目视觉里程计、麻省理
- Bentley MicroStation CONNECT版Update410.00.00
- Microsoft Windows SDK v7.0
- 使用MediaCreationTool无损修复Windows 10系
- 微软的fat32文件标准
- 视觉slam.txt
- 光电传感器模块E18-D80NK漫反射式红外
- BA Jacobian 矩阵推导
评论
共有 条评论