# hsr

## 1. Create workspace

```
$ mkdir -p ~/catkin_ws/src
$ cd ~/catkin_ws/src
$ catkin_init_workspace // generate CMakeLists.txt

$ cd ~/catkin_ws
$ catkin_make
```

## 2. Add .gitignore

[https://github.com/github/gitignore/blob/master/ROS.gitignore](https://github.com/github/gitignore/blob/master/ROS.gitignore)

## 3. Add a package

### From existing pkgs

```
$ git submodule add https://github.com/ros-perception/slam_gmapping.git src/slam_gmapping
$ git submodule add https://github.com/turtlebot/turtlebot.git src/turtlebot
$ git submodule add https://github.com/turtlebot/turtlebot_simulator.git src/turtlebot_simulator
$ git submodule add https://github.com/turtlebot/turtlebot_interactions.git src/turtlebot_interactions
```

### Add folders

```
    ├──                                # Official ROS packages
    |
    ├── slam_gmapping                  # gmapping_demo.launch file                   
    │   ├── gmapping
    │   ├── ...
    ├── turtlebot                      # keyboard_teleop.launch file
    │   ├── turtlebot_teleop
    │   ├── ...
    ├── turtlebot_interactions         # view_navigation.launch file      
    │   ├── turtlebot_rviz_launchers
    │   ├── ...
    ├── turtlebot_simulator            # turtlebot_world.launch file 
    │   ├── turtlebot_gazebo
    │   ├── ...
    ├──                                # Your packages and direcotries
    |
    ├── World                          # world files
    │   ├── ...
    ├── ShellScripts                   # shell scripts files
    │   ├── ...
    ├──RvizConfig                      # rviz configuration files
    │   ├── ...
    ├──wall_follower                   # wall_follower C++ node
    │   ├── src/wall_follower.cpp
    │   ├── ...
    ├──pick_objects                    # pick_objects C++ node
    │   ├── src/pick_objects.cpp
    │   ├── ...
    ├──add_markers                     # add_marker C++ node
    │   ├── src/add_markers.cpp
    │   ├── ...
    └──
```

## 4. rosdep

```
$ rosdep install -i slam_gmapping
$ rosdep install -i turtlebot
$ rosdep install -i turtlebot_interactions
$ rosdep install -i turtlebot_simulator
```

## 5. Make

```
$ cd ~/catkin_ws
$ catkin_make
```

Could not find a package configuration file provided by "joy" with any of

the following names:

```
joyConfig.cmake

joy-config.cmake
```

```
$  rosversion -d
>> kinectic
$ rosdep install --from-paths src --ignore-src --rosdistro kinetic -y -r
$ catkin_make
>> [100%]
```

## 6. Create World & Building Editor in Gazebo

```
$ catkin_create_pkg World
```

run gazebo >> edit >> building editor

save to _**World**_ folder

## 7. Add test\_slam.sh

## Debug Rosparams

```
$ rosparam list
$ rosparam get /slam_gmapping/particles
```

Generate Map

```
$ rosrun map_server map_saver
```
