wiki
Getting startedGuidesFAQ
1.0.0
1.0.0
  • b-it-bots wiki
  • @home
    • Getting started
      • First steps
      • Setting up your development environment
        • Configuring your editor
        • Using ssh
      • Adding your first contribution
    • Tutorials
      • Architecture
    • Guides
      • git
        • Making good commits
        • Branching model
        • Adding git aliases to make your life easier
        • Creating a release
      • SSH
      • ROS
        • Creating a new package
          • Creating a new node
        • Creating a new message, service or action
        • Testing in ROS
        • Linting
      • Coding conventions
        • C++
        • Python
      • Toolkit
        • CLion
        • Atom configuration
        • Using vim
        • TMUX - Terminal Multiplexer
    • Resources
    • FAQ
      • git
  • @work
    • 2018-05-06-navigation-atwork
    • 2018-05-06-simulation_mapping
    • How to use the RealSense2 camera
    • Getting the classifier from a data set
Powered by GitBook
On this page
  • Launch SLAM
  • Run the map saver
  • Navigation
  • Create navigation goals and orientations
  • Localize the robot
  • Navigation test

Was this helpful?

  1. @work

2018-05-06-navigation-atwork

PreviousgitNext2018-05-06-simulation_mapping

Last updated 5 years ago

Was this helpful?

Note : For simulation please check

Export the youbot ssh alias

export_yb2

To shh the youbot (in all terminals):

yb2

this is the alias to connect to the youbot

Run roscore

roscore

Launch the robot

roslaunch mir_bringup robot.launch

Run rviz

rosrun rviz rviz

Set the global frame to base_link

Launch SLAM

roslaunch mir_2dslam 2dslam.launch

Note: the map is built using the front laser's only

Run the map saver

Go to the folder with the map roscd mcr_default_env_config

By using ls you can see several folders corresponding to existing environments. You can either use an existing map or create a new one:

mkdir [map_name]

Before running the map_saver you need to be located in the environment folder:

cd [map_name]

And then run:

rosrun map_server map_saver

This will create two files: a map.pgm and map.yml.

Finally, to use the map that you just created you need to check which map will be loaded by the navigation stack:

echo $ROBOT_ENV

If you need to change it:

export ROBOT_ENV=[map_name]

Note: Usually the .rosc script is used to set the environment, among other variables.

Navigation

Bringup the robot

First export the environment to be used: export ROBOT_ENV=brsu-C025

Launch the robot:

roslaunch mir_bringup robot.launch

Launch the navigation node

roslaunch mir_2dnav 2Dnav.launch

Create navigation goals and orientations

First you need to create the files where goals will be saved:

touch navigation_goals.yaml
touch orientation_goals.yaml

Localize the robot

In rviz: 1. Select the 2D pose estimate 2. Click the position near the robot 3. Move with joystick 4. Launch navigation tools (in yb2)

roscd mcr_default_env_config
cd brsu-C025
rosrun mcr_navigation_tools save_map_poses_to_file

Run move_base

rosrun mir_move_base_safe move_base_safe_server.py
rosrun mir_move_base_safe move_base_safe_client_test.py [source] [dest]

Navigation test

roslaunch mir_basic_navigation_test refbox_parser.py
simulation_mapping.md