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

Port MTC to ROS2 #170

Merged
merged 8 commits into from
Nov 26, 2021
Merged

Port MTC to ROS2 #170

merged 8 commits into from
Nov 26, 2021

Conversation

JafarAbdi
Copy link
Contributor

@JafarAbdi JafarAbdi commented Jun 3, 2020

This shouldn't be against master branch

Initial effort for porting MTC to ROS2, next step is to port rviz_marker_tools after that continue porting mtc core and its tests

@JafarAbdi JafarAbdi changed the title [WIPPort MTC to ROS2 [WIP]: Port MTC to ROS2 Jun 3, 2020
@JafarAbdi
Copy link
Contributor Author

I opened the PR to see if someone else is interested in helping me porting the package

@v4hn v4hn changed the base branch from master to ros2 June 11, 2020 08:18
@v4hn v4hn closed this Jun 11, 2020
@v4hn
Copy link
Contributor

v4hn commented Jun 11, 2020

Sorry, I apparently managed to break this pull-request...

fixed

@JafarAbdi
Copy link
Contributor Author

https://github.com/ros-planning/moveit_task_constructor/tree/ros2 need to be fast-forwarded to the main branch

@JafarAbdi
Copy link
Contributor Author

@rhaschke Could you please fast-forward https://github.com/ros-planning/moveit_task_constructor/tree/ros2 to the current master branch .?

@rhaschke
Copy link
Contributor

I forwarded ros2 to master, but this PR still lists many past commits...

@JafarAbdi
Copy link
Contributor Author

I forwarded ros2 to master, but this PR still lists many past commits...

Thanks! I'll fix it now

@codecov
Copy link

codecov bot commented Dec 25, 2020

Codecov Report

Merging #170 (71a604c) into ros2 (ed45970) will decrease coverage by 13.93%.
The diff coverage is 19.91%.

Impacted file tree graph

@@             Coverage Diff             @@
##             ros2     #170       +/-   ##
===========================================
- Coverage   52.99%   39.07%   -13.92%     
===========================================
  Files         102       78       -24     
  Lines        7598     7332      -266     
===========================================
- Hits         4026     2864     -1162     
- Misses       3572     4468      +896     
Impacted Files Coverage Δ
...oveit/task_constructor/solvers/planner_interface.h 100.00% <ø> (ø)
...nclude/moveit/task_constructor/stages/compute_ik.h 0.00% <0.00%> (-66.66%) ⬇️
...it/task_constructor/stages/modify_planning_scene.h 90.00% <ø> (-1.66%) ⬇️
...ude/moveit/task_constructor/stages/move_relative.h 0.00% <0.00%> (-100.00%) ⬇️
...lude/moveit/task_constructor/stages/simple_grasp.h 0.00% <0.00%> (ø)
core/include/moveit/task_constructor/storage.h 93.68% <ø> (-1.67%) ⬇️
core/include/moveit/task_constructor/task.h 33.34% <ø> (ø)
core/src/marker_tools.cpp 0.00% <0.00%> (-70.45%) ⬇️
core/src/solvers/cartesian_path.cpp 0.00% <0.00%> (-83.78%) ⬇️
core/src/solvers/joint_interpolation.cpp 87.76% <0.00%> (ø)
... and 143 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ed45970...71a604c. Read the comment docs.

@JafarAbdi JafarAbdi changed the base branch from ros2 to master December 25, 2020 11:36
@JafarAbdi JafarAbdi changed the base branch from master to ros2 December 25, 2020 11:37
capabilities/CMakeLists.txt Outdated Show resolved Hide resolved
demo/package.xml Outdated Show resolved Hide resolved
demo/package.xml Outdated Show resolved Hide resolved
@@ -108,16 +108,8 @@ Task createTask() {
t.add(std::move(stage));
}

{ // move gripper into predefined open state
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed these lines since we don't have a controller for the gripper, yet

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you comment this and add a TODO instead?

@JafarAbdi JafarAbdi changed the title [WIP]: Port MTC to ROS2 Port MTC to ROS2 Jan 5, 2021
@@ -64,34 +64,74 @@ std::string getTaskId(const TaskPrivate* task) {
}
} // namespace

/**
* A shared executor between all tasks' introspection, this class will keep track of the number of the added nodes and
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This executor is only really used for the service, right? What's the implication of simply reusing the same node and just appending the private task namespace to the all topics? I'm pretty sure your approach works as expected, I'm just not sure if it's really necessary.

core/package.xml Outdated Show resolved Hide resolved
core/src/introspection.cpp Outdated Show resolved Hide resolved
get_solution_service_ =
nh_.advertiseService(std::string(GET_SOLUTION_SERVICE "_") + task_id_, &Introspection::getSolution, self);
task_statistics_publisher_ = node_->create_publisher<moveit_task_constructor_msgs::msg::TaskStatistics>(
STATISTICS_TOPIC, rclcpp::QoS(1).transient_local());
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This's how to do latching in ROS2 see

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool! Could you add a short note for this?

core/test/models.cpp Outdated Show resolved Hide resolved
core/test/models.h Outdated Show resolved Hide resolved
@v4hn
Copy link
Contributor

v4hn commented Aug 17, 2021

ping on merging this...

since I fast-forwarded the ros2 branch this PR has a lot of conflicts that need to be resolved first.

@JafarAbdi
Copy link
Contributor Author

I rebased on the latest ros2 branch, the previous branch is available here

The current branch only work with rolling due to some changes in RViz which are only available there

I'll clean the history tomorrow and force push again

@v4hn
Copy link
Contributor

v4hn commented Sep 2, 2021 via email

@JafarAbdi
Copy link
Contributor Author

The current branch only work with rolling due to some changes in RViz which are only available there
Is that sufficient for you? I guess it's possible to ifdef both alternatives to get it to run at least on galactic?

That's possible I'll fix it today

Copy link
Member

@henningkayser henningkayser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's really about time to get this merged. @JafarAbdi do you mind squashing some of the commits? Or do you prefer a squash-merge?

@@ -58,20 +59,25 @@ class PipelinePlanner : public PlannerInterface
struct Specification
{
moveit::core::RobotModelConstPtr model;
std::string ns{ "move_group" };
std::string ns{ "ompl" };
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @JafarAbdi , I'm currently combining MTC with the Pilz_industrial_motion_planner pipeline in ROS2 and stumbled across this line. Is there a reason for switching from "move_group" to "ompl" at this place?

@davetcoleman
Copy link
Member

@JafarAbdi we really gotta merge this!

@JafarAbdi
Copy link
Contributor Author

I rebased on the latest master and cleanup the commit history, if anyone wants to use the previous branch it's still available here https://github.com/JafarAbdi/moveit_task_constructor/tree/old-ros2-5bce69d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants