nested robot tags in XML

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

nested robot tags in XML

baxelrod

I am trying to write the xml files for a two armed humanoid robot, but am running into difficulties. 

 

The arms are identical, however there are two links that need to be rotated by 180 degrees.  (the joints are continuous rotation, and the robot will be calibrated with the joints rotated 180 degrees).  So using the same arm.xml file and having the joints offset by 180 degrees won’t work.

 

This is the closest thing to working I’ve got:

 

<Robot name="Prototype_Robot" >

 

  <KinBody file="base.xml" />

 

  <KinBody file="torso.xml" prefix="torso_" >

   

    <!-- re-define transform for link1 to be relative to base -->

    <Body name="torso_link1" type="dynamic" >

      <translation>0 0 0.75</translation>

      <offsetfrom>base</offsetfrom>

    </Body>

 

    <!-- fix bodies together -->

    <Joint enable="false" name="fixed_base_to_link1" >

      <limitsdeg>0 0</limitsdeg>

      <Body>base</Body>

      <Body>torso_link1</Body>

    </Joint>

  </KinBody>

 

  

  <Robot prefix="right_" file="arm.xml" >

    <KinBody name="right_arm" >

   

      <!-- re-define transform to be relative to torso -->     

      <Body name="right_link1" type="dynamic" >

        <offsetfrom>torso_chest</offsetfrom>

        <translation>0 0.025 0.31</translation>

        <RotationAxis>0 0 1 180</RotationAxis>

      </Body>

     

      <!-- fix bodies together -->     

      <Joint enable="false" name="fixed_right_arm_to_chest" >

        <limitsdeg>0 0</limitsdeg>

        <Body>right_link1</Body>

        <Body>torso_chest</Body>

        <offsetfrom>torso_chest</offsetfrom>

      </Joint>

    </KinBody>   

  </Robot>

 

  <Robot prefix="left_" file="arm.xml" >

    <KinBody name="left_arm" >

   

      <!-- re-define transform to be relative to torso -->     

      <Body name="left_link1" type="dynamic" >

        <offsetfrom>torso_chest</offsetfrom>

        <translation>0 -0.025 0.31</translation>

      </Body>

 

      <!-- re-define transform for left arm link4 -->     

      <!-- doesn’t work -->     

      <Body name="left_link4" type="dynamic" >

        <RotationMat>0 0 1 0 -1 0 1 0 0</RotationMat>

        <Translation>-0.050 -0.291 0.038</Translation>

      </Body>

     

      <!-- re-define transform for left arm link6 -->     

      <!-- doesn’t work -->     

      <Body name="left_link6" type="dynamic" >

        <RotationMat>1 0 0 0 -1 0 0 0 -1</RotationMat>

      </Body>

     

      <!-- fix bodies together -->     

      <Joint enable="false" name="fixed_left_arm_to_chest" >

        <limitsdeg>0 0</limitsdeg>

        <Body>left_link1</Body>

        <Body>torso_chest</Body>

        <offsetfrom>torso_chest</offsetfrom>

      </Joint>

    </KinBody>   

  </Robot>

  

</Robot>

 

 

Note that “arm.xml” defines KinBody “arm” that has Bodies “link1”, “link4”, and “link6” under it.

 

Re-defining the transform for arms’ link1 works fine.  However, the two other transform redefinitions for the left arm don’t work.  Any ideas why?

 

Thanks,

Ben

 

Ben Axelrod

Sr. Robotics Software Engineer

iRobot Corporation

8 Crosby Drive, M/S 8-1

Bedford, MA 01730

(781) 430-3315

[hidden email]

 


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: nested robot tags in XML

Rosen Diankov
Administrator
dear ben,

i think it's possible to do what you want. have you seen the dual arm example on the wiki?

http://openrave.programmingvision.com/wiki/index.php/Format:XML#Dual-arm_example

it does exactly that: append two identical arms at 180degrees from each other. the arms are stored as kinbodies, but i'm sure you can do the same as robots.
note how the example creates a <kinbody> with the rotation inside and then has another <kinbody file="arm"> to point to the arm.

hope this helps,


2015-03-26 3:05 GMT+09:00 Axelrod, Ben <[hidden email]>:

I am trying to write the xml files for a two armed humanoid robot, but am running into difficulties. 

 

