-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from odriverobotics/ros-control
Initial ros2_control integration
- Loading branch information
Showing
44 changed files
with
2,551 additions
and
84 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
--- | ||
BasedOnStyle: Google | ||
IndentWidth: '4' | ||
ColumnLimit: '120' | ||
|
||
IncludeCategories: | ||
# main include automatically assigned to Priority 0 | ||
- Regex: '^".*_(conf|config)\.(hpp|h)"$' # config headers | ||
Priority: 3 | ||
- Regex: '^".*"$' # sibling & project headers | ||
Priority: 1 | ||
- Regex: '^<.*>$' # system & library headers | ||
Priority: 2 | ||
|
||
# Format function arguments and parameters | ||
BinPackArguments: 'false' | ||
BinPackParameters: 'false' | ||
AllowAllArgumentsOnNextLine: 'false' | ||
AllowAllParametersOfDeclarationOnNextLine: 'false' | ||
AlignAfterOpenBracket: BlockIndent | ||
SpaceBeforeParens: ControlStatements | ||
|
||
# Constructor Formatting | ||
PackConstructorInitializers: CurrentLine | ||
IndentAccessModifiers: 'false' | ||
AccessModifierOffset: '-4' | ||
SpaceBeforeCtorInitializerColon: 'true' | ||
BreakConstructorInitializers: BeforeColon | ||
LambdaBodyIndentation: OuterScope | ||
|
||
AllowShortCaseLabelsOnASingleLine: 'true' | ||
AllowShortBlocksOnASingleLine: 'false' | ||
AllowShortIfStatementsOnASingleLine: Never | ||
AllowShortLoopsOnASingleLine: 'false' | ||
AllowShortEnumsOnASingleLine: 'true' | ||
AllowShortFunctionsOnASingleLine: 'Inline' | ||
AllowShortLambdasOnASingleLine: 'All' | ||
|
||
# Switch / Case | ||
IndentCaseLabels: 'true' | ||
IndentCaseBlocks: 'false' | ||
|
||
# Preprocessor stuff | ||
AlignConsecutiveMacros: 'true' | ||
AlignEscapedNewlines: Right | ||
AlignTrailingComments: 'false' | ||
SpacesBeforeTrailingComments: 1 | ||
|
||
# Alignment of procedural code | ||
AlignConsecutiveAssignments: 'false' | ||
AlignConsecutiveDeclarations: 'false' | ||
AlignConsecutiveBitFields: Consecutive | ||
|
||
AlignOperands: AlignAfterOperator | ||
# BreakBeforeTernaryOperators: 'false' | ||
BreakBeforeBinaryOperators: 'true' | ||
|
||
# Pointers and East/West Const | ||
DerivePointerAlignment: 'false' | ||
PointerAlignment: Left | ||
QualifierAlignment: Leave | ||
# QualifierOrder: ['volatile', 'constexpr', 'static', 'inline', 'type', 'const'] | ||
|
||
Cpp11BracedListStyle: 'true' | ||
|
||
# Vertical Whitespace | ||
SeparateDefinitionBlocks: Leave | ||
EmptyLineBeforeAccessModifier: Always | ||
EmptyLineAfterAccessModifier: Never | ||
|
||
# AlignArrayOfStructures: Right | ||
# InsertTrailingCommas: 'Wrapped' | ||
|
||
|
||
AlwaysBreakAfterReturnType: None | ||
PenaltyReturnTypeOnItsOwnLine: 9999 # We really hate breaking after return types | ||
PenaltyBreakAssignment: 999 # Prefer not to break around = | ||
|
||
FixNamespaceComments: 'true' | ||
# NamespaceIndentation: All | ||
... |
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,30 @@ | ||
FROM ros:iron-ros-base | ||
|
||
# Add vscode user with same UID and GID as your host system | ||
# (copied from https://code.visualstudio.com/remote/advancedcontainers/add-nonroot-user#_creating-a-nonroot-user) | ||
ARG USERNAME=vscode | ||
ARG USER_UID=1000 | ||
ARG USER_GID=$USER_UID | ||
RUN groupadd --gid $USER_GID $USERNAME \ | ||
&& useradd -s /bin/bash --uid $USER_UID --gid $USER_GID -m $USERNAME \ | ||
&& apt-get update \ | ||
&& apt-get install -y sudo \ | ||
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \ | ||
&& chmod 0440 /etc/sudoers.d/$USERNAME | ||
# Switch from root to user | ||
USER $USERNAME | ||
|
||
# Add user to video group to allow access to webcam | ||
RUN sudo usermod --append --groups video $USERNAME | ||
|
||
# Update all packages | ||
RUN sudo apt update && sudo apt upgrade -y | ||
|
||
# Install Git | ||
RUN sudo apt install -y git | ||
|
||
# Rosdep update | ||
RUN rosdep update | ||
|
||
# Source the ROS setup file | ||
RUN echo "source /opt/ros/${ROS_DISTRO}/setup.bash" >> ~/.bashrc |
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,19 @@ | ||
{ | ||
"name": "iron-remote", | ||
"dockerFile": "Dockerfile", | ||
"runArgs": [ | ||
"--privileged", | ||
"--network=host" | ||
], | ||
"workspaceMount": "source=/home/pi/odrive_can,target=/${localWorkspaceFolderBasename},type=bind,consistency=cached", | ||
"workspaceFolder": "/${localWorkspaceFolderBasename}", | ||
"mounts": [], | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"ms-vscode.cpptools", | ||
"eamodio.gitlens" | ||
] | ||
} | ||
} | ||
} |
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
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 |
---|---|---|
|
@@ -3,3 +3,6 @@ | |
/build/ | ||
/install/ | ||
/log/ | ||
|
||
# Python | ||
__pycache__/ |
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 @@ | ||
{ | ||
"configurations": [ | ||
{ | ||
"name": "Linux", | ||
"includePath": [ | ||
"${workspaceFolder}/**", | ||
"/opt/ros/iron/include/hardware_interface", | ||
"/opt/ros/iron/include/rcpputils" | ||
], | ||
"defines": [], | ||
"compilerPath": "/usr/bin/gcc", | ||
"cStandard": "c17", | ||
"cppStandard": "gnu++17", | ||
"intelliSenseMode": "linux-gcc-arm64" | ||
} | ||
], | ||
"version": 4 | ||
} |
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,3 @@ | ||
{ | ||
"C_Cpp.autoAddFileAssociations": false, | ||
} |
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,22 @@ | ||
{ | ||
// See https://go.microsoft.com/fwlink/?LinkId=733558 | ||
// for the documentation about the tasks.json format | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "build", | ||
"type": "shell", | ||
"command": "colcon build --symlink-install", | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
}, | ||
"presentation": { | ||
"clear": true | ||
}, | ||
"problemMatcher": [ | ||
"$gcc" | ||
], | ||
}, | ||
] | ||
} |
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
Oops, something went wrong.