Revision c492be62
ID | c492be629f06e3cf71fdf832ce2cd5ac1ec779f8 |
Updated the licensing information in many files.
This is a broken commit because I decided to do this at a bad time. Sorry! The build will be working after next commit, I promise (and I won't push till then). This commit reflects the licensing in the files after I used my auto-add/remove script.
scout/scoutsim/src/scout.h | ||
---|---|---|
1 |
/* |
|
2 |
* This package was developed by the CMU Robotics Club project using code |
|
3 |
* from Willow Garage, Inc. Please see licensing.txt for details. |
|
1 |
/** |
|
2 |
* The code in this package was developed using the structure of Willow |
|
3 |
* Garage's turtlesim package. It was modified by the CMU Robotics Club |
|
4 |
* to be used as a simulator for the Colony Scout robot. |
|
4 | 5 |
* |
6 |
* All redistribution of this code is limited to the terms of Willow Garage's |
|
7 |
* licensing terms, as well as under permission from the CMU Robotics Club. |
|
8 |
* |
|
9 |
* Copyright (c) 2011 Colony Project |
|
10 |
* |
|
11 |
* Permission is hereby granted, free of charge, to any person |
|
12 |
* obtaining a copy of this software and associated documentation |
|
13 |
* files (the "Software"), to deal in the Software without |
|
14 |
* restriction, including without limitation the rights to use, |
|
15 |
* copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
16 |
* copies of the Software, and to permit persons to whom the |
|
17 |
* Software is furnished to do so, subject to the following |
|
18 |
* conditions: |
|
19 |
* |
|
20 |
* The above copyright notice and this permission notice shall be |
|
21 |
* included in all copies or substantial portions of the Software. |
|
22 |
* |
|
23 |
* Copyright (c) 2009, Willow Garage, Inc. |
|
5 | 24 |
* All rights reserved. |
6 |
* |
|
7 |
* @file scout.h |
|
8 |
* @author Colony Project, CMU Robotics Club |
|
9 |
* @author Alex Zirbel |
|
25 |
* |
|
26 |
* Redistribution and use in source and binary forms, with or without |
|
27 |
* modification, are permitted provided that the following conditions are met: |
|
28 |
* |
|
29 |
* Redistributions of source code must retain the above copyright |
|
30 |
* notice, this list of conditions and the following disclaimer. |
|
31 |
* Redistributions in binary form must reproduce the above copyright |
|
32 |
* notice, this list of conditions and the following disclaimer in the |
|
33 |
* documentation and/or other materials provided with the distribution. |
|
34 |
* Neither the name of the Willow Garage, Inc. nor the names of its |
|
35 |
* contributors may be used to endorse or promote products derived from |
|
36 |
* this software without specific prior written permission. |
|
37 |
* |
|
38 |
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
|
39 |
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
40 |
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
41 |
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
42 |
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
43 |
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
44 |
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
45 |
* OTHER DEALINGS IN THE SOFTWARE. |
|
10 | 46 |
*/ |
11 | 47 |
|
12 | 48 |
#ifndef _SCOUTSIM_SCOUT_H_ |
... | ... | |
19 | 55 |
|
20 | 56 |
#include <scoutsim/Pose.h> |
21 | 57 |
#include <scoutsim/SetPen.h> |
22 |
#include <scoutsim/TeleportRelative.h> |
|
23 |
#include <scoutsim/TeleportAbsolute.h> |
|
24 | 58 |
#include <scoutsim/Color.h> |
25 | 59 |
|
26 | 60 |
#include <wx/wx.h> |
27 | 61 |
|
62 |
#include "scout_constants.h" |
|
63 |
|
|
28 | 64 |
#define PI 3.14159265 |
65 |
|
|
29 | 66 |
/// The scale factor so the speed of scout robots is reasonable for the sim |
30 | 67 |
#define SPEED_SCALE_FACTOR 0.05 |
31 | 68 |
|
... | ... | |
70 | 107 |
|
71 | 108 |
private: |
72 | 109 |
void setMotors(const motors::set_motors::ConstPtr& msg); |
110 |
float getSonar(float angle); |
|
73 | 111 |
bool setPenCallback(scoutsim::SetPen::Request&, |
74 | 112 |
scoutsim::SetPen::Response&); |
75 |
bool teleportRelativeCallback(scoutsim::TeleportRelative::Request&, |
|
76 |
scoutsim::TeleportRelative::Response&); |
|
77 |
bool teleportAbsoluteCallback(scoutsim::TeleportAbsolute::Request&, |
|
78 |
scoutsim::TeleportAbsolute::Response&); |
|
79 | 113 |
|
80 | 114 |
ros::NodeHandle node; |
81 | 115 |
|
... | ... | |
91 | 125 |
int motor_bl_speed; |
92 | 126 |
int motor_br_speed; |
93 | 127 |
|
128 |
// Each scout has a unique id number, which is also displayed on its image. |
|
129 |
int scout_id; |
|
130 |
|
|
94 | 131 |
float lin_vel; |
95 | 132 |
float ang_vel; |
96 | 133 |
bool pen_on; |
... | ... | |
100 | 137 |
ros::Publisher pose_pub; |
101 | 138 |
ros::Publisher color_pub; |
102 | 139 |
ros::ServiceServer set_pen_srv; |
103 |
ros::ServiceServer teleport_relative_srv; |
|
104 |
ros::ServiceServer teleport_absolute_srv; |
|
105 | 140 |
|
106 | 141 |
ros::WallTime last_command_time; |
107 | 142 |
|
108 | 143 |
float meter; |
109 | 144 |
|
110 |
struct TeleportRequest |
|
111 |
{ |
|
112 |
TeleportRequest(float x, float y, float new_theta, |
|
113 |
float new_linear, bool new_relative) |
|
114 |
: pos(x, y) |
|
115 |
, theta(new_theta) |
|
116 |
, linear(new_linear) |
|
117 |
, relative(new_relative) |
|
118 |
{} |
|
119 |
|
|
120 |
Vector2 pos; |
|
121 |
float theta; |
|
122 |
float linear; |
|
123 |
bool relative; |
|
124 |
}; |
|
125 |
|
|
126 |
typedef std::vector<TeleportRequest> V_TeleportRequest; |
|
127 |
V_TeleportRequest teleport_requests; |
|
128 | 145 |
}; |
129 | 146 |
typedef boost::shared_ptr<Scout> ScoutPtr; |
130 | 147 |
|
131 |
} |
|
148 |
|
|
132 | 149 |
|
133 | 150 |
#endif |
Also available in: Unified diff