The arms are identical, however there are two links that need to be rotated by 180 degrees.  (the joints are continuous rotation, and the robot will be calibrated with the joints rotated 180 degrees).  So using the same arm.xml file and having the joints offset by 180 degrees won’t work.

 

This is the closest thing to working I’ve got:

 

<Robot name="Prototype_Robot" >

 

  <KinBody file="base.xml" />

 

  <KinBody file="torso.xml" prefix="torso_" >

   

    <!-- re-define transform for link1 to be relative to base -->

    <Body name="torso_link1" type="dynamic" >

      <translation>0 0 0.75</translation>

      <offsetfrom>base</offsetfrom>

    </Body>

 

    <!-- fix bodies together -->

    <Joint enable="false" name="fixed_base_to_link1" >

      <limitsdeg>0 0</limitsdeg>

      <Body>base</Body>

      <Body>torso_link1</Body>

    </Joint>

  </KinBody>

 

  

  <Robot prefix="right_" file="arm.xml" >

    <KinBody name="right_arm" >

   

      <!-- re-define transform to be relative to torso -->     

      <Body name="right_link1" type="dynamic" >

        <offsetfrom>torso_chest</offsetfrom>

        <translation>0 0.025 0.31</translation>

        <RotationAxis>0 0 1 180</RotationAxis>

      </Body>

     

      <!-- fix bodies together -->     

      <Joint enable="false" name="fixed_right_arm_to_chest" >

        <limitsdeg>0 0</limitsdeg>

        <Body>right_link1</Body>

        <Body>torso_chest</Body>

        <offsetfrom>torso_chest</offsetfrom>

      </Joint>

    </KinBody>   

  </Robot>

 

  <Robot prefix="left_" file="arm.xml" >

    <KinBody name="left_arm" >

   

      <!-- re-define transform to be relative to torso -->     

      <Body name="left_link1" type="dynamic" >

        <offsetfrom>torso_chest</offsetfrom>

        <translation>0 -0.025 0.31</translation>

      </Body>

 

      <!-- re-define transform for left arm link4 -->     

      <!-- doesn’t work -->     

      <Body name="left_link4" type="dynamic" >

        <RotationMat>0 0 1 0 -1 0 1 0 0</RotationMat>

        <Translation>-0.050 -0.291 0.038</Translation>

      </Body>

     

      <!-- re-define transform for left arm link6 -->     

      <!-- doesn’t work -->     

      <Body name="left_link6" type="dynamic" >

        <RotationMat>1 0 0 0 -1 0 0 0 -1</RotationMat>

      </Body>

     

      <!-- fix bodies together -->     

      <Joint enable="false" name="fixed_left_arm_to_chest" >

        <limitsdeg>0 0</limitsdeg>

        <Body>left_link1</Body>

        <Body>torso_chest</Body>

        <offsetfrom>torso_chest</offsetfrom>

      </Joint>

    </KinBody>   

  </Robot>

  

</Robot>

 

 

Note that “arm.xml” defines KinBody “arm” that has Bodies “link1”, “link4”, and “link6” under it.

 

Re-defining the transform for arms’ link1 works fine.  However, the two other transform redefinitions for the left arm don’t work.  Any ideas why?

 

Thanks,

Ben

 

Ben Axelrod

Sr. Robotics Software Engineer

iRobot Corporation

8 Crosby Drive, M/S 8-1

Bedford, MA 01730

<a href="tel:%28781%29%20430-3315" value="+17814303315" target="_blank">(781) 430-3315

[hidden email]

 


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users



------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: nested robot tags in XML

baxelrod
Hi Rosen,

I should have mentioned in the original post that yes, i saw the dual arm example.  i wanted to keep the Robot type because it actually constructs the arm with the arm and end-effector.  it also contains a few manipulators and a bunch of Adjacent tags.  i didn't want to copy all that in.  however, i was looking through the provided robot xml files and it looks like a common practice to construct the entire robot as a kinbody in one file, then make a second file that simply wraps this in the Robot type and adds a manipulator.

just to clarify, i am able to rotate the second arm 180 degrees as in the dual arm example.  but what i am not able to do is to modify some of the links of the original arm.  this seems strange because i am able to modify the transform of the base link of the arm, but not of others links.

BTW, i am currently getting around this issue by having left_arm and right_arm xml files.  with the only difference between the two is some minor changes to two transforms.  this is not ideal, but works.

