-
Notifications
You must be signed in to change notification settings - Fork 9
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
Added TF publisher to display joint origins #70
Conversation
An update: I've been testing this over the weekend, and there are two issues with the current approach:
|
I'll add some additional comments in-line. |
@@ -23,6 +25,7 @@ set(editor_HDRS | |||
include/urdf_editor/link_property.h | |||
include/urdf_editor/urdf_property.h | |||
include/urdf_editor/my_rviz.h | |||
include/urdf_editor/urdf_transforms.h |
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.
Afaict, urdf_transforms.h
doesn't use anything from Qt, right? The editor_HDRS
variable is only used to list headers that need to be put through the moc-ing process when building.
It can probably be removed.
Screenshot illustrating the issue reported by @pbeeson (this is after loading the PR2 and then clicking |
@akgoins can you look at this issue? |
these lines could potentially help with the Fixed Frame. They're from the MoveIt Setup Assistant which has a similar requirement. |
@gavanderhoorn, I think I have fixed the two remaining issues. I am now getting the root link of the model to set as the manager fixed link and I am publishing timestamps with the transforms which makes them disappear when they are no longer published. For some reason there is still a base_link transform which remains, but I don't know why that is the case since there are no frames being published. If it is still a concern, then I vote that we open an issue for it and address it later as I think that it is a very minor issue. |
@gavanderhoorn, conflicts resolved. Please review and merge. |
//#include <urdf_parser/urdf_parser.h> | ||
//#include "urdf_editor/joint_property.h" | ||
//#include "urdf_editor/link_property.h" | ||
#include "urdf_editor/urdf_transforms.h" |
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.
Please remove commented lines if they are no longer needed.
@gavanderhoorn, I noticed that some of the links being loaded do not have the origin property added to them. Without this, the TF link information does not get loaded properly. I have added a warning statement to show this. Here are the results. I don't know where the file is being parsed, but the problem is that the joints are passed to the addJointProperty function before they have had an origin property added to them. |
@akgoins wrote:
ok, but apart from the warning, does this change anything (ie: correctness of tf tree fi)? |
@akgoins wrote:
The raw urdf is parsed here, but it is actually delegated to the
As a test I've disabled the norm checking in the Note the difference with the previous screenshot. |
@akgoins what do you think of pr70_rebased and the unguarded |
As to the issues with the PR2 model: I'm leaning towards merging your PR and ticketing the issues with the PR2 TF tree to be fixed later. All other models in |
@gavanderhoorn wrote:
I am unable to see your fork or any branches on it. When I click on the link provided, It does not take me to your repo. Probably a permissions issue. I have not had time to look at addressing your other comments but should be able to work on it tomorrow. |
Well if you mean the link in my previous comment (this link), that was not meant to take you to a repository, but to the comment before that. Apart from that though, my fork is probably not accessible for you, even with the correct link. I'll push it to this repository. |
Just pushed |
@gavanderhoorn wrote:
Just an additional data point: a quick test with akgoins/tf_publisher and the Baxter model in |
@gavanderhoorn, I have made some changes to my own branch here. This fixes the issue with some of the TF frames not showing up. I tried it with the Baxter and everything looks fine. The problem with the frames not showing up correctly for the PR2 has to do with the joint limits. If the joint limits are (-N,N), then the robot is visualized with the joint at 0. If the joint limit is (0,N) or (-N, 0), then the robot is visualized with the joint set to midscale. This can be seen by running So, the question is, do we use joint_state and robot_state to publish TF frames or do we use our own representation? Can robot_state publisher handle what we want to do with it or is it best for us to switch to something else now? |
Nice, thanks.
Ah, that makes sense, yes.
The problem with Without things like ros/robot_model#124, I don't think we can use any of the existing infrastructure, which is why I wrote #25. Your PR is essentially a mini version of ros/robot_model#124. A custom version of |
I think we can merge this PR as it is right now: the additional issues can be dealt with at a later time. The only thing I think must be added (but later) is a toolbar button / menu item that allows to (dis|en)able the display of the TF frames. That is a UI / usability issue, and I think we can ticket that for later work. |
+1 |
I've pushed an additional commit to pr70_rebased (diff here), which takes care of some I also still have issues when not disabling |
@gavanderhoorn, see commit 912ffb3 for the fixes to the TF frames. |
@akgoins wrote:
Yeah, as far as I can tell, ad8f301 should be the rebased version of that in |
Yes, you are correct. |
Just did a fresh build of |
@gavanderhoorn, I found the problem with the denso model loading. For some reason, if the urdf does not include an origin property, the quaternion (x,y,z,w) gets set to all zeros, which is an invalid rotation. I have added some checks for NaN's and zero rotations and pushed the changes to |
I've just pushed a Milestone 1 merge candidate that includes this PR, see m1_merge_candidate (diff here). It contains all changes proposed in this PR (plus some additional ones), so once |
Closing, as these changes have been merged into m1_merge_candidate_v2. |
Thanks for the contribution @akgoins 👍. |
Rebased and combined all commits from #59 per request and added in change from #67 as discussed in today's meeting. This is the only "clean" way that I found to do a rebase without affecting the previous commits. If this is acceptable, then #59 and #67 can be removed after merging this pull request.