Skip to content
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

tuck_arms_main.py doesn't work properly #34

Open
sonyaa opened this issue Mar 25, 2015 · 11 comments
Open

tuck_arms_main.py doesn't work properly #34

sonyaa opened this issue Mar 25, 2015 · 11 comments

Comments

@sonyaa
Copy link

sonyaa commented Mar 25, 2015

This script is used by the tuck_arm app, and that app calls the main function of the script, assuming it will tuck the arms (https://github.com/PR2/pr2_apps/blob/hydro-devel/pr2_tuckarm/scripts/tuck_arms.py) - that's the way it was in Groovy. The most recent version of tuck_arms_main.py, however, only launches the server, and doesn't actually do anything. I'm not sure if this is a bug here or there, but I'm inclined to think here, because in Groovy it used to work, and the pr2_apps didn't change anything.

In short, tucking arms from the command line doesn't work in Hydro at all, which is frustrating - the only way to tuck arms is to write your own script.

@sonyaa
Copy link
Author

sonyaa commented Mar 25, 2015

Oh, there's actually a pull request for that already: #33

@UltronDestroyer
Copy link
Contributor

tuck_arms_main should work properly because this package is being generated from the hydro-devel-unstable repository, which has that code.

@sonyaa
Copy link
Author

sonyaa commented Mar 25, 2015

Are you sure? This seems to be the same: https://github.com/PR2/pr2_common_actions/blob/hydro-devel-unstable/pr2_tuck_arms_action/src/pr2_tuck_arms_action/tuck_arms_main.py
I understand that this is the server code, but its main() function is called by tuck_arms with the assumption that it will tuck the arms.

On the other hand, the pr2_tuck_arms_action/tuck_arms_main.py on my computer (installed from debs) contains only the client code, and not the server code... I can't actually find the server code anywhere.

@UltronDestroyer
Copy link
Contributor

I was able to get this to work properly, but it is a bit convoluted on how it does it now. I'm not sure why it was changed, I haven't read through the docs/history yet, but I'll take a look.

Here's the flow now:
rosrun pr2_tuck_arms_action tuck_arms_main.py
rosrun pr2_tuck_arms_action tuck_arms_test.py -l tuck

(you can use -l or -r to specify left or right, and tuck and untuck to do that)

@sonyaa
Copy link
Author

sonyaa commented Mar 25, 2015

That didn't work for me, I got the following error:

[rosrun] Couldn't find executable named tuck_arms_test.py below /opt/ros/hydro/share/pr2_tuck_arms_action
[rosrun] Found the following, but they're either not files,
[rosrun] or not executable:
[rosrun]   /opt/ros/hydro/share/pr2_tuck_arms_action/tuck_arms_test.py

I made it executable, but it still didn't work. Both tuck_arms_main.py and tuck_arms_test.py look exactly the same: http://pastebin.com/tUaLFzSB
Note that it's just the client, there's no server anywhere.

@sonyaa
Copy link
Author

sonyaa commented Mar 25, 2015

I just removed the pr2_tuck_arms_action package and installed it again (from the repository), and now there's just no tuck_arms_main.py file (probably someone added it manually).

@UltronDestroyer
Copy link
Contributor

Yikes. I'll see what's up.

@sonyaa
Copy link
Author

sonyaa commented Mar 25, 2015

The tuck_arms_main.py does exist, but only in the directory /opt/ros/hydro/lib/python2.7/dist-packages/pr2_tuck_arms_action, but when I try to "rosrun pr2_tuck_arms_action tuck_arms_main.py", it says "[rosrun] Couldn't find executable named tuck_arms_main.py below /opt/ros/hydro/share/pr2_tuck_arms_action".

Sorry, I don't really know how ros manages paths, so maybe I'm doing something wrong here...

@UltronDestroyer
Copy link
Contributor

I've installed tuck_arms_main.py into the Hydro and Indigo builds and re-released them. For the mean time, you can use the script by locating it on your directory and executing it directly with python. When the new debs have been built and released to public, this will be fixed. However, you can still use currently by doing this:

cd /opt/ros/indigo/lib/python2.7/dist-packages/pr2_tuck_arms_action/
python tuck_arms_main.py
osrun pr2_tuck_arms_action tuck_arms_test.py -l tuck

Sorry for the confusion.

@sonyaa
Copy link
Author

sonyaa commented Mar 26, 2015

Thank you!!

How long does it usually take for debs to be updated?

@UltronDestroyer
Copy link
Contributor

Quite a while for them to be released into public. You might want to ask on the ros-users-release mailing list. (Est 1-2 wks)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants