Project

General

Profile

Revision 0121ead7

ID0121ead71d532ad27980027f0bda30ea591d8e27
Parent c406f16b
Child b64c27b7

Added by Ben Wasserman over 12 years ago

Added the ROS stack with the libscout, motors, and sonar packages to the reposititory, and associated files. There are probably still things missing. Libscout won't run properly, but it and motors will compile. Sonar is probably broken, but nothing depends on it yet, so this shouldn't be an issue.

View differences:

scout/libscout/src/libmotors.h
1 1
/**
2
 * Copyright (c) 2007 Colony Project
2
 * Copyright (c) 2011 Colony Project
3 3
 * 
4 4
 * Permission is hereby granted, free of charge, to any person
5 5
 * obtaining a copy of this software and associated documentation
......
42 42
#include "motors/query_motors.h"
43 43
#include "motors/set_motors.h"
44 44

  
45

  
46 45
#ifndef _LIBMOTORS_H_
47 46
#define _LIBMOTORS_H_
48 47

  
49 48
/* Defines */
50
const int MOTOR_FL = 0x8;
51
const int MOTOR_FR = 0x4;
52
const int MOTOR_BL = 0x2;
53
const int MOTOR_BR = 0x1;
54

  
55

  
56
ros::Publisher set_motors_publisher;
57
ros::ServiceClient query_motors_client;
49
#define MOTOR_ALL 0xF
50
#define MOTOR_ALL_REV 0xF0
51
#define MOTOR_NONE 0x0
52
#define MOTOR_FL 0x8
53
#define MOTOR_FR 0x4
54
#define MOTOR_BL 0x2
55
#define MOTOR_BR 0x1
56
#define MOTOR_FL_REV 0x80
57
#define MOTOR_FR_REV 0x40
58
#define MOTOR_BL_REV 0x20
59
#define MOTOR_BR_REV 0x10
60
#define MOTOR_FRONT MOTOR_FL | MOTOR_FR
61
#define MOTOR_BACK MOTOR_BR | MOTOR_BR
62
#define MOTOR_LEFT MOTOR_FL | MOTOR_BL
63
#define MOTOR_RIGHT MOTOR_FR | MOTOR_BR
64
#define MOTOR_LEFT_REV MOTOR_FL_REV | MOTOR_BL_REV
65
#define MOTOR_RIGHT_REV MOTOR_FR_REV | MOTOR_BR_REV
66
#define MOTOR_LEFT_SPIN MOTOR_LEFT_REV | MOTOR_RIGHT
67
#define MOTOR_RIGHT_SPIN MOTOR_LEFT | MOTOR_RIGHT_REV
68
#define MOTOR_PERCENT 'p'
69
#define MOTOR_MMS 'm'
70
#define MOTOR_CMS 'c'
58 71

  
59 72
void libmotors_init();
60 73
int motors_set(int speed, int which);
61
int motors_speed_set(int speed, int which);
62 74
int motors_query(int which);
63 75

  
64 76
#endif
77

  

Also available in: Unified diff