Date:
07-06-2012
Duration of activity: 6 hours
Attendants: Jeppe, Thomas & Stefan
Duration of activity: 6 hours
Attendants: Jeppe, Thomas & Stefan
Goal:
- Make one robot climb and stopping when reaching the push sensors.
- Make three robots climb each other.
Plan:
- We will have to implement some software for detecting when a robot is on top of the other.
- Alter the robot design so the climbing becomes as easy as possible.
Results:
Software
For the
stacking robots, we are using a behavior class, to make sure that only a single
piece of our program is accessing the motors and sending messages to the
network at a time.
To this end
we have copied the behavior class from lab-session 7. A CommunicationController object has then been added to
this class and a method for sending messages assuming the particular class is
not suppressed, has also been added.
//Access to communication
public void sendMessage(Message msg){
if(!isSuppressed())
comcon.sendMessage(msg);
}
To test our
behavior class to see if the communication works as intended, we have
implemented a stacking and a pushsensor class. The pushsensor class is uploaded
to the bottom robot, and what it does is wait for the touch sensors mounted on
top to be pressed. When this happens, a stop-signal (Message.STOP_STACKING) is
sent to the network.
The
stacking class makes the middle robot drive forward. When it receives a signal
to stop, it sends a stop command to its motors. This way, when the middle-robot
is on top of the bottom-car it will press down the sensors, which in turn will
make it stop driving forward. Both of these classes extend our behavior class,
and all access to the motors and sending of signals goes through the behavior
class.
StackingMain.java
StackingMain.java
Robot
design:
We have three robots: GRABBER, STACK2 and STACK1
The Grabber robot climbs on top of Stack2, which in turn climbs on top of Stack1.
As the push sensors where placed at the very rear end of the STACK1 robot the climbing robot continued driving a bit too far and almost went over the top. Therefore we decided to place some levers that are connected to the push buttons, as shown below:
To make the ramp easier to climb we have also added rails
of each side of the robot like the following:
After these
alterations it was quite easy for the robot to climb the other as the video
below shows:
Alignment Issue
The alignment of the robots when climbing on top of each other is essential. If the two robots are not correctly aligned, the robot climbing on top might risk driving off the bottom robot. The rails would not be useful here, since they would actually prevent a robot from climbing up if the lower robot was out of alignment. Thus we decided to get rid of the rails again.
To meet the challenge we decided to mount a black line on top of the Stacking robot.
With this solution all the alignment between the two robots can be reduced to just follow the black line.
The follow line algorithm has been extended to have the following methods:
void calibrate();The complete algorithm can be found here GFollowLine.java and here FollowLine.java.
void startFollowLine();
void stopFollowLine();
It runs in its own thread. When a stop command is send, the stopFollowLine() method is invoked.
This makes the main control algorithm pretty simple, since the only two main actions are startFollowLine and stopFollowLine which are controlled by the incoming messages.
We added a three ready signals for the three robots to send out when they are connected to the main controller and ready. None of the robots should start before the others have send out their ready signal.
The result of the line follow controlled by Bluetooth communication is show below in the videos.
The Grabber robot climbing the Stacking2 robot.
The Stacking2 robot climbing the Stacking1 robot.
The Grabber climbing the Stacking2 robot, the Stacking2 robot climbing the Stacking1 robot.
Conclusion
We came up with a fine solution for the alignment problem of the robots. We saw the robots climb each other for the first time and it works. The line follow algorithm was changed to have a "start follow line" mode and a "stop follow line" mode. The communication between the robots seems to be working very good, when the lower robot is to send a message to the upper robot. As is seen from the last video where all the robots climb each other, we need to adjust the push sensors on the stacking robots since it is clear that the Grabber robot is driving a bit too far and almost drives off the stacking robot.
References
[1], PID Control, Chapter 5, pp. 179-190 of Fred G. Martin, Robotic Explorations: A Hands-on Introduction to Engineering, Prentice Hall, 2001.





Ingen kommentarer:
Send en kommentar