# rosplan_coffee__demos
**Repository Path**: fdse_robotics/rosplan_coffee__demos
## Basic Information
- **Project Name**: rosplan_coffee__demos
- **Description**: No description available
- **Primary Language**: Python
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 1
- **Forks**: 0
- **Created**: 2021-04-28
- **Last Updated**: 2021-06-18
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
## Turtlebot2移动相关内容(所有在turtlebot2_rplidar内)
该版本为melodic,仿真环境使用Turtlebot2所需包已经全部包含在内,同时需要安装相关依赖:
```bash
sudo apt-get install ros-melodic-gmapping ros-melodic-navigation ros-melodic-kobuki ros-melodic-kobuki-core
sudo apt-get install python-opencv python-numpy python-scikits-learn
sudo apt-get install ros-melodic-ecl-* ros-melodic-yocs-controllers ros-melodic-yocs-cmd-vel-mux ros-melodic-yocs-velocity-smoother ros-melodic-joy ros-melodic-kobuki-dock-drive ros-melodic-kobuki-driver ros-melodic-depthimage-to-laserscan ros-melodic-gmapping ros-melodic-dwa-local-planner pyqt5-dev-tools
```
### 启动仿真世界
指令:
```bash
roslaunch turtlebot_gazebo turtlebot_world.launch
```
其中关键点:
- 初始catkin_make后,在turtlebo2_simulator/turtlebot_gazebo/env-hooks/25.turtlebot-gazebo.sh.em会生成两个bash的环境变量,TURTLEBOT_GAZEBO_MAP_FILE、TURTLEBOT_GAZEBO_WORLD_FILE,TURTLEBOT_GAZEBO_MAP_FILE是后面启动仿真环境amcl_demo.launch所使用的地图文件(turtlebo2_simulator/turtlebot_gazebo/maps),TURTLEBOT_GAZEBO_WORLD_FILE是这个指令启动仿真世界所用的世界模型,均可以通过以下指令进行临时配置(若要更改默认配置,请修改25.turtlebot-gazebo.sh.em文件):
```bash
export TURTLEBOT_GAZEBO_WORLD_FILE=....
```
- 启动世界时,可以设置机器人初始位置,在/turtlebot_simulator/turtlebot_gazebo/turtlebot_world.launch,设置
```bash
```
####
### 启动导航包
指令:
```bash
roslaunch turtlebot_gazebo amcl_demo.launch
```
其中/turtlebot_simulator/turtlebot_gazebo/amcl_demo.launch,可以设置机器人初始位置:
```bash
```
其中地图依赖 TURTLEBOT_GAZEBO_MAP_FILE,可以后修改成其他:
```bash
```
### 启动移动服务
指令:
```bash
rosrun move_tb2 gotopoint.py
```
可通过服务调用发送目标位置,让Turtlebot2移动
```bash
rosservice call /wait_for_destination "x: y: "
```
移动成功后会返回结果result,1表示成功移动到目标位置,0表示失败

### 可通过rviz查看
指令:
```bash
roslaunch turtlebot_rviz_launchers view_navigation.launch
```