Revision a8480867
Made a lot of changes to the general structure.
Applied object-orienting techniques to the code, cleaning it up considerably. Major design changes are as follows:
- All separate node code (ie motors) are meant to only interface with hardware - doing as little logic as possible.
- Instead, the logic is moved to a class (ie MotorControl) in libscout. PID and other tools should be located here. This significantly reduces dependencies.
- Files can be included cross-package by being placed in /include/packagename, but this should be avoided to reduce dependencies.
A few formatting changes:
- Comments should end with / always, not */
- Use @ instead of \
- No double newlines.
The motors node is revamped and pretty much correct at this point.
scout/scoutsim/src/sim_frame.cpp | ||
---|---|---|
10 | 10 |
* @author Alex Zirbel |
11 | 11 |
*/ |
12 | 12 |
|
13 |
#include "scoutsim/sim_frame.h"
|
|
13 |
#include "sim_frame.h" |
|
14 | 14 |
|
15 | 15 |
#include <ros/package.h> |
16 | 16 |
#include <cstdlib> |
... | ... | |
46 | 46 |
std::string scouts[SCOUTSIM_NUM_SCOUTS] = |
47 | 47 |
{ |
48 | 48 |
"scout.png" |
49 |
"scout_forreal.png" |
|
50 | 49 |
}; |
51 | 50 |
|
52 | 51 |
std::string images_path = ros::package::getPath("scoutsim")+"/images/"; |
Also available in: Unified diff