ROS中阶笔记(十):ROS机器人综合应用
PR2,Personal Robot2
1、安装PR2功能包
$ sudo apt-get install ros-kinetic-pr2-* # 安装PR2功能包
2、启动Gazebo仿真
$ roslaunch pr2_gazebo pr2_empty_world.launch # 启动Gazebo仿真
3、在仿真环境中添加障碍物模型,并使用rviz显示PR2的传感器信息
rosrun rviz rviz
4、键盘控制
$ roslaunch pr2_teleop teleop_keyboard.launch
在控制PR2移动时,rviz中的Fixed Frame需要修改为odom_combined
5、启动SLAM建图
$ roslaunch PR2 pr2_build_map.launch
$ roslaunch pr2_teleop teleop_keyboard.launch
6、机械臂控制
$ roslaunch pr2_gazebo pr2_empty_world.launch
$ roslaunch pr2_teleop_ general pr2 teleop_ general_ keyboard.launch
7、机械臂Movelt!控制
$ git clone https://github.com/davetcoleman/pr2_moveit_config.git
$ catkin_make
$ roslaunch pr2_moveit_config demo.launch
8、Movelt!+gazebo控制
$ roslaunch pr2_gazebo pr2_empty_world.launch
$ roslaunch pr2_moveit_config move_group.launch
$ roslaunch pr2_moveit_config moveit_rviz.launch
1、安装Turtlebot功能包
$ sudo apt-get install ros-kinetic-turtlebot-*
2、启动仿真环境
# 先设置仿真环境的地图,通过环境变量的形式做启动的;
$ export TURTLEBOT_GAZEBO_WORLD_FILE=
"/opt/ros/kinetic/share/turtlebot_gazebo/worlds/playground.world"
$ roslaunch turtlebot_gazebo turtlebot_world.launch
$ rosrun rviz rviz # 使用rviz显示Turtlebot的传感器信息
3、键盘控制
$ roslaunch turtlebot_teleop keyboard_teleop.launch
4、SLAM建图
$ export TURTLEBOT_GAZEBO_WORLD_FILE="/opt/ros/kinetic/share/turtlebot_gazebo/worlds/playground.world"
$ roslaunch turtlebot_gazebo turtlebot_world.launch
$ roslaunch turtlebot_gazebo gmapping_demo.launch
$ roslaunch turtlebot_rviz_launchers view_navigation.launch
$ roslaunch turtlebot_teleop keyboard_teleop.launch
5、自主导航
# 构建好地图之后,保存地图
$ roslaunch turtlebot_ gazebo amcl_demo.launch map_file:=/home/hcx/turtlebot_ test_map.yaml
# 在保存的地图上完成导航
$ roslaunch turtlebot_rviz_launchers view_navigation.launch
1、安装Turtlebot3功能包
$ sudo apt-get install ros-kinetic-turtlebot3-*
TurtleBot 3目前有两种模型:burger和Waffle,启动之前必须通过环境变量的方式设置所需要的模型,这里选择burger。
2、启动仿真环境
# 需要联网加载
$ export TURTLEBOT3_MODEL=burger
$ roslaunch turtlebot3_gazebo_ros turtlebot3_world.launch
3、SLAM建图
$ roslaunch turtlebot3_slam turtlebot3_slam.launch
$ rosrun turtlebot3_teleop turtlebot3_teleop_key
Universal Robots,优傲机器人
1、安装UR功能包
$ sudo apt-get install ros-kinetic-universal-robot
2、启动仿真环境
$ roslaunch ur_gazebo ur5.launch
3、Movelt!+gazebo
$ roslaunch ur5_moveit_config ur5_moveit_planning_execution.launch sim:=true
$ roslaunch ur5_moveit_config moveit_rviz.launch config:=true
*终端查看规划的轨迹可使用如下命令:
$ rostopic echo /arm_controller/follow_joint_trajectory/goal
$ sudo apt-get install ros-kinetic-velodyne-simulator
$ sudo apt-get install ros-kinetic-hector-gazebo-plugins
$ sudo apt-get install ros-kinetic-pcl-conversions ros-kinetic-pointcloud-
to-laserscan
$ catkin_make
1、模型显示
$ roslaunch mbot_description display_mbot_pro_xacro.launch
2、仿真环境
$ roslaunch mbot_gazebo view_mbot_pro_with_laser_kinect_gazebo.launch
3、物体跟踪
$ roslaunch mbot_gazebo view_mbot_pro_with_laser_kinect_gazebo.launch
$ roslaunch mbot_follower follower_bringup_nodelet.launch
1、模型显示
$ roslaunch marm_description view_arm.launch
2、仿真环境
$ roslaunch marm_gazebo arm_world.launch
3、Movelt!视觉集成
$ roslaunch marm_gazebo arm_bringup_moveit.launch
1、模型显示
$ roslaunch marm_description view_mbot_with_arm.launch
$ roslaunch marm_description view_mbot_with_arm_kinect.launch
2、Movelt!控制
$ roslaunch mbot_with_arm_moveit_config demo.launch
3、gazebo仿真
$ roslaunch marm_gazebo mbot_with_arm_world.launch
4、Movelt!+gazebo控制
$ roslaunch marm_gazebo mbot_with_arm_bringup_moveit.launch
微信公众号:喵哥解说
公众号介绍:主要研究机器学习、计算机视觉、深度学习、ROS等相关内容,分享学习过程中的学习笔记和心得!期待您的关注,欢迎一起学习交流进步!同时还有1200G的Python视频和书籍资料等你领取!!!