-
Notifications
You must be signed in to change notification settings - Fork 195
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
Adds support for multi-groups on Motoman Robots #42
Conversation
@thiagodefreitas, Can you please point me to the launch file that brings up a dual arm system (I'd like to use |
@shaun-edwards: |
I tried the launch file you recommended, but it fails almost immediately. I don't have a controller connected, but I expected the nodes to just block until a connection was made (this is what happens in the released version). Could you try on you end just to verify I don't have the wrong configuration. Output
|
@shaun-edwards NEW VERSION FROM THE MOTOMAN DRIVER OLD VERSION FROM THE MOTOMAN DRIVER Could you please test? Works for me. |
Wasn't the point of @shaun-edwards post that starting the nodes without any controller immediately results in crashes? |
@gavanderhoorn: I have just pulled the latest version from ipa320/motoman and ipa320/industrial_core and ran without any controller attached: NEW VERSION FROM THE MOTOMAN DRIVER OLD VERSION FROM THE MOTOMAN DRIVER This does not crash for me, it hangs for both options. I wanted @shaun-edwards to check if it still happens for him. Then, I would need to take further investigations. |
@thiagodefreitas, both versions worked for me (I think will revisit launch structure later, but good for now). Looking at the graph, I have a few questions:
|
The assumption that they capture everything is correct. e.g. /joint_path_command is for commanding all the joints. And /dynamic_feedback_states is a message that contains the information from all the groups connected to the controller. I could add some sort of configuration from the yaml, that would be no problem. For the use case that we had here, this was necessary, but I agree with you that it would be better to have this configurable somehow.
As for question 1, dynamic_feedback_states is the feedback state for all the control groups at once, containing the group number and group specific info. Actually, it was provided as a possible feature, but we did not happen to use. /feedback_states as well as /feedback_states uses the existing ROS messages.
A JointTrajectory msg ends up being: Header header
string[] joint_names
float64[] positions
float64[] velocities
float64[] accelerations
float64[] effort
duration time_from_start A DynamicJointTrajectory imitates the REP definitions for the ROS-side. As it is actually(after expanding all sub-msgs): Header header
string[] joint_names
int16 num_groups
int16 group_number
int16 num_joints
int16 valid_fields
float64[] positions
float64[] velocities
float64[] accelerations
float64[] effort
duration time_from_start A point to be clear is that the *JOINT_TRAJ_PT_FULL_EX" is intended to be a subset of the REP - DynamicJointPoint. As you may see on new MotoPlus. Therefore we have the multi-groups support on the simple-message side also. I mean, we could have a scenario from where, some higher level package generates a classical JointTrajectoryAction and the client can perform the action for all the groups, making the aforementioned. We could have the same thing for the namespaced joint trajectory actions, what later came to the controllers.yaml from MoveIT! Or we could even directly command the intended group, when sending directly the message from a ROS nodenew messages and individual groups separately. This would be then a one-to-one mapping between the ROS message and the Simple message generated in compliance with the REP. |
With directly, you mean you can address them individually, using separate messages? Was this not possible with the existing support for multiple planning groups in moveit and suitable logic combining / coordinating the multiple trajectories in the new trajectory_relay node? I'd always understood rep-I0001 - Node Configuration as suggesting to exploit the moveit planning group support. A trajectory including all joints would automatically map onto synchronised motion for all involved groups. Trajectories including only the joints for a single planning group would result in motion for that group. Separate trajectories for different groups would result in non-synchronised motion of the relevant groups. I'm really just asking for the rationale here, which was also why I asked for the design document :). |
That's exactly how it works now. Including using the multiple planning groups from MoveIT!. The rationale is actually simple so that the client receives the "JointTrajectory msg" from MoveIT! or anywhere else , and according to the planning group attaches the controller group info then forwards it directly to the motoman driver where it is converted to a simple message(REP). The new messages could also be used so that you could from the ROS side program a trajectory that already contains the control groups information, that is mostly the main point for this approach, and one of the requirements. How this combination/coordination from the multiple trajectories is done, can lead to many variants. This is the approach that we have got after some internal discussions and after that first loop on the mailing-list. I can somehow variate it, but I need to wait after it reaches some sort of consensus on the Theme :) |
Right, ok.
So the Or we should change the contents of the REP.
Hm, I remember that we concluded that thread with "we'll report back to the list when we come up with something" .. |
That's right. Thanks for summarizing that :)
+1 on the aspect that the names confusion needs to be fixed. The DynamicJointPoint mentioned on the REP Simple Message section should be considered as MSG_TYPE JOINT_TRAJ_PT_FULL_EX and JOINT_FEEDBACK_EX a subset of DynamicJointState .
I have no fixed opinion on that, I mean if the REP should contain also those messages. As I see, there are 3 different aims on this pull request and on ros-industrial/industrial_core#82. The first to provide multi-groups support to the motoman robots. The second to provide the first version of some base infrastructure for the REP on the industrial_core level. And finally to make this MOTOMAN driver REP compatible. Where the first has definitely the highest priority for us. Although I have sent the PR, I am going to take the opportunity to make some comments :) Going on the REP-compatible path, there are some points that I have thought to be analysed:
To conclude, I see some variations that could make the driver with a completely MOTOMAN specific solution:
|
@@ -0,0 +1,417 @@ | |||
<?xml version="1.0" ?> |
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.
This URDF(xacro) is more complex than it has to be. It should really be a macro call for the base, and two calls to an arm macro (with different prefixes). This would also ensure that link/joint naming matches the current conventions as well.
Ok...this discussion really helped me understand what was going on. I'm going to try and summarize the current state of the discussion and capture the todo items. I expected this PR to look something like the REP, but after this discussion, I now understand that it does not.
The goal of ROS-Industrial is to remain vendor/platform agnostic. This can't occur if vendor specific requirements are included in the core. The proper place for this type of code is in the vendor repo. (Note: In order to perform a Hydro release of this capability, this was always going to happen. I do not feel comfortable releasing the proposed core changes in between ROS releases). As a result, this PR will have to be modified to address the following issues:
I think this capability is very important. I am very thankful for the contribution. Perhaps this approach will prove in the future to be more broadly applicable then it appears to be. If this occurs, then I will have no problem porting this functionality from the motoman packages to the core industrial packages. For now, I think this compromise allows for this cool capability to be used by others, while minimizing the potential impact to other platforms. |
I would appreciate some additional input on the legacy_mode issue. I thought of calling this "multi_groups", so that multi_groups=true would imply to use the new version, is that ok?
I need to do another test on the beginning of next week on the hardware. For that I am going to try to use it our current MoveIT! config and change it, so that I can add that to the pull request. |
Is there a way to not use the old ROS driver. Will the new client (PC side) work with either server (Controller side). I'm pretty sure this is not the case, but I thought I would ask. Perhaps we could trigger based on "version_0.x=true" or "version_1.x=true", assuming version 1 is the new version (we should match motoman's versioning. I do not like "multi_groups" since I believe this driver could be used with a single arm. FYI...I suggest that we wrap the "legacy" driver in a launch file with a "deprecated" warning, see here This would warn anybody launching the old driver that it will be removed. |
src/industrial_robot_client/joint_trajectory_action2.cpp) | ||
target_link_libraries(joint_trajectory_action2 | ||
industrial_robot_client ${catkin_LIBRARIES}) | ||
add_dependencies(joint_trajectory_action2 industrial_robot_client_gencpp) |
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.
I think this needs a dependency on motoman_msgs_..
now as well.
|
||
<!-- R --> | ||
<joint name="${prefix}joint_1" type="revolute"> | ||
<parent link="torso_link_b1"/> |
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.
missing ${prefix}
Some more general comments:
Some suggestions:
|
@shaun-edwards Going to proceed like this. Using the version number. @gavanderhoorn Thank you very much for all the comments and for the detailed inputs. Really appreciate that. I am going to try to address all of them carefully. |
ping @thiagodefreitas, where are we on this? I'd like to try these changes out on our SIA20D with the old driver installed to ensure backwards compatibility. I'll be doing this in the next couple of days using the existing PR (assuming none of the requested changes will alter how this is done). |
Intermediate step pull request to ros-i
Changes from legacy_mode to version 0
Forwarding to ros-i main
Removing default_warehouse_mongo_db
@shaun-edwards Tested on the sda10f.
|
A number of review comments have not been addressed, but also have not been moved to issues (assuming defaults, magic nrs, ambiguous logging statements). Are these planned to be addressed in the future? |
@thiagodefreitas, can you add any remaining items as issues (or comment inline why they aren't addressed. @gavanderhoorn, the PR was accepted in order to get ready for ROSCon. It also helped to get others to use the software and shake out the bugs (which some have been found). The release plan #47, does not officially release a hydro version (i.e. only available on the hydro-devel branch). We will address these issues and new ones before an indigo release. |
@shaun-edwards: I appreciate the pressure because of ROSCon, but testing the functionality could have just as easily been done using a branch from this PR. I agree that there are no releases planned for Hydro, but imho that doesn't mean we can just treat |
@shaun-edwards, @gavanderhoorn I have started commenting in-line,but most of the comments are not valid anymore for the current state. As the version0 aspect is going to be fixed by the release plan #47 I would therefore list the following issues:
FYI: We are no treating the hydro-devel as a free-for-all or experimental rep. This driver has run stably for months for our use cases here at IPA. And has also been tested by the manufacturer itself during on-site visit. And also, the older version is isolated as it was, to avoid causing problems for the current users of the source version. As Shaun mentioned, there is not going to be any released version for this new version on Hydro.
+1 on that. I do not see the issues as so critical, as that they would avoid the merge or avoid people start using the driver. As we can not address all the user cases here, I think the driver itself benefits much more if it has a wider community adoption and off course if bugs are found asap. Unfortunately, due to legal aspects we could not push the code "in pieces" during the project. I myself apologize for that, as I know that there are too many changes to be checked, what may have implied much of the confusion during the PR. But do not think that it made it easier for our side. |
@thiagodefreitas: from a software-quality perspective, the fact that it has been running "for [your] use cases" is obviously not very relevant. Code reviews are important exactly for cases that you did not consider, or did not come across. The fact that there are no unit-tests only increases the importance of reviews, imo. re: merging to get people to test it: how is testing from re: list of outstanding issues: I don't really care about the indentation. I don't have time to go through everything, but some items that should be appended to your list:
Please do not take this personal, I was merely trying to push back a bit against the "o we need this for roscon, so let's merge and we'll do things later". |
This pull-request adds support for multi-groups on the MOTOMAN ROS package.
This needs the latest version from motoman_driver from @ted-miller
This depends on:
ros-industrial/industrial_core#82