I worked on robot localization, applying kalman filters to GPS measurements, and ROS setup.

I worked on robot localization, applying kalman filters to GPS measurements, and ROS setup.

−

Code is included in-line in this Wiki page and at the bottom in a tar.

+

Code is included in-line in this Wiki page for history's sake; I'm not sure how long the repository will stay online.

−

+

=What I Did=

=What I Did=

==Localization with the Pioneer==

==Localization with the Pioneer==

−

===overview===

+

===Overview===

−

p2os was used to control and receive data from the robot. p2os publishes odometery and pose information from the robot over [[ROS topics|http://www.ros.org/wiki/Topics]]. rviz is used to listen to the ROS topics and visualize the odometery and pose information in a 3D simulation. Integration with rviz also allows future expansion to use other ROS packages and topics. For instance, the navigation package, which would allow the user to provide goals to the robot, or also visualize the map or other SLAM sensors.

+

[http://www.ros.org/wiki/p2os p2os] was used to control and receive data from the robot. p2os publishes odometery and pose information from the robot over [http://www.ros.org/wiki/Topics ROS topics]. [http://www.ros.org/wiki/rviz rviz] is used to listen to the ROS topics, and then visualize the odometery and pose information in a 3D simulation. Integration with rviz also allows future expansion to use other ROS packages and topics. For instance, the [http://www.ros.org/wiki/navigation navigation] package, which would allow the user to provide goals to the robot, or also visualize the map or other SLAM sensors.

−

===screenshot/video?===

+

===Screenshots===

Going to the lab tomorrow to take some screen shots.

Going to the lab tomorrow to take some screen shots.

−

===howto===

+

===How To===

−

==gps on the side==

+

Start with the [[ROS_(Robot_Operating_System)|wiki page]] I created for setting up our robot. The pages also tell you how to start the 3D simulation for the robot's sensors.

−

===overview===

+

−

An example of a Kalman Filter, filtering GPS coordinates.

+

−

===code===

+

==GPS with Kalman Filter==

+

===Overview===

+

This script takes a GPS and runs a Kalman filter over the data. The Kalman filter provides a more accurate and less erratic measurement.

+

===How To===

+

# Install gpsd. (sudo apt-get install gpsd)

+

# Plug in the gps via usb,

+

# Start gpsd (<tt>man gpsd</tt> to see how to use gpsd).

+

# Run <tt>xgps</tt> and wait for a signal.

+

# Copy the code below and put it into a file called <tt>kalman.py</tt>.

+

# Run <tt>python kalman.py</tt>

+

+

===Screenshots===

+

Going to lab tomorrow to take screenshots.

+

===Code===

+

kalman.py:

<pre># Code adapted from:

<pre># Code adapted from:

# Kalman filter example demo in Python

# Kalman filter example demo in Python

Line 102:

Line 113:

</pre>

</pre>

−

===howto===

+

==ROS Launch Script==

−

This script takes a GPS and runs a Kalman filter over the data. The Kalman filter provides a more accurate and less erratic measurement.

+

===Overview===

−

# Plug in the gps via usb,

+

A [http://ros.org/wiki/roslaunch ROS launch] script that starts p2os, and rviz.

−

# Start gpsd (<tt>man gpsd</tt> to see how to use gpsd).

+

===How To===

−

# Run <tt>xgps</tt> and wait for a signal.

+

Follow the instructions on the [[ROS_(Robot_Operating_System)|main page]].

−

# Run <tt>python kalman.py</tt>

+

−

+

−

Going to lab tomorrow to take screenshots.

+

−

==ros launch scripts==

+

===Code===

−

===overview===

+

−

A project that launches Unicorn.

+

−

===howto===

+

−

===code===

+

<pre>

<pre>

<launch>

<launch>

Line 128:

Line 132:

</pre>

</pre>

−

==ros patches==

+

==ROS Patches==

−

===overview===

+

===Overview===

−

These patches to fixes the pioneer's ROS package. The repository as it was, was not working. The ROS setup scripts that are include apply these patches automatically.

+

I had to fix p2os (the pioneer's ROS package) a few times during the term. The repository as it was, was not working with telop and was not working with fuetre when ROS released it. The ROS setup scripts that are included in the repository apply these patches automatically.

−

===howto===

+

−

===code===

+

===Code===

+

Fixes any of the telop errors that have to do with hash problems.

<pre>

<pre>

Index: p2os_teleop/src/p2os_teleop.cc

Index: p2os_teleop/src/p2os_teleop.cc

Line 174:

Line 179:

</pre>

</pre>

+

Updates p2os for ROS fuetre:

<pre>

<pre>

Index: p2os_teleop/manifest.xml

Index: p2os_teleop/manifest.xml

Line 212:

Line 218:

</pre>

</pre>

−

==ros install scripts==

+

==ROS Install Scripts==

−

===overview===

+

===Overview===

−

Install ROS and setup our robot's files from our repository.

+

Install ROS and setups our robot's stack from our repository. Made to work on Ubuntu 11.04.

−

===howto===

+

===How To===

Unzip the provided tar, it's a git repository with the entire classes' work. Go to robotlab/ros/ and run setup-ros.bash.

Unzip the provided tar, it's a git repository with the entire classes' work. Go to robotlab/ros/ and run setup-ros.bash.

−

===code===

+

===Code===

−

setup-ros.bash

+

setup-ros.bash:

<pre>

<pre>

#!/bin/bash -e

#!/bin/bash -e

Line 245:

Line 251:

</pre>

</pre>

−

setup-ros-env.bash

+

setup-ros-env.bash:

<pre>

<pre>

#!/bin/bash

#!/bin/bash

Line 286:

Line 292:

</pre>

</pre>

−

upgrade-ros.bash

+

upgrade-ros.bash:

<pre>

<pre>

#!/bin/bash -e

#!/bin/bash -e

Line 318:

Line 324:

./setup-ros.bash $@

./setup-ros.bash $@

</pre>

</pre>

+

== Documentation ==

== Documentation ==

I added these pages to the wiki to help the class install/setup ROS.

I added these pages to the wiki to help the class install/setup ROS.

+

* [[ROS_(Robot_Operating_System)]]

+

* [[Navigation]]

−

=Tips and Tutorials=

+

=Tips and Tricks=

−

==Virtual Box==

+

==General Tips==

−

===overview===

+

* DO NOT use ROS on anything other than what it was made for: whatever version Ubuntu they are on. It's a REAL pain, and waste of time to do it any other way.

−

Most of the class used a Virtual Box to work inside of so ROS didn't mess with our computers. There were some advantages as well as some drawbacks.

+

* DO NOT use VirtualBox of Ubuntu if you're going to use a Kinect (doesn't work).

+

* DO NOT push the pioneer robot manually, it's bad for the motor!

+

* DO read all the documentation for ROS: http://www.ros.org/wiki/. Read each section and you'll thank yourself later.

−

===howto===

+

==Virtual Box==

−

===pros and cons===

+

===Overview===

−

Pros:

+

Most of the class used a Virtual Box to setup ROS on so it didn't mess with our computers.

# rviz (3D robot visualizer) had some issues (window black spots, had to debug it first to get it to work)

# rviz (3D robot visualizer) had some issues (window black spots, had to debug it first to get it to work)

# Kinect does NOT work through a VirtualBox.

# Kinect does NOT work through a VirtualBox.

−

+

===What Not To Do===

−

===what not to do===

+

If you're using a kinect with ros, as of June 2012, do NOT use VirtualBox.

If you're using a kinect with ros, as of June 2012, do NOT use VirtualBox.

+

=What Next?=

+

Next would be to integrate all the parts the team had together into a functioning robot. It would include mostly work with ROS.

+

Also, try taking the robot outside and testing the GPSs properly.

−

==ros==

+

=What would I do differently?=

−

===overview===

+

Have more well-defined goals for each team member and for the entire group.

−

===howto===

+

−

===pros and cons===

+

−

===what not to do===

+

Latest revision as of 22:45, 18 June 2012

Robot Lab Spring 2012.
I worked on robot localization, applying kalman filters to GPS measurements, and ROS setup.
Code is included in-line in this Wiki page for history's sake; I'm not sure how long the repository will stay online.

What I Did

Localization with the Pioneer

Overview

p2os was used to control and receive data from the robot. p2os publishes odometery and pose information from the robot over ROS topics. rviz is used to listen to the ROS topics, and then visualize the odometery and pose information in a 3D simulation. Integration with rviz also allows future expansion to use other ROS packages and topics. For instance, the navigation package, which would allow the user to provide goals to the robot, or also visualize the map or other SLAM sensors.

Screenshots

Going to the lab tomorrow to take some screen shots.

How To

Start with the wiki page I created for setting up our robot. The pages also tell you how to start the 3D simulation for the robot's sensors.

GPS with Kalman Filter

Overview

This script takes a GPS and runs a Kalman filter over the data. The Kalman filter provides a more accurate and less erratic measurement.

ROS Patches

Overview

I had to fix p2os (the pioneer's ROS package) a few times during the term. The repository as it was, was not working with telop and was not working with fuetre when ROS released it. The ROS setup scripts that are included in the repository apply these patches automatically.