Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RIP v0.2 (to master) #74

Open
wants to merge 281 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
281 commits
Select commit Hold shift + click to select a range
194c542
fixes
argvrutter Mar 1, 2018
28ddf9c
Merge branch 'navigation/dev' of github.com:utk-robotics-2017/rip int…
argvrutter Mar 1, 2018
0341391
some changes for hugo, sloppy does trick for now
argvrutter Mar 2, 2018
a9e663a
arc turn works
argvrutter Mar 2, 2018
12de229
minor changes suggested on PR'
argvrutter Mar 4, 2018
c44eeef
changes to drivearc, turntoangle
argvrutter Mar 4, 2018
e4de555
changes to turn to angle. should work now
argvrutter Mar 5, 2018
97242b5
camelCase vars -> snake_case
argvrutter Mar 5, 2018
46d7f82
Merge branch 'navigation/dev' of github.com:utk-robotics-2017/rip int…
Mar 6, 2018
5dd92d5
undefined functions
Mar 6, 2018
7c396e7
PID logging
Mar 6, 2018
d965f42
fixed null
Mar 6, 2018
a709499
servo files updated
thisguyistotallyben Mar 7, 2018
3421838
digital_input.xml: fixed command name
thisguyistotallyben Mar 7, 2018
4db3bba
removed m_id() and added appendage register
thisguyistotallyben Mar 7, 2018
8231bb0
actions
Mar 7, 2018
5df6f97
simple json state storage + path correction
argvrutter Mar 7, 2018
895309b
dealt with zombie code
argvrutter Mar 8, 2018
aa3c83d
get appendages ready for dominate
Mar 9, 2018
9e58ae1
roboclaw reset added
argvrutter Mar 13, 2018
6f295aa
fix to parity
argvrutter Mar 14, 2018
c467e58
broken commit fix
argvrutter Mar 14, 2018
c2b1835
fixing merge
argvrutter Mar 14, 2018
56febf5
testing fix
argvrutter Mar 14, 2018
b6975e0
Minor fixes
argvrutter Mar 18, 2018
5bab4f4
fix
argvrutter Mar 18, 2018
9bf6073
testing quick fix for serial
jptech Mar 18, 2018
02c22d0
Merge branch 'robo/docker-cross-compile' of github.com:utk-robotics-2…
jptech Mar 18, 2018
639373f
more messing around with roboclaw
jptech Mar 18, 2018
3fad0dd
Added roboclaw xml and json
xxAtrain223 Mar 19, 2018
c8b5b0b
beginning of localization
Mar 20, 2018
cd4ae31
Added Roboclaw Header and Source
xxAtrain223 Mar 20, 2018
304470f
Enable build_rip_rpi
robobenklein Mar 20, 2018
c18640c
Merge remote-tracking branch 'origin/navigation/dev' into robo/integr…
robobenklein Mar 20, 2018
95738e5
Fix incomplete vtable in Roboclaw appendage
robobenklein Mar 25, 2018
26a118a
Add platformio to rip_deps for arduinogen
robobenklein Mar 25, 2018
d294177
Refactor go-docker +build_rip_rpi
robobenklein Mar 25, 2018
7282ff0
Merge remote-tracking branch 'origin/robo/docker-go-script' into robo…
robobenklein Mar 25, 2018
b5c1fd7
Merge remote-tracking branch 'origin/robo/docker-go-script' into robo…
robobenklein Mar 25, 2018
c619d0d
Fix open case
robobenklein Mar 25, 2018
3e9196c
Merge remote-tracking branch 'origin/robo/docker-go-script' into robo…
robobenklein Mar 25, 2018
1b7f380
Added check if code_template.txt exists.
xxAtrain223 Mar 25, 2018
111357a
Merge remote-tracking branch 'origin/arduino_gen/dev' into robo/integ…
robobenklein Mar 25, 2018
c908db7
Build separate dirs for armhf
robobenklein Mar 25, 2018
689c239
Merge remote-tracking branch 'origin/robo/docker-go-script' into robo…
robobenklein Mar 25, 2018
0eaec01
WIP - appendage header updates
argvrutter Mar 25, 2018
7bc08ce
Merge branch 'robo/integration-39' into appendages/roboclaw-aiden
argvrutter Mar 25, 2018
e9bc6b6
Be more explicit in deps
robobenklein Mar 25, 2018
54d7d21
Update before install again
robobenklein Mar 25, 2018
7a0885d
Merge remote-tracking branch 'origin/robo/docker-go-script' into robo…
robobenklein Mar 25, 2018
5d9c802
Added checks for directory and file creation.
xxAtrain223 Mar 25, 2018
1b8eb30
Merge remote-tracking branch 'origin/arduino_gen/dev' into robo/integ…
robobenklein Mar 26, 2018
11c230a
Add -p to non-testing version
robobenklein Mar 26, 2018
f7e560e
added a diag function
argvrutter Mar 26, 2018
102e230
WIP fixes for spine & diag
robobenklein Mar 27, 2018
455ef9b
merge robo/integration-39 -> appendages/roboclaw-aiden
argvrutter Mar 27, 2018
31d5089
Working on spine fixes still
robobenklein Mar 27, 2018
1ed0d03
Perhaps we need to merge some exceptions
robobenklein Mar 27, 2018
3ee6a1b
Prototypes [WIP][ci skip]
argvrutter Mar 27, 2018
69c8e5b
Working on Appendage Factory fixes
robobenklein Mar 27, 2018
74c6a0d
Words
robobenklein Mar 27, 2018
3c1e689
Need to figure arduino_gen to fix this
robobenklein Mar 27, 2018
80bfc19
Changing permissions settings in arduinogen
robobenklein Mar 27, 2018
ebb3759
Diag roboclaw fix logging
robobenklein Mar 27, 2018
c44096e
Fix rest of AG unit tests
robobenklein Mar 27, 2018
ade2ab4
Copy Ultrasonic and Servo
robobenklein Mar 27, 2018
1a2b2c6
Factory: check that appendage is available
robobenklein Mar 27, 2018
a4552d5
Ultrasonic diag
robobenklein Mar 27, 2018
5b5c638
Added core field to appendages
xxAtrain223 Mar 27, 2018
2508d7f
Merge branch 'arduino_gen/dev' into appendages/roboclaw
xxAtrain223 Mar 27, 2018
75adf74
Updated stuff, activate collaboration
argvrutter Mar 27, 2018
ff1271d
Added core field address to roboclaw
xxAtrain223 Mar 27, 2018
3494103
Merge remote-tracking branch 'origin/appendages/roboclaw' into robo/i…
robobenklein Mar 27, 2018
66309a8
pose
Mar 27, 2018
720e845
progress on xml (creds ben J), cpp and hpp
argvrutter Mar 28, 2018
40bdeef
Changed the appendage cache to use a map of strings, json objects.
xxAtrain223 Mar 28, 2018
bf76f68
Merge remote-tracking branch 'origin/appendages/roboclaw' into robo/i…
robobenklein Mar 28, 2018
a1cf671
Arduino code is now crashing...
robobenklein Mar 28, 2018
f44b66a
set max response length
Mar 28, 2018
0f2cd03
more xml functions, fixed PID function names
thisguyistotallyben Mar 28, 2018
ae223f9
progress towards Roboclaw appendage
argvrutter Mar 28, 2018
ba25273
Merging Ben's changes
argvrutter Mar 28, 2018
567820d
Updated roboclaw appendage compiles
argvrutter Mar 28, 2018
1ef10bd
Missed a spot.
argvrutter Mar 28, 2018
5511489
robo/integration-39 -> appendages/roboclaw-aiden
argvrutter Mar 28, 2018
d7eb99e
Fix arduinogen tests
robobenklein Mar 28, 2018
fbddfda
Update docker things with stretch support
robobenklein Mar 29, 2018
04d653c
Ascii commandID headers support
robobenklein Mar 29, 2018
5edf146
Merge remote-tracking branch 'origin/robo/docker-go-script' into robo…
robobenklein Mar 29, 2018
8545293
Ping now pongs
Mar 29, 2018
c620d8e
Merge branch 'robo/integration-39' into appendages/roboclaw-aiden
argvrutter Mar 29, 2018
f6bc66a
AG: perms, CM: kError case
robobenklein Mar 29, 2018
e7c18a2
Logger reasons
robobenklein Mar 29, 2018
1f607c6
m_id fix, kerror->kError
argvrutter Mar 29, 2018
9250ca7
Fixed a lot of issues
robobenklein Mar 29, 2018
422b947
Working on stretch support in build
robobenklein Mar 29, 2018
08b9390
Moving apt-key recv
robobenklein Mar 30, 2018
8570c04
Stretch builds should soon be the default?
Mar 30, 2018
7427d5d
Merge remote-tracking branch 'origin/robo/docker-go-script' into robo…
robobenklein Mar 30, 2018
e5b6ac6
Fix gcc 6.3 arm notes for JSON by adding compile flag
jptech Mar 30, 2018
3049f15
Add an option for image tag
robobenklein Mar 30, 2018
c9c37d2
Cleaning up the logging and couts
robobenklein Mar 30, 2018
db8ffc6
Merge remote-tracking branch 'origin/robo/docker-go-script' into robo…
robobenklein Mar 30, 2018
a19deae
Missed a shift
robobenklein Mar 30, 2018
74df81a
Merge remote-tracking branch 'origin/robo/docker-go-script' into robo…
robobenklein Mar 30, 2018
cbf8633
reload conf when changed
robobenklein Mar 30, 2018
6d96dc8
Merge remote-tracking branch 'origin/robo/docker-go-script' into robo…
robobenklein Mar 30, 2018
c242112
Gosh darn envvars
robobenklein Mar 30, 2018
5059aa1
Gosh darn envvars
robobenklein Mar 30, 2018
9d5cdb2
Force enums to 16-bit
robobenklein Mar 30, 2018
ae109ae
Working on bad ultrasonic reads
robobenklein Mar 31, 2018
c5f1fbd
Added respect buffer flag
argvrutter Mar 31, 2018
98d813d
new diag
argvrutter Mar 31, 2018
b103bd5
Encoder result command fix
argvrutter Mar 31, 2018
eacb334
Added ticks/rev and wheel radius parameters to roboclaw.json
argvrutter Mar 31, 2018
e9e9828
robo/integration-39 -> appendages/roboclaw-aiden
argvrutter Mar 31, 2018
fea68b1
Added getDistAndVel
argvrutter Apr 3, 2018
5e4408d
Fixes
argvrutter Apr 3, 2018
85aa538
Add initialValue to servo init
robobenklein Apr 3, 2018
096dd2f
Dealing with decel func later
argvrutter Apr 3, 2018
250ea0a
Merge branch 'robo/integration-39' into appendages/roboclaw-aiden
argvrutter Apr 3, 2018
d41548c
Fix to prior commit. Fully commenting out decel
argvrutter Apr 3, 2018
c8f3adf
Make servos setup for .5s then detach
robobenklein Apr 3, 2018
86ab615
Merge remote-tracking branch 'origin/robo/docker-go-script' into robo…
robobenklein Apr 3, 2018
4d51dde
Two roboclaw appendage compiles
argvrutter Apr 3, 2018
ceb1967
namespace fix
argvrutter Apr 3, 2018
a5bd132
Adding docs
robobenklein Apr 3, 2018
111aec7
Merge branch 'robo/integration-39' into navigation/aiden
argvrutter Apr 3, 2018
7162ffc
Merge branch 'robo/integration-39' into robo/docker-go-script
robobenklein Apr 3, 2018
156a412
Merge remote-tracking branch 'origin/robo/docker-go-script' into robo…
robobenklein Apr 3, 2018
c783fef
Merge branch 'navigation/aiden' of github.com:utk-robotics-2017/rip i…
jptech Apr 3, 2018
e899da6
Merge branch 'robo/integration-39' into navigation/aiden
argvrutter Apr 5, 2018
027fdd4
Added documentation, getAngle, setAngularSpeed
argvrutter Apr 5, 2018
856488f
*case options
robobenklein Apr 6, 2018
173c741
Merge remote-tracking branch 'origin/robo/docker-go-script' into robo…
robobenklein Apr 6, 2018
deee08d
Roboclaw appendage & drivetrain changes (remove wheel radius from rob…
argvrutter Apr 6, 2018
9f26378
Merge branch 'robo/integration-39' of github.com:utk-robotics-2017/ri…
jptech Apr 6, 2018
8e1991e
attempt 1 at kError retry within cmd messenger send
jptech Apr 6, 2018
d4822ff
Merge branch 'navigation/aiden' of github.com:utk-robotics-2017/rip i…
jptech Apr 6, 2018
0e9eb90
attempt 2 at retrying sends -- this time with a serial close and reopen
jptech Apr 6, 2018
be550c2
Merge branch 'navigation/parker' of github.com:utk-robotics-2017/rip …
jptech Apr 6, 2018
db37619
Exception handling to framework for loading subsystems, appendages, s…
argvrutter Apr 7, 2018
d94fcbf
Drivearc corrects in correct direction
argvrutter Apr 7, 2018
1eca5e5
Merge branch 'appendages/roboclaw-aiden' into navigation/aiden
argvrutter Apr 7, 2018
790c910
more attempts at being robust
jptech Apr 7, 2018
800f699
Merge branch 'navigation/parker' of github.com:utk-robotics-2017/rip …
jptech Apr 7, 2018
6d5a355
path follower
Apr 7, 2018
81036cb
Merge branch 'navigation/aiden' of github.com:utk-robotics-2017/rip i…
jptech Apr 7, 2018
43aca7a
Merge branch 'navigation/parker' of github.com:utk-robotics-2017/rip …
jptech Apr 7, 2018
c42f0dd
Use ping_median for US
robobenklein Apr 7, 2018
a7bf72b
drivetrain stuff
jptech Apr 7, 2018
db4f13e
Merge branch 'navigation/parker' of github.com:utk-robotics-2017/rip …
jptech Apr 7, 2018
ecd8aaa
Another bad drive straight
jptech Apr 7, 2018
596b6c7
more bad drive straight
jptech Apr 7, 2018
f1fb9ae
drive update
jptech Apr 7, 2018
5660b0f
drive update
jptech Apr 7, 2018
2722766
Merge branch 'navigation/parker' of github.com:utk-robotics-2017/rip …
jptech Apr 7, 2018
0074258
fix'n some mess
jptech Apr 7, 2018
ed5e9e2
Merge branch 'navigation/parker' of github.com:utk-robotics-2017/rip …
jptech Apr 7, 2018
bb1a4de
driving
jptech Apr 7, 2018
0e97190
Merge branch 'navigation/parker' into robo/integration-40
robobenklein Apr 7, 2018
ff326f3
driving with distance?
jptech Apr 7, 2018
f12c4b7
trapezoid drive straight
jptech Apr 8, 2018
a2ddcc4
gotta specify distance apparently
jptech Apr 8, 2018
a87ffbe
Remove trapezoid stuff from Drive Straight until the roboclaw will be…
jptech Apr 8, 2018
c26a6a4
try to streamline some compilation
jptech Apr 8, 2018
5902c94
Merge branch 'robo/integration-39' of github.com:utk-robotics-2017/ri…
jptech Apr 8, 2018
99cb801
update fudge factor on threshold of drive straight
jptech Apr 8, 2018
5b8f1ac
routine should get access to config
jptech Apr 8, 2018
8545fc9
fix units in ultrasonic
jptech Apr 8, 2018
78532df
add more logging to drive straight
jptech Apr 8, 2018
19d2078
update logging and stopping
jptech Apr 8, 2018
6d92e73
(Bad Merge) Merge branch 'navigation/pid' of github.com:utk-robotics-…
jptech Apr 8, 2018
565f4c0
Actually kinda resolving the merge
jptech Apr 8, 2018
2fc19f9
gui
Apr 8, 2018
023b442
gui lines and arcs
Apr 9, 2018
54f7604
now in units
Apr 9, 2018
ea16fd6
Merge branch 'navigation/localization' of github.com:utk-robotics-201…
Apr 9, 2018
5634d38
Merge branch 'robo/integration-39' of github.com:utk-robotics-2017/ri…
Apr 9, 2018
d2f9652
path follow action
Apr 9, 2018
e4f4d61
merge
Apr 9, 2018
08e4dda
remove individual waypoint
Apr 9, 2018
2a84fa6
retry navx connection forever
jptech Apr 9, 2018
06ca16a
Fixes arc drawing
Apr 10, 2018
c8c0363
Only build pose test if pose has test srcs
Apr 10, 2018
af7269c
Only build path_follower test if path_follower has test srcs
Apr 10, 2018
b0fc1a0
Updated Arduino Gen Tests
Apr 10, 2018
b1a9001
Updated Arduino Gen Tests, take 2
Apr 10, 2018
85e598f
ir on teensy
Apr 10, 2018
9b018ad
Merge branch 'navigation/localization' of github.com:utk-robotics-201…
Apr 10, 2018
68cfdaf
update teensy ir
Apr 10, 2018
d6c6315
fixed compilation bugs
Apr 10, 2018
86764a1
accel bug
Apr 10, 2018
9dfc763
fixed roboclaw issue
Apr 10, 2018
f061346
fixed ir config
Apr 10, 2018
0fb026d
fixed header guard
Apr 10, 2018
937f82a
Merge branch 'navigation/localization' of github.com:utk-robotics-201…
jptech Apr 10, 2018
469300a
backwards?
jptech Apr 10, 2018
290cbcc
Merge remote-tracking branch 'origin/navigation/parker' into robo/int…
robobenklein Apr 10, 2018
f30215b
stop
Apr 11, 2018
a988321
Merge remote-tracking branch 'origin/navigation/localization' into ro…
robobenklein Apr 11, 2018
5c2210f
nav x pid for drive straight?
jptech Apr 11, 2018
6db90fe
remove extra debug/print in cmd messenger
jptech Apr 11, 2018
810b444
Merge branch 'navigation/parker' into robo/integration-40
robobenklein Apr 11, 2018
f264a75
turn to angle
Apr 11, 2018
0518549
Merge remote-tracking branch 'origin/navigation/localization' into ro…
robobenklein Apr 11, 2018
345f462
Cmd Messenger Unit Tests work again.
Apr 11, 2018
eb8145e
Added some documentation to Cmd_Messenger Unit Tests, fixed a bug
Apr 12, 2018
e74393a
Merge branch 'navigation/parker' of github.com:utk-robotics-2017/rip …
Apr 12, 2018
fa8fb59
timeout action and drive straight update to use config
Apr 12, 2018
a6ec4b2
more parameters and fixes
Apr 12, 2018
4004940
Merge remote-tracking branch 'origin/navigation/localization' into ro…
robobenklein Apr 12, 2018
c788f68
Servo only has Detach now
robobenklein Apr 12, 2018
5279da3
WIP Trying to fix actions
robobenklein Apr 12, 2018
731237a
TimeoutAction still not working properly...
robobenklein Apr 12, 2018
b27e477
Cherry revert TimeoutAction changes
robobenklein Apr 13, 2018
cc350eb
Merge branch 'appendages/servo/dev' into robo/integration-41
robobenklein Apr 13, 2018
5a215cf
Update serial
robobenklein Apr 13, 2018
90e974c
Merge remote-tracking branch 'origin/cmd_messenger/unit_tests' into r…
robobenklein Apr 13, 2018
e033062
Merge branch 'robo/integration-40' into robo/integration-41
robobenklein Apr 13, 2018
9807045
Added navX appendage
argvrutter Apr 13, 2018
ae479e4
Merge conflict resolve, upstream is behind
argvrutter Apr 13, 2018
3f94a54
Merge branch 'appendages/servo/dev' of github.com:utk-robotics-2017/r…
argvrutter Apr 13, 2018
0965d74
Overrode MockDevice open to do nothing
Apr 13, 2018
baf88d0
Fixes units::now() for timeoutaction
robobenklein Apr 13, 2018
32e28a2
Change parallel action to teardown individually
robobenklein Apr 13, 2018
93a8bd0
Merge branch 'appendages/navx' of github.com:utk-robotics-2017/rip in…
Apr 14, 2018
fd2f4f5
fixed more of navx and ir
Apr 14, 2018
27678ac
Merge remote-tracking branch 'origin/navigation/localization' into ro…
robobenklein Apr 14, 2018
5888b38
lower navx internal timeout
jptech Apr 14, 2018
0010ea9
Merge branch 'navigation/localization' of github.com:utk-robotics-201…
jptech Apr 14, 2018
de0b1d5
turn to angle & turn by angle are separate actions with shared code b…
jptech Apr 14, 2018
358890b
change config units in turn to angle to in/s, in/s^2, deg, etc.
jptech Apr 14, 2018
4dbb064
config to real units
Apr 14, 2018
cd9d7f8
Merge branch 'navigation/parker' of github.com:utk-robotics-2017/rip …
Apr 14, 2018
75f8384
Merge branch 'navigation/localization' of github.com:utk-robotics-201…
jptech Apr 14, 2018
032bf7a
fixed
Apr 14, 2018
71dbf3b
fixes to loop action
Apr 15, 2018
9bc7c53
Merge branch 'navigation/localization' of github.com:utk-robotics-201…
jptech Apr 15, 2018
8975a4f
minor upgrade of drive straight to use average of encoders & to have …
jptech Apr 15, 2018
a97f635
robot
Apr 15, 2018
8cc5fa0
Merge branch 'navigation/parker' of github.com:utk-robotics-2017/rip …
Apr 15, 2018
7cef9ce
added bno055 and ripped navx out
Apr 16, 2018
4b42a05
fixed xml
Apr 16, 2018
028fa80
corrected bno055 bugs
Apr 17, 2018
1e8b598
bno055 updates
Apr 17, 2018
90cbca2
appendages
Apr 17, 2018
344d7cc
fixed continuous
Apr 18, 2018
7992fec
drive straight pid
jptech Apr 18, 2018
29dee42
another fix
jptech Apr 18, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ Thumbs.db
*.pyc

build/
build_armhf/
doc/
.idea/
cmake-build-debug/
Expand Down
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@ endif()
# to correctly compile the codebase despite this line being in the
# downstream CMake files.
set (CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color=always")

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-psabi")

option(GCC_DIAG_COLORS "Enable GCC Diagnostic Colors" ON)
if (GCC_DIAG_COLORS)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color=always")
endif()

LIST(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeModules)

Expand Down
4 changes: 2 additions & 2 deletions appendages/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ project(appendages)
file(GLOB_RECURSE ${PROJECT_NAME}_SOURCES "src/*.cpp")
file(GLOB_RECURSE ${PROJECT_NAME}_HEADERS "include/*.hpp")

add_library(${PROJECT_NAME} EXCLUDE_FROM_ALL ${${PROJECT_NAME}_SOURCES} ${${PROJECT_NAME}_HEADERS})
add_library(${PROJECT_NAME} STATIC EXCLUDE_FROM_ALL ${${PROJECT_NAME}_SOURCES} ${${PROJECT_NAME}_HEADERS})
set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11)
target_link_libraries(${PROJECT_NAME}
fmt json spdlog cppfs
cmd_messenger misc)
cmd_messenger units misc motor_controllers pid)
target_include_directories(${PROJECT_NAME} PUBLIC include)

set_property(GLOBAL PROPERTY AppendageRoot ${CMAKE_CURRENT_SOURCE_DIR})
Expand Down
61 changes: 61 additions & 0 deletions appendages/include/appendages/bno055.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#ifndef BNO055_HPP
#define BNO055_HPP

#include <appendages/appendage.hpp>
#include <pid/pid_input.hpp>

namespace rip
{
namespace appendages
{
class Bno055 : public Appendage, public pid::PidInput
{
public:

units::Angle getYaw();
units::Angle getPitch();
units::Angle getRoll();
bool isCalibrated();

double get() override;

void stop() override;

bool diagnostic() override;

protected:
friend class AppendageFactory;

/**
* Function wrapper for the constructor so it can be pointed to
*
* @param config The config from arduino gen
* @param command_map A map of the name of the commands to their enumerations
* @param device The connection to the device
*/
static std::shared_ptr<Appendage> create(const nlohmann::json& config, const std::map<std::string, int>& command_map, std::shared_ptr<cmdmessenger::Device> device);

private:
/**
* Constructor
*
* @param config The config from arduino gen
* @param command_map A map of the name of the commands to their enumerations
* @param device The connection to the device
*/
Bno055(const nlohmann::json& config, const std::map<std::string, int>& command_map, std::shared_ptr<cmdmessenger::Device> device);

std::shared_ptr<cmdmessenger::Command> m_yaw;
std::shared_ptr<cmdmessenger::Command> m_yaw_result;
std::shared_ptr<cmdmessenger::Command> m_pitch;
std::shared_ptr<cmdmessenger::Command> m_pitch_result;
std::shared_ptr<cmdmessenger::Command> m_roll;
std::shared_ptr<cmdmessenger::Command> m_roll_result;
std::shared_ptr<cmdmessenger::Command> m_calibrated;
std::shared_ptr<cmdmessenger::Command> m_caribrated_result;

};
}
}

