Table of Contents
|
Lab Notebook
Date: 19/04 2012
Group members participating: Falk, Jeppe and Jakob
Duration of activity: 3 hours
Goal
Investigate how a robot can move around in a cartesian coordinate system, keeping track of its position and direction.
Plan
- Build a robot.
- Implement a program that makes the robot move according to a cartesian coordinate system, like Bagnall's 'Blightbot [1].
- Test the influence of rotation speed, wheel diameter and track width.
- Describe how to navigate while avoiding objects.
- Compare and consider the improved navigation.
Results
The robot
The robot was build accordingly to the manual 9797 page 8-22.
The program
Before starting programming the following ideas were considered:
- The DifferentialPilot should be used.
- Wheel diameter: 5.6 cm
- Track width: 11.1 cm (middle of the wheels)
- The program uses the DifferentialPilot with the OdometryPostProvider attached to keep track of the pose of the robot.
private static DifferentialPilot pilot = new DifferentialPilot(5.6, 11.1, Motor.C, Motor.B); private static OdometryPoseProvider poseProvider = new OdometryPoseProvider(pilot);
- The main structure of the program is similar to the main structure of Bagnall's program, at least with the goTo method.
... goTo(200,0); goTo(100,100); goTo(100,-50); goTo(0,0); ...
The first implementation used the method angleTo which caused the robot to turn wrong at certain points, even though the position of the robot was correct the calculations of the heading was incorrect.
The reason for this is that angleTo returns the angle relative to the x-axis, and not to the pose. Instead using the relativeBearing solved the problem.
public static void goTo(float x, float y) { Pose currentPose = poseProvider.getPose(); float heading = currentPose.relativeBearing(new Point(x, y)); float distance = currentPose.distanceTo(new Point(x, y)); ... }
A whiteboard marker was attached at the front of the robot, and it made the following pattern:
As can be seen this is a bit off compared to [1], but another run mad this a lot better:
The second picture shows the robot path is close to completely on the desired track.
Tests
To test if the rotation speed has an impact on the accuracy the robot was run with the following rotation speeds. (only one run for each value)
Wheel diameter: 5.6cm
|
Surprisingly enough the robot gets closer to the goal as the rotation speed increases, but this is based on very few readings.
The (insecure) conclusion is however that the higher rotation speed the lower the drift.
The robot was also tested with different wheel diameter.
Rotation speed: 320
|
The wheel diameter obviously has a huge impact on the accuracy of the robot.
The best run was with the rotation speed at 320 and with a wheel diameter of 5.7 and not 5.6 as the original measurement.
There was not enough time at the lab session to test the influence of the track width.
Avoiding
To avoid objects while navigating the non-blocking travel-method is needed, to be able to detect objects and possible act on this while driving. To avoid something the robot must be stopped. The pilot remembers where it is at, and if the avoiding move is done also using the pilot, it will still remember the pose.
There was not enough time at the lab session to consider the improved navigation.
Conclusion
With a relative simple implementation using the DifferentialPilot with the OdometryPostProvider it was possible to have the robot drive around in a coordinate system and with good results. To improve the accuracy P-regulated motors with the tacho-counter could have been used.
If this approach is used for driving more than a few meters, it could easily pay off to investigate further into the optimal values for rotation speed, wheel diameter and track width. The other options the DifferentialPilot offers should also be considered such as travel speed and acceleration.