Repository navigation
[Servo] Refactoring servo - #2224
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #2224 +/- ##
==========================================
+ Coverage 50.50% 50.68% +0.18%
==========================================
Files 386 386
Lines 31736 31912 +176
==========================================
+ Hits 16026 16172 +146
- Misses 15710 15740 +30
☔ View full report in Codecov by Sentry. |
56fe805 to
da306b6
Compare
099607b to
e46b036
Compare
943191d to
045f6f7
Compare
48734de to
8fb94f9
Compare
sea-bass
left a comment
There was a problem hiding this comment.
Took a first pass through!
8d6de23 to
30142bd
Compare
There was a problem hiding this comment.
Tests looking nice! Took another look and have a few suggestions.
I guess one of my biggest questions on the tests is... given that we took care to make a standalone C++ API, is there no way to write unit tests that do not require standing up a ROS node? Like, see here for example for a way to get a robot model: https://github.com/PickNikRobotics/pick_ik/blob/main/tests/robot_tests.cpp#L97C1-L100
Not sure how one would load an IK plugin in the similar way. Maybe something like this? https://github.com/ros-planning/moveit2/blob/main/moveit_kinematics/test/test_kinematics_plugin.cpp#LL187C53-L187C53
The tests for the |
|
Looking at the most recent commit (24f907 Fix twist frame conversion), I have some questions. ^ I believe this only works if EE frame == command frame == ik_solver_->getTipFrame(). Are we OK with that? Can you think of any unusual use cases where that wouldn't work? I can think of one. Before, we talked about the case where somebody is using a VR hand controller to move the robot, like this video. If we go with this approach, the user would be necessary for transforming the twist before they publish it to Servo. Otherwise, it won't be correct. I guess that's OK, it just requires extra work from the user. I'd suggest searching the Servo codebase for "command frame" and "ee frame" --> replace with "ik tip frame" It will be confusing to have 3 different names for the same frame. |
|
Can you add a test where a twist command has the wrong frame and it gets rejected by Servo? |
Have added the rejection test for both twist and pose. |
7c66202 to
b60d078
Compare
Have to check what is happening in the CI, only the "leaving singularity" test fails for me locally, no segfaults. |
eaba892 to
f4fe2b0
Compare
8451b20 to
061fb69
Compare
|
|
||
| ## Stopping behaviour | ||
| incoming_command_timeout: 0.1 # Stop servoing if X seconds elapse without a new command | ||
| ee_frame: panda_link8 # The name of the end effector link, used to return the EE pose |
There was a problem hiding this comment.
I am still not sure why we had to change from panda_hand to panda_link8 -- what was this again?
|
Weird that just adding a comment broke clang-tidy again... maybe move the comment above the EDIT: Oh I see because the inline comment made it wrap into 2 lines. Went ahead and fixed it. |
|
Not sure if we need these https://github.com/ibrahiminfinite/moveit2/blob/eda31330572e27faf1e1cb4366cda3e6de843f7c/moveit_ros/moveit_servo/src/servo_node.cpp#L226 |
Sure, feel free to get rid of it -- or put it as a DEBUG? How about just publishing it while halting, but not after it's stopped? |
Description
This is an effort supported by GSoC 2023 to refactor the MoveIt Servo package to improve its usability and performance.
The primary focus is on implementing clearly seperated and performant C++ and ROS APIs to interact with Servo.
An effort has also been made to make the logic more readable.
The moveit_msgs PR moveit/moveit_msgs#161 must be merged before this can go in.
Please feel free to test it out and provide your feedback.
JontJog: Video, Code
Twist: Video, Code
Pose: Video, Code
Using the ROS APIs
To run the demo:
NOTE : The moveit_msgs package should be updated to https://github.com/ibrahiminfinite/moveit_msgs/tree/new_servo
Once the demo is running, the jointjog and twist inputs can be tried out using
demos/servo_keyboard_input.cppby running.The servo loop runs automatically on Servo instance creation.
Servo can be paused/ unpaused using the bool type service
/servo_node/pause_servo.There is no notion of start/stop in the current implementation.
Before sending any commands, you should set the command type for servo using the
/servo_node/switch_command_typeservice.0 - JointJog
1 - Twist
2 - Pose
So if you want to send pose command
And then you can send the specific type of commands to their respective topics:
Timings for C++ API calls:
JointJog ~ 100 us
Twist ~ 350 us
Pose ~ 350 us
TODO :