#endif //BNO055_HPP
10 changes: 6 additions & 4 deletions appendages/include/appendages/exceptions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* \$$ $$ | $$ | $$ \$$\ | $$ | $$| $$ \| $$
* \$$$$$$ \$$ \$$ \$$ \$$ \$$ \$$$$$$ \$$
*/
#ifndef EXCEPTIONS_HPP
#define EXCEPTIONS_HPP
#ifndef APPENDAGES_EXCEPTIONS_HPP
#define APPENDAGES_EXCEPTIONS_HPP
#include <misc/exception_base.hpp>

namespace rip
Expand All @@ -28,7 +28,9 @@ namespace rip
NEW_EX(CommandNotFound)
NEW_EX(AppendageWithoutType)
NEW_EX(AppendageWithoutLabel)
NEW_EX(AppendageWithId)
NEW_EX(AppendageWithoutId)
NEW_EX(AppendageMissingField)
NEW_EX(AppendageNotImplemented)
}
}
#endif // EXCEPTIONS_HPP
#endif // APPENDAGES_EXCEPTIONS_HPP
67 changes: 67 additions & 0 deletions appendages/include/appendages/ir_2018.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
#ifndef IR_2018_HPP
#define IR_2018_HPP

#include <memory>
#include <map>
#include <string>