thanks,
Ben

Ben Axelrod

Sr. Robotics Software Engineer

iRobot Corporation

8 Crosby Drive, M/S 8-1

Bedford, MA 01730

(781) 430-3315

[hidden email]


From: [hidden email] [[hidden email]] on behalf of Rosen Diankov [[hidden email]]
Sent: Thursday, March 26, 2015 4:27 AM
To: Axelrod, Ben
Cc: [hidden email]
Subject: Re: [OpenRAVE-users] nested robot tags in XML

dear ben,

i think it's possible to do what you want. have you seen the dual arm example on the wiki?

http://openrave.programmingvision.com/wiki/index.php/Format:XML#Dual-arm_example

it does exactly that: append two identical arms at 180degrees from each other. the arms are stored as kinbodies, but i'm sure you can do the same as robots.
note how the example creates a <kinbody> with the rotation inside and then has another <kinbody file="arm"> to point to the arm.

hope this helps,


2015-03-26 3:05 GMT+09:00 Axelrod, Ben <[hidden email]>:

I am trying to write the xml files for a two armed humanoid robot, but am running into difficulties. 

 

The arms are identical, however there are two links that need to be rotated by 180 degrees.  (the joints are continuous rotation, and the robot will be calibrated with the joints rotated 180 degrees).  So using the same arm.xml file and having the joints offset by 180 degrees won’t work.

 

This is the closest thing to working I’ve got:

 

<Robot name="Prototype_Robot" >

 

  <KinBody file="base.xml" />

 

  <KinBody file="torso.xml" prefix="torso_" >

   

    <!-- re-define transform for link1 to be relative to base -->

    <Body name="torso_link1" type="dynamic" >

      <translation>0 0 0.75</translation>

      <offsetfrom>base</offsetfrom>

    </Body>

 

    <!-- fix bodies together -->

    <Joint enable="false" name="fixed_base_to_link1" >

      <limitsdeg>0 0</limitsdeg>

      <Body>base</Body>

      <Body>torso_link1</Body>

    </Joint>

  </KinBody>

 

  

  <Robot prefix="right_" file="arm.xml" >

    <KinBody name="right_arm" >

   

      <!-- re-define transform to be relative to torso -->     

      <Body name="right_link1" type="dynamic" >

        <offsetfrom>torso_chest</offsetfrom>

        <translation>0 0.025 0.31</translation>

        <RotationAxis>0 0 1 180</RotationAxis>

      </Body>

     

      <!-- fix bodies together -->     

      <Joint enable="false" name="fixed_right_arm_to_chest" >

        <limitsdeg>0 0</limitsdeg>

        <Body>right_link1</Body>

        <Body>torso_chest</Body>

        <offsetfrom>torso_chest</offsetfrom>

      </Joint>

    </KinBody>   

  </Robot>

 

  <Robot prefix="left_" file="arm.xml" >

    <KinBody name="left_arm" >

   

      <!-- re-define transform to be relative to torso -->     

      <Body name="left_link1" type="dynamic" >

        <offsetfrom>torso_chest</offsetfrom>

        <translation>0 -0.025 0.31</translation>

      </Body>

 

      <!-- re-define transform for left arm link4 -->     

      <!-- doesn’t work -->     

      <Body name="left_link4" type="dynamic" >

        <RotationMat>0 0 1 0 -1 0 1 0 0</RotationMat>

        <Translation>-0.050 -0.291 0.038</Translation>

      </Body>

     

      <!-- re-define transform for left arm link6 -->     

      <!-- doesn’t work -->     

      <Body name="left_link6" type="dynamic" >

        <RotationMat>1 0 0 0 -1 0 0 0 -1</RotationMat>

      </Body>

     

      <!-- fix bodies together -->     

      <Joint enable="false" name="fixed_left_arm_to_chest" >

        <limitsdeg>0 0</limitsdeg>

        <Body>left_link1</Body>

        <Body>torso_chest</Body>

        <offsetfrom>torso_chest</offsetfrom>

      </Joint>

    </KinBody>   

  </Robot>

  

</Robot>

 

 

Note that “arm.xml” defines KinBody “arm” that has Bodies “link1”, “link4”, and “link6” under it.

 

Re-defining the transform for arms’ link1 works fine.  However, the two other transform redefinitions for the left arm don’t work.  Any ideas why?

 

