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

How to choose move_group("arm") and move_group("arm_with_torso")? #71

Open
mptangtang opened this issue Aug 5, 2019 · 2 comments
Open

Comments

@mptangtang
Copy link

Following the tutorial , it is easy to move the torso of fetch using move_group("arm_with_torso") in joint space.

However, if I firstly would like to raise the torso to some prefer height then fix the torso to control the arm only. What should I do? I have tried two move_groups.

When using move_group("arm"), the torso would move back to zero immediately after the move_group.execute(plan) instructions.

If move_group("arm_with_torso") is used, if I set the goal pose to the move_group, then the fetch arm will move with torso joint.

What should I do in this situation?

Best wishes!

@erelson
Copy link
Collaborator

erelson commented Aug 5, 2019

If I understand your intention correctly, it sounds like a workable approach would be to always use the arm_with_torso controller: (1) to raise the torso, first get the arm join positions and then set those positions so the arm is "locked"; (2) then lock the torso at the height it reaches, while you move the arm during the rest of the experiment.

This incomplete snippet I grabbed should give an idea how we get the arm positions in a test where we don't want the arm moving:

            arm_torso_state_msg = get_joint_state_msg()  # /joint_states topic
            # Create list of joints (which actually/still exist)
            self._armjoints = [joint for joint in ARM_JOINTS if joint in
                      arm_torso_state_msg.name]
            # Create list of current joint positions
            self._joint_positions = \
                    [arm_torso_state_msg.position[
                             arm_torso_state_msg.name.index(joint)]
                     for joint in self._armjoints]

It does sound odd that the torso moves back to an old position when doing move_group("arm")... FYI @moriarty

@mptangtang
Copy link
Author

mptangtang commented Aug 6, 2019 via email

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