MAS Industrial Robotics
latest
  • About
  • Getting started
  • Contributing

Tutorial

  • Docker
  • Perception
  • Manipulation
  • Navigation
    • On workstation or your PC
    • 2D SLAM
    • 2D Navigation
    • Direct base controller
  • Planning
  • Simulation
  • Infrastructure

Task

  • BMT (Basic Manipulation Task) setup

Documentation

  • Perception Documentation
  • Manipulation Documentation
  • Navigation Documentation
  • Planning Documentation
  • Simulation Documentation
MAS Industrial Robotics
  • Navigation
  • Edit on GitHub

Navigation

On workstation or your PC

  • To shh the youbot (in all terminals):

    yb4
    

    Note

    alias yb4=ssh -X robocup@youbot-brsu-4-pc2

  • Export the youbot ssh alias

    export_yb4
    

    Note

    alias export_yb4=export ROS_MASTER_URI=http://youbot-brsu-4-pc2:11311

  • Run rviz

    rosrun rviz rviz
    

    Set the global frame to base_link

2D SLAM

  • Run roscore

    roscore
    
  • Launch the robot

    roslaunch mir_bringup robot.launch
    
  • Run 2D SLAM

    roslaunch mir_2dslam 2dslam.launch
    

    Note

    The map is built using the front laser’s only

  • Run the map saver

    Go to the map configuration directory

    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]
    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.

2D 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
    
  • Launch the planning bringup

    roslaunch mir_planning_bringup robot.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

  • Save the navigation and orientation goals

    roscd mcr_default_env_config
    cd brsu-C025
    rosrun mcr_navigation_tools save_base_map_poses_to_file
    
  • Test navigation goal using move_base

rosrun mir_move_base_safe move_base_safe_server.py
rosrun mir_move_base_safe move_base_safe_client_test.py [dest]
  • Navigation test using refbox

roslaunch mir_basic_navigation_test refbox_parser.py

Direct base controller

The direct base controller is used to perform relative motions of the robot with respect to a reference frame. It has an optional feature to stop the motions when obstacles are detected with the laser scanners.

  • Bringup the robot

roslaunch mir_bringup robot.launch
  • Launch the direct base controller

roslaunch mir_direct_base_controller direct_base_controller.launch
  • Launch the pose mockup GUI on your PC:

export ROS_MASTER_URI=http://<robot_ip_address>:11311
roslaunch mir_direct_base_controller pose_mock_up_gui.launch

A GUI pop up window will appear. Set the relative pose accordingly in the window (e.g. 0.1 in X to move forward 10 cm).

  • Run rviz on your PC:

    export ROS_MASTER_URI=http://<robot_ip_address>:11311
    rviz
    

    Set the ‘Fixed Frame’ to odom Add a ‘Pose’ display and set the topic to ‘/mcr_navigation/direct_base_controller/input_pose’

  • Publish an e_start event to the direct base controller node

rostopic pub /mcr_navigation/direct_base_controller/coordinator/event_in std_msgs/String "data: 'e_start'"
Previous Next

© Copyright 2022, www.b-it-bots.de. Revision b080a6b1.

Built with Sphinx using a theme provided by Read the Docs.