#include <cmd_messenger/command.hpp>

#include "appendages/appendage.hpp"
#include "appendages/appendage_factory.hpp"

#include <json.hpp>

namespace rip
{
namespace appendages
{
class Ir2018 : public Appendage
{
public:
/**
* Reads the ir receiver for the 2018 challenge
* @returns Whether A, B, and C are right or left
*/
std::array<bool, 5> read();

bool calibrate();

/**
* Stop
*/
virtual void stop() override;

virtual bool diagnostic() override;

protected:
friend class AppendageFactory;

/**
* Function wrapper for the constructor so it can be pointed to
*
* @param config The config from arduino gen
* @param command_map A map of the name of the commands to their enumerations
* @param device The connection to the device
*/
static std::shared_ptr<Appendage> create(const nlohmann::json& config, const std::map<std::string, int>& command_map, std::shared_ptr<cmdmessenger::Device> device);

private:
/**
* Constructor
*
* @param config The config from arduino gen
* @param command_map A map of the name of the commands to their enumerations
* @param device The connection to the device
*/
Ir2018(const nlohmann::json& config, const std::map<std::string, int>& command_map, std::shared_ptr<cmdmessenger::Device> device);

std::shared_ptr<cmdmessenger::Command> m_read;
std::shared_ptr<cmdmessenger::Command> m_read_result;
std::shared_ptr<cmdmessenger::Command> m_calibrate;
std::shared_ptr<cmdmessenger::Command> m_calibrate_result;
};
}
}
#endif // IR_2018_HPP
84 changes: 84 additions & 0 deletions appendages/include/appendages/navx.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
#ifndef NAVX_APPENDAGE_HPP
#define NAVX_APPENDAGE_HPP

