JenniferBuehler / grasp-execution-pkgs

Package(s) to execute a grasp incl. execution in Gazebo
BSD 3-Clause "New" or "Revised" License
34 stars 18 forks source link

Possible to add multiple arms? #12

Closed AbhinavGupta1694 closed 5 years ago

AbhinavGupta1694 commented 5 years ago

Hi, I have a requirement to add 2 arms in the gazebo with the exact implementation as mentioned in "Grasping with Jaco in Gazebo", could you please help me to know if I shall simulate this with multiple arms?

Thanks in advance

JenniferBuehler commented 5 years ago

Hello, the gazebo plugin has been used with multiple arms, see this issue. Maybe try to get this set up with your robots first, it will require you to do the set up for multiple robots. Then you can gradually exetend your setup to include the grasp services here.

As long as the robots don't use the same /tf transform names it should be OK, otherwise you'll have to work with tf prefixes.

You will then have to set up grasp servers per robot, and have them in different node namespaces. The service requests have to be sent per robot in the according namespace then.

I currently am very flat out and will have little time to help you try this out, but if you have any specific questions while you're about to do it, feel free to ask here :)

AbhinavGupta1694 commented 5 years ago

Hi Jennifer,

Please note that I tried to add two arms in the jaco_on_table.urdf.xacro file jaco_on_table urdf xacro along with some modifications.

But this ended up throwing an error "[ERROR] [1542881553.390495773]: link 'jaco_0_baseA' is not unique."

There might have been dependent code, that requires modification.

Kindly help to understand if there is anyway out to simulate (movement of two arms) two arms

Thanks

AbhinavGupta1694 commented 5 years ago

Hi Jennifer,

I have been trying to get the controllers on two arms "jaco_on_table_two_arms_gazebo.launch" launch file.

I am able to add the controllers successfully, but the issue is that I am not able to control both the arms together.

Actually have namespace issue, we are passing the namespace in xacro file i.e.

<xacro:arg name="trajectory_param_namespace" default="jaco"/>

Hence one arm is launching with controls that is "jaco".

Could you please help me with these namespaces ? How can I get both the arms loaded with controls.

Hope to get your reply.

Thanks in advance.

JenniferBuehler commented 5 years ago

Hi,

sorry that I am not finding any time to help with your issue at the moment. I did control both arms with the launch file, not sure why it is not working for you,, I'll have to check on this again. I was hoping that I get around to tend to my github repos over the Christmas break.

Both arms need to have their own namespace. What problem are you getting with the controls?

AbhinavGupta1694 commented 5 years ago

Hello Jennifer, Thanks for the reply.

Yes, we have different namespace for both the arms. Not sure how to pass both together in the launch file, as of now I am able to pass only one namespace at a time and only able to control one at a time.

Help me with having both the arms controlled with single launch file.

Thanks in advance

JenniferBuehler commented 5 years ago

Could you share your launch file please? Have you modified jaco_on_table_two_arms_gazebo.launch? It will help if you post your modifications.

Am I right to guess that instead of jaco_on_table_gazebo.launch you load jaco_on_table_gazebo_controlled.launch here in jaco_on_table_two_arms_gazebo.launch?

Yes in this case you will need your namespaces robot_components_namespace etc set accordingly here in jaco_on_table_robot_gazebo_ctrl.urdf.xacro. This is loaded here in jaco_on_table_gazebo_controlled.launch.

The namespace parameters still have to be added to jaco_on_table_robot_gazebo_ctrl.urdf.xacro, that hasn't been done yet, so I see what your issue could be. To achieve this, the xacro code will need to be within a xacro macro instead of all directly within <robot>. That will take a bit of re-arranging. Perhaps the easiest quickfix for this until I get around to do it properly will be to copy the following lines in jaco_on_table_robot_gazebo_ctrl.urdf.xacro:

<xacro:unless value="$(arg use_ros_control)">
        <xacro:include filename="$(find jaco_gazebo)/urdf/gzplugin_joint_control.urdf.xacro"/>
        <xacro:gzplugin_joint_control robot_components_namespace="$(arg robot_components_namespace)"
                                  trajectory_param_namespace="$(arg trajectory_param_namespace)"/>
</xacro:unless>

paste a copy of this right underneath the existing same lines. Then take out the namespaces given as $(arg... and just replace this directly by your namespace names. Let me know if that works, or if I've made any wrong assumptions about your set-up.

JenniferBuehler commented 5 years ago

Any progress on this? If you don't need assistance on this any more, please close the issue. Thank you :)