Thanks,

Ben

 

Ben Axelrod

Sr. Robotics Software Engineer

iRobot Corporation

8 Crosby Drive, M/S 8-1

Bedford, MA 01730

<a href="tel:%28781%29%20430-3315" value="&#43;17814303315" target="_blank">(781) 430-3315

[hidden email]

 


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users



------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: nested robot tags in XML

baxelrod

One more peculiarity is that one of my joints in the arm gets set to a random value as a result of adding it to the torso.  It is only one of the arms.  And I can then set the joint to 0 and it is fine.  But the fact that it gets added with this non-zero joint value, breaks some of my code that converts the xml to a urdf.

 

 

From: Axelrod, Ben [mailto:[hidden email]]
Sent: Thursday, March 26, 2015 8:55 AM
To: Rosen Diankov
Cc: [hidden email]
Subject: Re: [OpenRAVE-users] nested robot tags in XML

 

Hi Rosen,

I should have mentioned in the original post that yes, i saw the dual arm example.  i wanted to keep the Robot type because it actually constructs the arm with the arm and end-effector.  it also contains a few manipulators and a bunch of Adjacent tags.  i didn't want to copy all that in.  however, i was looking through the provided robot xml files and it looks like a common practice to construct the entire robot as a kinbody in one file, then make a second file that simply wraps this in the Robot type and adds a manipulator.

just to clarify, i am able to rotate the second arm 180 degrees as in the dual arm example.  but what i am not able to do is to modify some of the links of the original arm.  this seems strange because i am able to modify the transform of the base link of the arm, but not of others links.

BTW, i am currently getting around this issue by having left_arm and right_arm xml files.  with the only difference between the two is some minor changes to two transforms.  this is not ideal, but works.

thanks,
Ben

 

Ben Axelrod

Sr. Robotics Software Engineer

iRobot Corporation

8 Crosby Drive, M/S 8-1

Bedford, MA 01730

(781) 430-3315

[hidden email]


From: [hidden email] [[hidden email]] on behalf of Rosen Diankov [[hidden email]]
Sent: Thursday, March 26, 2015 4:27 AM
To: Axelrod, Ben
Cc: [hidden email]
Subject: Re: [OpenRAVE-users] nested robot tags in XML

dear ben,

i think it's possible to do what you want. have you seen the dual arm example on the wiki?

http://openrave.programmingvision.com/wiki/index.php/Format:XML#Dual-arm_example

it does exactly that: append two identical arms at 180degrees from each other. the arms are stored as kinbodies, but i'm sure you can do the same as robots.
note how the example creates a <kinbody> with the rotation inside and then has another <kinbody file="arm"> to point to the arm.

hope this helps,

 

2015-03-26 3:05 GMT+09:00 Axelrod, Ben <[hidden email]>:

I am trying to write the xml files for a two armed humanoid robot, but am running into difficulties. 

 

The arms are identical, however there are two links that need to be rotated by 180 degrees.  (the joints are continuous rotation, and the robot will be calibrated with the joints rotated 180 degrees).  So using the same arm.xml file and having the joints offset by 180 degrees won’t work.

 

This is the closest thing to working I’ve got:

 

