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

Rename ServoServer to ServoNode #649

Merged
merged 1 commit into from
Oct 4, 2021

Conversation

tylerjw
Copy link
Member

@tylerjw tylerjw commented Aug 30, 2021

Description

Until we figure out how we want to change the API to prevent this sort of bug this makes servo error much nicer in the constructor of ServoCalcs.

This also includes a fix for a clang-tidy error I hadn't seen before. I wonder if our clang-tidy changed since the last time someone made a code change to servo.

Updated tutorials: moveit/moveit2_tutorials#109

Checklist

  • Required by CI: Code is auto formatted using clang-format
  • While waiting for someone to review your request, please help review another open pull request to support the maintainers
  • Make PR to update tutorials.
  • Migration note

@codecov
Copy link

codecov bot commented Aug 31, 2021

Codecov Report

Merging #649 (9de7fdc) into main (bf39dca) will not change coverage.
The diff coverage is 81.82%.

❗ Current head 9de7fdc differs from pull request most recent head 3bf38cb. Consider uploading reports for the commit 3bf38cb to get more accurate results
Impacted file tree graph

@@           Coverage Diff           @@
##             main     #649   +/-   ##
=======================================
  Coverage   54.18%   54.18%           
=======================================
  Files         192      192           
  Lines       20187    20187           
=======================================
  Hits        10936    10936           
  Misses       9251     9251           
Impacted Files Coverage Δ
moveit_ros/moveit_servo/src/servo_node.cpp 78.95% <81.82%> (ø)

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 bf39dca...3bf38cb. Read the comment docs.

@@ -49,8 +49,8 @@

// We'll just set up parameters here
const std::string JOY_TOPIC = "/joy";
const std::string TWIST_TOPIC = "/servo_server/delta_twist_cmds";
const std::string JOINT_TOPIC = "/servo_server/delta_joint_cmds";
const std::string TWIST_TOPIC = "/servo_component/delta_twist_cmds";
Copy link
Member

Choose a reason for hiding this comment

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

Should we just use the /servo/* namespace?

Copy link
Member Author

Choose a reason for hiding this comment

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

agree that probably makes sense or /moveit_servo ?

Copy link
Member

Choose a reason for hiding this comment

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

👍 to /servo/*

@@ -45,10 +45,10 @@

namespace moveit_servo
{
class ServoServer : public rclcpp::Node
class ServoComponent : public rclcpp::Node
Copy link
Member

Choose a reason for hiding this comment

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

What are the implications of calling this class Component? Isn't it a node? So ServoNode makes most sense to me, which in turn can be a component node (exported, no class/file needed) or a node executable ServoNodeExecutable.

Copy link
Member

@AndyZe AndyZe Aug 31, 2021

Choose a reason for hiding this comment

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

Changes here should be reviewed along with #621 (Add standalone executable for Servo server node). In fact, maybe this PR should be closed and we just make all of the naming changes as a separate commit in that PR.

I think ServoNodeComponent (class name) and servo_component_node.cpp make good sense for this class / file.

The executable that Joe added in #621 could be called ServoMain or ServoStandaloneNode. It just instantiates this class in main.

Copy link
Contributor

Choose a reason for hiding this comment

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

+1 to ServoNode. In my mind we create a node and then allow launching it in a component container.

@tylerjw
Copy link
Member Author

tylerjw commented Sep 17, 2021

I renamed servo_component to servo_node and servo_server_node to servo_node_main.

@henningkayser henningkayser moved this from In Progress to Review in progress in Galactic/Rolling - 2.3.0 - September 10 Sep 21, 2021
@henningkayser
Copy link
Member

henningkayser commented Sep 30, 2021

@tylerjw one thing before merging. Could you provide deprecated headers and typedefs for the old API? Basically like this, only from the original headers not like I did back then.

@tylerjw tylerjw changed the title Rename ServoServer to ServerComponent Rename ServoServer to ServoNode Oct 1, 2021
@tylerjw
Copy link
Member Author

tylerjw commented Oct 3, 2021

@AndyZe I believe this is ready for review. I included a deprecated header so existing code should continue to build and produce a warning. There is no way for me to deprecate the change in the name for the binaries (the component node plugin) so launch files that depend on the old ServoServer node name will stop working after this.

Copy link
Member

@AndyZe AndyZe left a comment

Choose a reason for hiding this comment

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

A bit of text still needs to be replaced. Approved assuming that happens.

moveit_ros/moveit_servo/launch/servo_example.launch.py:            #     name="servo_server",
moveit_ros/moveit_servo/launch/servo_example.launch.py:        executable="servo_server_node",

@tylerjw tylerjw merged commit 69b59b9 into moveit:main Oct 4, 2021
Galactic/Rolling - 2.3.0 - September 10 automation moved this from Review in progress to Done Oct 4, 2021
@tylerjw tylerjw deleted the servo_component_rename branch October 4, 2021 18:02
@AndyZe
Copy link
Member

AndyZe commented Oct 13, 2021

It looks like this PR along with some of the other recent changes (e.g. launch file shuffling) have broken the Servo tutorial. I'd like to put the brakes on more large Servo changes until the tutorial gets fixed.

@tylerjw
Copy link
Member Author

tylerjw commented Oct 13, 2021

It looks like this PR along with some of the other recent changes (e.g. launch file shuffling) have broken the Servo tutorial. I'd like to put the brakes on more large Servo changes until the tutorial gets fixed.

The tutorial on the website or the tutorial in the main branch of the tutorial repo? The website has changed to track a new foxy branch. That website is based on a foxy install of moveit.

@AndyZe
Copy link
Member

AndyZe commented Oct 13, 2021

main branch, built from source

@tylerjw
Copy link
Member Author

tylerjw commented Oct 13, 2021

The internet is that eventually, we'll have different versions of the tutorials for each version of ros/moveit but for now we want the tutorial website to be as beginner-friendly and as stable as possible. Long term we will have multiple branches of the tutorial website deploy to different versions of the website, but until then we changed the website to only deploy from the foxy branch of moveit2_tutorials and be focused on beginners who install moveit from the foxy release.

For the main branch (of the tutorials and moveit), to use that you'll need to build it locally (including the website) to even access it and we do need a process for making sure it is working before putting it on the web which we will do at some point before Humble.

@tylerjw
Copy link
Member Author

tylerjw commented Oct 13, 2021

This tutorial: http://moveit2_tutorials.picknik.ai/doc/realtime_servo/realtime_servo_tutorial.html

Does not work with source installs of moveit unless you are building the foxy version of moveit. Eventually, it'll be moved to a URL that looks like this:

moveit2_tutorials.foxy.picknik.ai

and the main branch will be deployed to:

moveit2_tutorials.rolling.picknik.ai

@tylerjw
Copy link
Member Author

tylerjw commented Oct 13, 2021

We do need to include a migration guide from foxy eventually also for all the major changes to things like servo from foxy.

@AndyZe
Copy link
Member

AndyZe commented Oct 13, 2021

Yep, the plan for the tutorials makes sense. We should try to keep the main tutorials branch up to date with Rolling, though. Partly my fault for approving this PR without testing it.

@tylerjw
Copy link
Member Author

tylerjw commented Oct 13, 2021

Yep, the plan for the tutorials makes sense. We should try to keep the main tutorials branch up to date with Rolling, though. Partly my fault for approving this PR without testing it.

I can make the PR to update the rolling tutorials. We do need to create a migration guide to include with the Humble release of tutorials to make it easy for people to migrate from Foxy to Humble.

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

Successfully merging this pull request may close these issues.

None yet

5 participants