-
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
base: development
Are you sure you want to change the base?
Changes from all commits
f9e689a
b67691e
950855d
f2103ab
5f8a950
2c0c6a5
206c68c
b9152fa
27fca76
351dc0b
131bb20
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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 |
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(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What happened to the destructor? Don't you need to destroy the services anymore? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The services will get destroyed automatically when the shared_ptrs stored in this class get destroyed. Previously the destructor was here to shut down the executor thread, which wasn't even used since we spin the node in the main thread now, so I removed it. |
||
|
||
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; | ||
}; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Which configuration of Please add the configuration file to the repository to ensure every developer uses the same one. I suggest using the same one as in other projects within this namespace. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I added a configuration file I found in the RAI repository and reformated the files again. |
This file was deleted.
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> | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any particular reason for c++20?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::numbers::pi is the reason. Before C++20, no standard constant for π was defined.