本文主要是介绍ROS-indigo_stage-simulator,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
install
sudo apt-get install ros-indigo-stage-ros
1)首先在terminal运行
roscore
2)在新的terminal运行
rosrun stage_ros stageros /opt/ros/indigo/share/stage_ros/world/willow-erratic.world
3)控制机器人运动
sudo apt-get install ros-indigo-teleop-twist-keyboard
rosrun teleop_twist_keyboard teleop_twist_keyboard.py
4)创建slam地图
开始启用模拟时间
rosparam set use_sim_time true
下载ROS提供的激光数据采集记录文件
wget http://pr.willowgarage.com/data/gmapping/basic_localization_stage.bag
启动gmapping,并监听scan_base topic发来的消息
rosrun gmapping slam_gmapping scan:=base_scan
启动模拟器重放激光
rosbag play –clock basic_localization_stage.bag
启动RViz
rosrun rviz rviz
保存生成的map
rosrun map_server map_saver -f
wget http://goo.gl/uvDkc2
roslaunch keyboard_teleop_stage.launch
sudo apt-get install ros-indigo-turtlebot-simulator
roslaunch turtlebot_gazbo turtlebot_world.launch
wget http://gazebosim.org/models/dumpster/model.tar.gz
tar xvf model.tar.gz -C ~/.gazebo/models
roslaunch turtlebot_gazebo turtlebot_playground.launch
wget http://goo.gl/w9wGaj
roslaunch keyboard_teleop_gazebo.launch
参考:
www.cnblogs.com/CZM-/p/6030692.html
blog.csdn.net/akunainiannian/article/details/44993391
这篇关于ROS-indigo_stage-simulator的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!