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/CMakeLists.txt | ||
---|---|---|
32 | 32 |
rosbuild_link_boost(scoutsim_node thread) |
33 | 33 |
target_link_libraries(scoutsim_node ${wxWidgets_LIBRARIES}) |
34 | 34 |
|
35 |
|
|
36 |
include($ENV{ROS_ROOT}/core/rosbuild/FindPkgConfig.cmake) |
|
37 |
include_directories(${MOTORS_INCLUDE_DIRS}) |
|
38 |
link_directories(${MOTORS_LIBRARY_DIRS}) |
|
39 |
target_link_libraries(scoutsim_node ${MOTORS_LIBRARIES}) |
|
40 |
|
|
41 |
target_link_libraries(scoutsim_node motors) |
|
42 |
|
|
35 | 43 |
# @TODO are these useful or necessary? Determine; add as needed |
36 | 44 |
#rosbuild_add_executable(turtle_teleop_key tutorials/teleop_turtle_key.cpp) |
37 | 45 |
#rosbuild_add_executable(draw_square tutorials/draw_square.cpp) |
Also available in: Unified diff