<Robot name="Prototype_Robot" >

 

  <KinBody file="base.xml" />

 

  <KinBody file="torso.xml" prefix="torso_" >

   

    <!-- re-define transform for link1 to be relative to base -->

    <Body name="torso_link1" type="dynamic" >

      <translation>0 0 0.75</translation>

      <offsetfrom>base</offsetfrom>

    </Body>

 

    <!-- fix bodies together -->

    <Joint enable="false" name="fixed_base_to_link1" >

      <limitsdeg>0 0</limitsdeg>

      <Body>base</Body>

      <Body>torso_link1</Body>

    </Joint>

  </KinBody>

 

  

  <Robot prefix="right_" file="arm.xml" >

    <KinBody name="right_arm" >

   

      <!-- re-define transform to be relative to torso -->     

      <Body name="right_link1" type="dynamic" >

        <offsetfrom>torso_chest</offsetfrom>

        <translation>0 0.025 0.31</translation>

        <RotationAxis>0 0 1 180</RotationAxis>

      </Body>

     

      <!-- fix bodies together -->     

      <Joint enable="false" name="fixed_right_arm_to_chest" >

        <limitsdeg>0 0</limitsdeg>

        <Body>right_link1</Body>

        <Body>torso_chest</Body>

        <offsetfrom>torso_chest</offsetfrom>

      </Joint>

    </KinBody>   

  </Robot>

 

  <Robot prefix="left_" file="arm.xml" >

    <KinBody name="left_arm" >

   

      <!-- re-define transform to be relative to torso -->     

      <Body name="left_link1" type="dynamic" >

        <offsetfrom>torso_chest</offsetfrom>

        <translation>0 -0.025 0.31</translation>

      </Body>

 

      <!-- re-define transform for left arm link4 -->     

      <!-- doesn’t work -->     

      <Body name="left_link4" type="dynamic" >

        <RotationMat>0 0 1 0 -1 0 1 0 0</RotationMat>

        <Translation>-0.050 -0.291 0.038</Translation>

      </Body>

     

      <!-- re-define transform for left arm link6 -->     

      <!-- doesn’t work -->     

      <Body name="left_link6" type="dynamic" >

        <RotationMat>1 0 0 0 -1 0 0 0 -1</RotationMat>

      </Body>

     

      <!-- fix bodies together -->     

      <Joint enable="false" name="fixed_left_arm_to_chest" >

        <limitsdeg>0 0</limitsdeg>

        <Body>left_link1</Body>

        <Body>torso_chest</Body>

        <offsetfrom>torso_chest</offsetfrom>

      </Joint>

    </KinBody>   

  </Robot>

  

</Robot>

 

 

Note that “arm.xml” defines KinBody “arm” that has Bodies “link1”, “link4”, and “link6” under it.

 

Re-defining the transform for arms’ link1 works fine.  However, the two other transform redefinitions for the left arm don’t work.  Any ideas why?

 

Thanks,

Ben

 

Ben Axelrod

Sr. Robotics Software Engineer

iRobot Corporation

8 Crosby Drive, M/S 8-1

Bedford, MA 01730

<a href="tel:%28781%29%20430-3315" target="_blank">(781) 430-3315

[hidden email]

 


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users

 


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: nested robot tags in XML

Rosen Diankov
Administrator
hi ben,

what you are observing is because you do the rotation inside the <body> tag, which will effectively only rotate the manipulator. you have to add one more layer or <robot> to make sure all the links rotate.

As for the random values getting set, this is a known issue, but it is really easy to fix. In the top level <robot> tag, just add a <jointvalues>0 0 0 0 ...</jointvalues> entry that will set all the joint values to 0.

best,


2015-03-27 3:12 GMT+09:00 Axelrod, Ben <[hidden email]>:

One more peculiarity is that one of my joints in the arm gets set to a random value as a result of adding it to the torso.  It is only one of the arms.  And I can then set the joint to 0 and it is fine.  But the fact that it gets added with this non-zero joint value, breaks some of my code that converts the xml to a urdf.

 

 

From: Axelrod, Ben [mailto:[hidden email]]
Sent: Thursday, March 26, 2015 8:55 AM
To: Rosen Diankov


Cc: [hidden email]
Subject: Re: [OpenRAVE-users] nested robot tags in XML

 

Hi Rosen,

I should have mentioned in the original post that yes, i saw the dual arm example.  i wanted to keep the Robot type because it actually constructs the arm with the arm and end-effector.  it also contains a few manipulators and a bunch of Adjacent tags.  i didn't want to copy all that in.  however, i was looking through the provided robot xml files and it looks like a common practice to construct the entire robot as a kinbody in one file, then make a second file that simply wraps this in the Robot type and adds a manipulator.

just to clarify, i am able to rotate the second arm 180 degrees as in the dual arm example.  but what i am not able to do is to modify some of the links of the original arm.  this seems strange because i am able to modify the transform of the base link of the arm, but not of others links.

BTW, i am currently getting around this issue by having left_arm and right_arm xml files.  with the only difference between the two is some minor changes to two transforms.  this is not ideal, but works.

thanks,
Ben

 

Ben Axelrod

Sr. Robotics Software Engineer

iRobot Corporation

8 Crosby Drive, M/S 8-1

Bedford, MA 01730

<a href="tel:%28781%29%20430-3315" value="+17814303315" target="_blank">(781) 430-3315

[hidden email]


