-
Notifications
You must be signed in to change notification settings - Fork 0
Refactor the robotic manipulation package #11
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
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
f9e689a
Run clang-format on all files
knicked b67691e
Add license note in every source file
knicked 950855d
Fill package.xml with description and license information
knicked f2103ab
Rename the StateController class to RaiManipulationInterfaceNode
knicked 5f8a950
Split initialization and spinning code
knicked 2c0c6a5
Replace magic values with constants
knicked 206c68c
Rename variables for style consistency
knicked b9152fa
Remove base position magic value
knicked 27fca76
Move constants into the class header
knicked 351dc0b
Replace const with constexpr
knicked 131bb20
Add clang-format from RAI
knicked File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 @@ | ||
Language: Cpp | ||
BasedOnStyle: Google | ||
|
||
AccessModifierOffset: -2 | ||
AlignAfterOpenBracket: AlwaysBreak | ||
BraceWrapping: | ||
AfterClass: true | ||
AfterFunction: true | ||
AfterNamespace: true | ||
AfterStruct: true | ||
AfterEnum: true | ||
BreakBeforeBraces: Custom | ||
ColumnLimit: 100 | ||
ConstructorInitializerIndentWidth: 0 | ||
ContinuationIndentWidth: 2 | ||
DerivePointerAlignment: false | ||
PointerAlignment: Middle | ||
ReflowComments: false |
This file contains hidden or 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 hidden or 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
39 changes: 39 additions & 0 deletions
39
...s/src/robotic_manipulation/include/robotic_manipulation/rai_manipulation_interface_node.h
This file contains hidden or 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,39 @@ | ||
/* Copyright (C) 2025 Robotec.AI | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include <std_srvs/srv/trigger.hpp> | ||
|
||
#include "rai_interfaces/srv/manipulator_move_to.hpp" | ||
#include "robotic_manipulation/arm_controller.h" | ||
|
||
class RaiManipulationInterfaceNode | ||
{ | ||
public: | ||
RaiManipulationInterfaceNode(); | ||
jhanca-robotecai marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
void Initialize(ArmController & arm); | ||
void Spin(); | ||
|
||
private: | ||
rclcpp::Node::SharedPtr m_node; | ||
rclcpp::Service<rai_interfaces::srv::ManipulatorMoveTo>::SharedPtr m_moveToService; | ||
rclcpp::Service<std_srvs::srv::Trigger>::SharedPtr m_resetService; | ||
|
||
rclcpp::executors::SingleThreadedExecutor m_executor; | ||
|
||
std::vector<double> m_startingPose; | ||
}; | ||
jhanca-robotecai marked this conversation as resolved.
Show resolved
Hide resolved
|
17 changes: 0 additions & 17 deletions
17
ros2_ws/src/robotic_manipulation/include/robotic_manipulation/state_controller.h
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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,9 +3,9 @@ | |
<package format="3"> | ||
<name>robotic_manipulation</name> | ||
<version>0.0.0</version> | ||
<description>TODO: Package description</description> | ||
<description>A package providing services for robotic manipulation using RAI.</description> | ||
<maintainer email="[email protected]">kdabrowski</maintainer> | ||
<license>TODO: License declaration</license> | ||
<license>Apache 2.0</license> | ||
|
||
<buildtool_depend>ament_cmake</buildtool_depend> | ||
|
||
|
This file contains hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.