Conversation
cmower
left a comment
There was a problem hiding this comment.
Please change all cases of move_it2 and replace with moveit2.
|
|
||
| def moveit_translator(self, ros_msg, ros_channel, ros_type, ark_channel, ark_type): | ||
| """Convert joint state positions into Ark command.""" | ||
| msg = ark_type() |
There was a problem hiding this comment.
what is ark_type? At this point, these are supposed to be known, so no need to be generic - can just use the name can't we?
There was a problem hiding this comment.
unless it conflicts with another variable, then i think should be changed to be more explicit and easier for the reader to understand the code
|
@sarthakdas - please make sure to address above comments asap, once the tutorial is done let me know and i will approve/merge |
|
This last commit re types is wrong, the type for ark_msg is not joint_group_command_t. And as I mentioned the variable names should align with what they are, and mot be generic. Also ros_msg variable names should be updated and be given the correct type hint |
|
The callback parameters need to remain generic so they can handle all potential callbacks. Different callbacks may use different message channel names and types, as defined in the ROS2 bridge implementation. This follows the same layout we use for subscriber callbacks in Ark, where each callback receives (t, channel_name, msg). If the parameter names in this function were changed, it would break compatibility with the ROS2 bridge, since we rely on functools.partial to dynamically generate these callbacks. Without this, the feature would no longer function as intended. The current function signature is: |
The base implementation of movie 2 with ark.