-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updating c++ code with dynamixel motor support
- Loading branch information
1 parent
05d5343
commit 24733e8
Showing
21 changed files
with
1,100 additions
and
174 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
cc_library( | ||
name = "math_lib", | ||
hdrs = [ | ||
"pid.h", | ||
], | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
cc_library( | ||
name = "vector_lib", | ||
hdrs = [ | ||
"vector_math.h", | ||
], | ||
visibility = ["//visibility:public"], | ||
deps = [ | ||
"@eigen", | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
struct PIDGain { | ||
float kP; | ||
float kI; | ||
float kD; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#include <Eigen/Eigen> | ||
|
||
struct Location { | ||
Eigen::Vector2d position; | ||
Eigen::Rotation2Df rotation; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
cc_library( | ||
name = "generic_motor_lib", | ||
hdrs = [ | ||
"motor.h", | ||
], | ||
deps = [ | ||
"//src/math:math_lib", | ||
"//src/math:vector_lib", | ||
"@eigen", | ||
], | ||
) | ||
|
||
cc_library( | ||
name = "dynamixel_motor_lib", | ||
srcs = [ | ||
"dynamixel_motor.cpp", | ||
], | ||
hdrs = [ | ||
"dynamixel_motor.h", | ||
], | ||
deps = [ | ||
":generic_motor_lib", | ||
"//src/math:math_lib", | ||
"@eigen", | ||
], | ||
) | ||
|
||
cc_test( | ||
name = "dynamixel_motor_test", | ||
size = "small", | ||
srcs = [ | ||
"dynamixel_motor_test.cpp", | ||
], | ||
deps = [ | ||
":dynamixel_motor_lib", | ||
"@eigen", | ||
"@googletest//:gtest_main", | ||
], | ||
) | ||
|
||
cc_library( | ||
name = "mock_motor_lib", | ||
srcs = [ | ||
"mock_motor.cpp", | ||
], | ||
hdrs = [ | ||
"mock_motor.h", | ||
], | ||
deps = [ | ||
":generic_motor_lib", | ||
"//src/math:math_lib", | ||
"@eigen", | ||
], | ||
) | ||
|
||
cc_test( | ||
name = "mock_motor_test", | ||
size = "small", | ||
srcs = [ | ||
"mock_motor_test.cpp", | ||
], | ||
deps = [ | ||
":mock_motor_lib", | ||
"@eigen", | ||
"@googletest//:gtest_main", | ||
], | ||
) |
Oops, something went wrong.