From: [hidden email] [[hidden email]] on behalf of Rosen Diankov [[hidden email]]
Sent: Thursday, March 26, 2015 4:27 AM
To: Axelrod, Ben
Cc: [hidden email]
Subject: Re: [OpenRAVE-users] nested robot tags in XML

dear ben,

i think it's possible to do what you want. have you seen the dual arm example on the wiki?

http://openrave.programmingvision.com/wiki/index.php/Format:XML#Dual-arm_example

it does exactly that: append two identical arms at 180degrees from each other. the arms are stored as kinbodies, but i'm sure you can do the same as robots.
note how the example creates a <kinbody> with the rotation inside and then has another <kinbody file="arm"> to point to the arm.

hope this helps,

 

2015-03-26 3:05 GMT+09:00 Axelrod, Ben <[hidden email]>:

I am trying to write the xml files for a two armed humanoid robot, but am running into difficulties. 

 

The arms are identical, however there are two links that need to be rotated by 180 degrees.  (the joints are continuous rotation, and the robot will be calibrated with the joints rotated 180 degrees).  So using the same arm.xml file and having the joints offset by 180 degrees won’t work.

 

This is the closest thing to working I’ve got:

 

<Robot name="Prototype_Robot" >

 

  <KinBody file="base.xml" />

 

  <KinBody file="torso.xml" prefix="torso_" >

   

    <!-- re-define transform for link1 to be relative to base -->

    <Body name="torso_link1" type="dynamic" >

      <translation>0 0 0.75</translation>

      <offsetfrom>base</offsetfrom>

    </Body>

 

    <!-- fix bodies together -->

    <Joint enable="false" name="fixed_base_to_link1" >

      <limitsdeg>0 0</limitsdeg>

      <Body>base</Body>

      <Body>torso_link1</Body>

    </Joint>

  </KinBody>

 

  

  <Robot prefix="right_" file="arm.xml" >

    <KinBody name="right_arm" >

   

      <!-- re-define transform to be relative to torso -->     

      <Body name="right_link1" type="dynamic" >

        <offsetfrom>torso_chest</offsetfrom>

        <translation>0 0.025 0.31</translation>

        <RotationAxis>0 0 1 180</RotationAxis>

      </Body>

     

      <!-- fix bodies together -->     

      <Joint enable="false" name="fixed_right_arm_to_chest" >

        <limitsdeg>0 0</limitsdeg>

        <Body>right_link1</Body>

        <Body>torso_chest</Body>

        <offsetfrom>torso_chest</offsetfrom>

      </Joint>

    </KinBody>   

  </Robot>

 

  <Robot prefix="left_" file="arm.xml" >

    <KinBody name="left_arm" >

   

      <!-- re-define transform to be relative to torso -->     

      <Body name="left_link1" type="dynamic" >

        <offsetfrom>torso_chest</offsetfrom>

        <translation>0 -0.025 0.31</translation>

      </Body>

 

      <!-- re-define transform for left arm link4 -->     

      <!-- doesn’t work -->     

      <Body name="left_link4" type="dynamic" >

        <RotationMat>0 0 1 0 -1 0 1 0 0</RotationMat>

        <Translation>-0.050 -0.291 0.038</Translation>

      </Body>

     

      <!-- re-define transform for left arm link6 -->     

      <!-- doesn’t work -->     

      <Body name="left_link6" type="dynamic" >

        <RotationMat>1 0 0 0 -1 0 0 0 -1</RotationMat>

      </Body>

     

      <!-- fix bodies together -->     

      <Joint enable="false" name="fixed_left_arm_to_chest" >

        <limitsdeg>0 0</limitsdeg>

        <Body>left_link1</Body>

        <Body>torso_chest</Body>

        <offsetfrom>torso_chest</offsetfrom>

      </Joint>

    </KinBody>   

  </Robot>

  

</Robot>

 

 

Note that “arm.xml” defines KinBody “arm” that has Bodies “link1”, “link4”, and “link6” under it.

 

Re-defining the transform for arms’ link1 works fine.  However, the two other transform redefinitions for the left arm don’t work.  Any ideas why?

 

Thanks,

Ben

 

Ben Axelrod

Sr. Robotics Software Engineer

iRobot Corporation

8 Crosby Drive, M/S 8-1

Bedford, MA 01730

<a href="tel:%28781%29%20430-3315" target="_blank">(781) 430-3315

[hidden email]

 


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users

 



------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users
Loading...