-
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
Issue27 configure link #84
base: indigo-devel
Are you sure you want to change the base?
Issue27 configure link #84
Conversation
…ete existing link and add new link named base/tool0. May need to set some condition such as setDisable(true) for visual, collision, inertia
Thanks for the PR. Could you please remove all the Qt Creator files? They don't need to be committed to the repository. Specifically, these files should be removed:
You can use |
Delete qt creator files. Also, added configuration for TCP (issue28). |
thanks for deleting the files.
I'd preferred it if you'd submitted a separate PR for #28, but let's keep it like this for now. |
Sorry, I’ll do that next time. Thanks!
|
@kazoo-kmt: I've checked your implementation again. Could I ask you to revert 53c8271 (or at least the changes to Some additional comments: TCP frames aren't necessarily always called |
// Firstly remove the link, then add new link named "tool0" | ||
// on_propertyWidget_linkNameChanged(ltree_to_link_property_[sel].get(), "tool0"); | ||
link_names_.removeOne(sel->text(0)); | ||
link_root_->removeChild(sel); |
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.
Would this leak the QTreeItemWidget
?
This reverts commit 53c8271.
I reverted the commit 53c8271. |
Thank you for other comments too. In order to change from "deleting and making a new link" to "just modifying", I need you advice again. Are there any classes that I can use to change the link's property? |
@kazoo-kmt wrote:
I think you now also reverted the changes to the Qt creator files. Could you remove those again?
I think you'll want to look at Perhaps #97 can help here. It should make adding/removing links much easier. |
@gavanderhoorn deleted qtcreator files. I still need to make changes for dangling links based on your advice. Will do later. |
@gavanderhoorn I pulled the latest one and found there were a lot of changes. But I couldn't find where "tool0" or "TCP" were written in the file, even though I could see these menus when I opened urdf_builder. Do you know where are they? Sorry for a very simple question. |
From the terminal, try "grep -r 'tool0' *"
|
@AndyZelenak Thank you. I tried, but it only shows the list of urdf files... |
@kazoo-kmt: I'm not quite sure what it is you are asking. There are no references to |
Issue #27 basically asks for a way to convert an existing link into a link with no child tags (ie: an empty Your current implementation removes the link itself, which is different from conversion. In addition, it doesn't take care of attaching the replacement link to the tree (ie: there is no These things will need to be fixed before we can merge. |
@gavanderhoorn After "git pull" recent changes, Do I need to build again in order to use the latest CAD-to-ROS software? |
Yes. |
@kazoo-kmt: we have our deadline coming up tomorrow. Do you think you can correct the outstanding issues by then? |
@gavanderhoorn Will try. I need to understand the structure of the program again because there are a lot of changes.. |
You'll probably want to base your work on #97, as that is what the infrastructure for adding/removing/changing links will look like in the application once it's merged. |
@gavanderhoorn see. When will it be merged? Also, in order to change the link name, I'm trying to use "on_propertyWidget_linkNameChanged(LinkProperty_,QVariant))". For LinkProperty_, I can use "ltree_to_link_property_[sel].get()", but for QVariant, I cannot use the string such as "tool0". How can I convert a string to QVariant? Or, is this wrong to use "on_propertyWidget_linkNameChanged" in the first place? |
@kazoo-kmt wrote:
the planning is later today. But you don't need to wait for that: you can just check it out and branch of it in your workspace and work from that.
No, that is not really the idea. Qt slots are essentially event handlers, that get called whenever the corresponding signal is To change the name of a link, it should be sufficient to assign a new name to the link (via its An alternative might be to get So |
Thank you for your comment. I couldn't fetch & checkout Levi's branch, so will continue on the current file. |
in your clone: git remote add larmstrong https://github.com/Levi-Armstrong/CAD-to-ROS.git
git fetch larmstrong
# make a local branch to work on issue 27
git checkout -b base_tool0_links larmstrong/restructure At this point you will work in a branch called If you push that to your github fork, it will include Levi's work as well, so it will make merging it easier as well. But if your changes are localised enough (ie: only in a few files), then continuing as you are now will probably also work. |
Thank you very much. I tried to make remote, but it returns "fatal: unable to access 'https://github.com/Levi-Armstrong/CAD-to-ROS.git/'”. Will find the answer. Kazu Komoto
|
On 05/14/2016 08:57 PM, kazoo-kmt wrote:
ah, yes. I keep forgetting. My apologies: you cannot access Levi's remote, only repository owners can in the current setup. No problem: just try to work with |
Thank you very much. I gave up to use the following branch and continue to develop on the original one. I believe my change is not many, so easy to change later. Inside // 1. Access name property and change name
QString new_name = "tool0"
QString orig_name = sel->text(0);
int idx = link_names_.indexOf(orig_name);
link_names_.replace(idx, new_name);
sel->setText(0, new_name);
// 2. Emit the corresponding response
const QVariant val;
emit LinkProperty::linkNameChanged(activeLink.get(), &val);
// 3. Access other properties and delete them
// 4. Emit the corresponding response After step 2, I got errors like the following:
|
I don't think it's necessary to update You might just have to change the re: removing current properties: see here for an example. Note that you'll have to patch up the relevant urdf model objects as well. |
Oh, did you mean I need to change the name in the property browser and no need to change the name on widget tree? |
Please forget the previous comment. As you suggested before, now I wrote
in urdf_property.cpp. Then, I wrote setLinkName function.
It can change the name in link property. I'm still confused how to use Sorry for many questions. I really appreciate your help. |
@kazoo-kmt, Thank you for your help. Do you mind re-basing using m1_merge_candidate_v2? If I did not answer all of your question below let me know.
The method below just calls a signal which does not perform any operation. If you are intending to set the value, use the name_item_->setValue(new_name). You should not need to emit a signal this will be handled by the property widget when using the setValue.
One other thing for consistency please us QString in place of std::string. QString provides the ability to convert to standard string if need. This will also solve the QVariant question since QString can be passed as a QVariant without any additional work. |
@Levi-Armstrong Thank you very much. Don't I need permission to rebase m1_merge_candidate_v2? In the past, I tried to fetch and merge m1_merge_candidate_v1, but it didn't work. |
@kazoo-kmt wrote:
Levi asks you to rebase your own work (so |
@gavanderhoorn @Levi-Armstrong Thank you very much. Just rebased and sent a new pull request. |
Add configuration from link to base/tool0. The logic is simply to delete existing link and add new link named base/tool0. May need to set some condition such as setDisable(true) for visual, collision, inertia