Caddy
A 2005 Roborodentia entry with vision and path planning capability
 All Data Structures Files Functions Variables Typedefs Macros Pages
Macros | Functions
servos.h File Reference

Servo control interface for Caddy. More...

#include <stdint.h>
Include dependency graph for servos.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define PAN   0
 Servo to control the left/right swivel motion of the camera.
#define TILT   1
 Servo to control the forward/back rocking motion of the camera.
#define BOOM   2
 Servo to control the boom arm.
#define LIFT   3
 Servo to control the lift and scooping blade.
#define DOOR   4
 Servo to control the hopper door.
#define PAN_CENTER   128
#define MAX_PAN_LEFT   50
#define MAX_PAN_RIGHT   195
#define TILT_BB_GRAB   133
#define TILT_VERT   128
 requires boom to be MAX_BOOM_UP
#define TILT_LOOKUP   186
#define TILT_BACK   MAX_TILT_BACK
#define TILT_FORWARD   MAX_TILT_FORWARD
#define MAX_TILT_BACK   195
#define MAX_TILT_FORWARD   70
#define BOOM_UP   MAX_BOOM_UP
#define BOOM_BB_GRAB   183
 cup 2.32 inches off ground
#define MAX_BOOM_UP   45
#define MAX_BOOM_DOWN   148
#define LIFT_OPEN   MAX_LIFT_OPEN
#define LIFT_UP   MAX_LIFT_UP
#define LIFT_CORRAL   150
 Lift position needed to release balls into corral.
#define LIFT_BB_READY   114
 Places the "V" of the lift 3 inches off ground, ready for bonus ball grabbing maneuver.
#define MAX_LIFT_OPEN   183
 Mechanical limit in which the ground ball blade is fully open.
#define MAX_LIFT_UP   74
#define DOOR_CLOSED   MAX_DOOR_CLOSED
#define DOOR_OPEN   MAX_DOOR_OPEN
#define MAX_DOOR_CLOSED   71
 Close door just to the point of touching.
#define MAX_DOOR_OPEN   200
 Mechanical limit of the door lever arm.

Functions

void setServo (uint8_t servoNum, uint8_t servoPos)
 Move servo to position and leave it on.
void disableServo (uint8_t servoNum)
 Cut power to a specified servo.

Detailed Description

Servo control interface for Caddy.

Definition in file servos.h.

Macro Definition Documentation

#define BOOM   2

Servo to control the boom arm.

The boom moves the long arm which holds the entire camera/scoop/pan/tilt assembly.

This is used for the bonus ball pickup maneuver as well as positioning of the camera.

Position is held mechanically (servo can be passive after moving to position)

Definition at line 61 of file servos.h.

#define DOOR   4

Servo to control the hopper door.

Opens and closes hopper door (e.g. to release the balls into the corral at the end of the Roborodentia course)

Position is held mechanically (servo can be passive after moving to position)

Definition at line 88 of file servos.h.

#define LIFT   3

Servo to control the lift and scooping blade.

The lift servo, with just simple rotational actuation, drives the complex mechanical motion of lift assembly which:

  • Opens/closes the ground ball scooping blade
  • Lifts captured ground balls into the hopper
  • Aligns the robot with the corner of a wall using the 90 degree "V" shape of the front of the lift (used as the first step of the bonus ball pickup maneuver)

Position is held mechanically (servo can be passive after moving to position)

Definition at line 77 of file servos.h.

#define MAX_LIFT_UP   74

Definition at line 113 of file servos.h.

#define PAN   0

Servo to control the left/right swivel motion of the camera.

Allows the camera to look down corridors to the side

Position is held by actively driving the servo.

Definition at line 34 of file servos.h.

#define TILT   1

Servo to control the forward/back rocking motion of the camera.

Allows the camera to look down at the ground (e.g. for line tracking) and to look forward to see if balls lie in the path ahead.

The tilt also controls the bonus ball scooping cup since the cup and the camera are on the same rigid assembly.

Position is held by actively driving the servo.

Definition at line 47 of file servos.h.

Function Documentation

void disableServo ( uint8_t  servoNum)

Cut power to a specified servo.

param[in] servoNum Number of the servo output on the CMUcam2

Definition at line 30 of file servos.c.

void setServo ( uint8_t  servoNum,
uint8_t  servoPos 
)

Move servo to position and leave it on.

param[in] servoNum Number of the servo output on the CMUcam2 param[in] servoPos 0-255 value which maps to servo angle of 0-180 degrees

Definition at line 25 of file servos.c.