#include <tuple>
#include <misc/logger.hpp>
#include <fmt/format.h>
#include <cmd_messenger/command.hpp>
#include "appendages/appendage.hpp"
#include "appendages/appendage_factory.hpp"
#include <json.hpp>
#include <units/units.hpp>

namespace rip
{
namespace appendages
{
class NavX : public Appendage
{
public:
/**
* @brief returns yaw
* @return float
*/
units::Angle getYaw();
/**
* @brief reports the pitch of the device
* @return float
*/
units::Angle getPitch();
/**
* @brief reports the roll of the device
* @return float
*/
units::Angle getRoll();
/**
* @brief gets the status of the device.
* @return code representing status of device
*/
char getStatus();
/**
* Stop! ^0^
*/
virtual void stop() override;

virtual bool diagnostic() override;

protected:
friend class AppendageFactory;
/**
* Function wrapper for the constructor so it can be pointed to
*
* @param config The config from arduino gen
* @param command_map A map of the name of the commands to their enumerations
* @param device The connection to the device
*/
static std::shared_ptr<Appendage> create(const nlohmann::json& config, const std::map<std::string, int>& command_map, std::shared_ptr<cmdmessenger::Device> device);

private:
/**
* Constructor
*
* @param config The config from arduino gen
* @param command_map A map of the name of the commands to their enumerations
* @param device The connection to the device
*/
NavX(const nlohmann::json& config, const std::map<std::string, int>& command_map, std::shared_ptr<cmdmessenger::Device> device);

std::shared_ptr<cmdmessenger::Command> m_get_yaw;
std::shared_ptr<cmdmessenger::Command> m_get_yaw_result;

std::shared_ptr<cmdmessenger::Command> m_get_pitch;
std::shared_ptr<cmdmessenger::Command> m_get_pitch_result;

std::shared_ptr<cmdmessenger::Command> m_get_roll;
std::shared_ptr<cmdmessenger::Command> m_get_roll_result;

std::shared_ptr<cmdmessenger::Command> m_get_status;
std::shared_ptr<cmdmessenger::Command> m_get_status_result;

};
}
}

#endif // NAVX_APPENDAGE_HPP
Loading