Skip to content

sontdhust/wandrian_src

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 

Repository files navigation

I. Preparation

  • Clone this repo:

    $ mkdir catkin_workspace && cd $_                    # Example: mkdir wandrian && cd $_
    $ git clone https://github.com/sontdhust/wandrian_src src   # Clone repository and rename to `src`
    
  • Install build-essential if not done so already:

    $ sudo apt-get install build-essential
    

II. Installation

Platform: Ubuntu Trusty 14.04

  • Setup sources.list and keys:

    $ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
    $ sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net --recv-key 0xB01FA116
    $ sudo apt-get update
    
  • Install ROS Indigo Desktop-Full and Kobuki + Kobuki Gazebo (Recommended):

    $ sudo apt-get install ros-indigo-desktop-full
    $ sudo apt-get install ros-indigo-kobuki ros-indigo-kobuki-gazebo
    

    Or install only ROS Base and Kobuki (Bare bone):

    $ sudo apt-get install ros-indigo-ros-base
    $ sudo apt-get install ros-indigo-kobuki
    
  • Install Hokuyo:

    $ sudo apt-get install ros-indigo-hokuyo-node
    
  • Install gmapping:

    $ sudo apt-get install ros-indigo-gmapping
    

III. Building

  • Build catkin_workspace:

    $ rm -rf build/
    $ . /opt/ros/indigo/setup.bash
    $ catkin_make --force-cmake           # Do this to re-build when the code has changed
    
  • Add catkin_workspace environment variables to bash session every time a new shell is launched:

    $ echo "" >> ~/.bashrc
    $ echo "source $(pwd)/devel/setup.bash" >> ~/.bashrc
    $ echo "source $(pwd)/src/wandrian/setup.sh" >> ~/.bashrc
    $ . ~/.bashrc
    

IV. Testing

  • Install OpenGL/GLUT:

    $ sudo apt-get install freeglut3-dev
    
  • Test:

    $ cd src/wandrian/test/
    $ ./test.sh boundary_size obstacle_size tool_size plan_name
    

V. Run on simulator

$ roslaunch wandrian environment.launch world_file:=file
$ roslaunch wandrian run_simulator.launch tool_size:=size starting_point_x:=x starting_point_y:=y plan_name:=name
$ rosrun gmapping slam_gmapping scan:=scan
$ rosrun rviz rviz

VI. Run practically

Enable the device to appear on /dev/kobuki for the first time:

$ rosrun kobuki_ftdi create_udev_rules

1. Single machine

  • Run:
    $ roslaunch kobuki_node minimal.launch --screen
    $ sudo chmod a+rw /dev/ttyACM0
    $ rosrun hokuyo_node hokuyo_node
    $ roslaunch wandrian run_practically.launch mn:=name ts:=size sp_x:=x sp_y:=y pn:=name lv:=velocity pav:=velocity nav:=velocity l_cr:=rate l_af:=factor e_rd:=epsilon e_md:=epsilon e_p:=epsilon d_lp:=deviation d_ap:=deviation t_lsc:=threshold t_asc:=threshold
    $ rosrun gmapping slam_gmapping
    $ rosrun map_server map_saver         # Save map to disk when finished
    

2. Multiple machines

  • Configuration:

    • Kobuki setup:

      $ echo "export ROS_MASTER_URI=http://localhost:11311" >> ~/.bashrc
      $ echo "export ROS_HOSTNAME=$(hostname)" >> ~/.bashrc
      
    • Remote PC setup:

      $ echo "export ROS_MASTER_URI=http://$(gethostip -d KOBUKI_HOSTNAME):11311" >> ~/.bashrc
      $ echo "export ROS_HOSTNAME=$(hostname)" >> ~/.bashrc
      
  • Run:

    • On Kobuki:

      $ roslaunch kobuki_node minimal.launch --screen
      $ sudo chmod a+rw /dev/ttyACM0
      $ rosrun hokuyo_node hokuyo_node
      
    • On remote PC:

      $ roslaunch wandrian run_practically.launch mn:=name ts:=size sp_x:=x sp_y:=y pn:=name lv:=velocity pav:=velocity nav:=velocity l_cr:=rate l_af:=factor e_rd:=epsilon e_md:=epsilon e_p:=epsilon d_lp:=deviation d_ap:=deviation t_lsc:=threshold t_asc:=threshold
      $ rosrun gmapping slam_gmapping
      $ rosrun rviz rviz
      

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages