Container for x80sv description, simulation and drivers
This section describes how to install this software package on a new machine. If the software was already present, you can skip this section.
-
Install ubuntu 14.04-LTS
http://www.ubuntu.com/ -
Install ros indigo http://www.ros.org/install/
-
In your user directory setup a ROS catkin workspace http://wiki.ros.org/ROS/Tutorials/InstallingandConfiguringROSEnvironment
-
Setup .bashrc to automatically load the workspace:
- Source the workspace
source ~/catkin_ws/devel/setup.bash
- Source the workspace
-
Install dependencies:
- apt-get install ros-indigo-global-planner ros-indigo-gmapping ros-indigo-dwa-local-planner ros-indigo-move-base ros-indigo-controller-manager ros-indigo-base-local-planner ros-indigo-costmap-2d
-
Clone skynav and x80sv in the catkin_ws/src folder. (or clone somewhere else (~/GIT/) and create a symbolic link to the files in the catkin_ws/src folder.)
- for the navigation software:
:~/catkin_ws/src $ git clone https://github.com/SaxionLED/skynav.git
- for the x80sv robot drivers:
:~/catkin_ws/src $ git clone https://github.com/SaxionLED/x80sv.git
- Build the project
:~/catkin_ws $ catkin_make
- (Optional) Build and run the gtests and rostests (only if you want to run the testsuite)
:~/catkin_ws $ catkin_make run_tests
- It is convenient to add the following line to your .bashrc:
source ~/catkin_ws/devel/setup.bash
- Only the x80sv laptop:
- Setup serial ports to right setup and add useraccount to 'dialout' group
$ useradd -G dialout [USER]
- Copy the files from x80sv/x80sv_driver/udev to /etc/udev/rules.d (if not already present) this is required for resolving the robot specific USB connections. These include usb to serial for controllerboard, the laser range sensor and the blink1 status led.
This section describes how to run the simulation of the x80sv robot. For this, only a single PC is required.
-
Note: If you have used the real robot, make sure that the roscore is running on the x80sv laptop. If you do not have the x80sv robot, make sure to comment out this line: export ROS_MASTER_URI=http://x80sv:11311/ in your ~/.bashrc file.
-
Run the simulated version of the robot:
:~/catkin_ws $ roslaunch x80sv_bringup sim_world.launch
- Launch the navigation system for the x80sv:
:~/catkin_ws $ roslaunch x80sv_navigation x80sv_navigation.launch
This launches the gmapping node and the move base node.
- To steer the robot see section robot steering.
This section describes how to start the software on the robot laptop.
-
Make sure that the hostpc and the x80sv laptop are in the same local network by using a router.
-
Install all software (as described above) on both the hostpc and the x80sv laptop (if not already done).
-
On the host pc make sure that the ROS_MASTER_URI is set to point to the x80sv laptop. The command:
hostpc:~/catkin_ws $ env | grep ROS_MASTER_URI
should return:
ROS_MASTER_URI=http://x80sv:11311/
and if not, set this environment variable:
hostpc:~/catkin_ws $ export ROS_MASTER_URI=http://x80sv:11311/
It may be handy to add this export to your bashrc. bashrc is the config file that is run when a new terminal opens. So after editing this file, all shells must be restarted for this setting to take effect.
- Make sure that on both hostpc and x80sv laptop, the /etc/hosts file is setup such that hostnames are resolved correctly. If all is correct, it must be possible to do this:
x80sv:~/catkin_ws $ ping x80sv
- Log into the x80sv laptop by using ssh:
hostpc:~/catkin_ws $ ssh x80sv
This is recommended, but not required. You can also start the software on the laptop by using the laptop itself!
-
Press the red button to power the baseboard. There should be leds blinking on the baseboard. Connect the laser scanner with the usb port. It should start to rotate.
-
Launch the robot drivers on the robot laptop:
x80sv:~/catkin_ws $ roslaunch x80sv_bringup real_robot_driver.launch
If everything is well, the usb led should be blinking.
- Launch the navigation system for the x80sv on the robot laptop:
x80sv:~/catkin_ws $ roslaunch x80sv_navigation x80sv_navigation.launch
If anything goes wrong, just press the red button to poweroff the robot again.
This section describes how to control the robot.
- Launch rviz (http://wiki.ros.org/rviz):
:~/catkin_ws $ rviz
and visualize the following topics:
- /map
- /laser/scan
and visualize the following objects:
- robot model
- tf
alternatively you can open the file "rviz_config.rviz"
-
Now in rviz select 2D Nav Goal and select a point on the map where you want the robot to move.
-
Launch rqt and use the robot steering plugin to steer the robot:
:~/catkin_ws $ rqt
- Terminate all shells, by pressing CTRL-C and typing exit or closing the window.
- Press the red button on the robot to power off the controller board.
- Shut down the laptop on the x80sv
- When the robot has slipped and the map is corrupted, restart the x80sv_navigation.
- The robot cannot scan obstacles lower than the laser scanner, remove those obstacles from the room.