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

Add device to robot model #422

Merged
merged 2 commits into from
Feb 28, 2023

Conversation

fantaosha
Copy link
Contributor

Motivation and Context

How Has This Been Tested

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have completed my CLA (see CONTRIBUTING)
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@fantaosha fantaosha added the enhancement New feature or request label Jan 9, 2023
@fantaosha fantaosha self-assigned this Jan 9, 2023
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jan 9, 2023

if device is not None and origin.device != device:
warnings.warn(
f"tensor.device {origin.device} does not match given device {device}, "
Copy link
Member

@mhmukadam mhmukadam Jan 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow same update to warning as suggested by Luis in the revolute joint PR.

@fantaosha fantaosha force-pushed the taoshaf.robot.forward_kinematics branch from 928fb81 to 1be2940 Compare January 23, 2023 22:11
* refactor joint dof

* add virtual end-effector for tests
@fantaosha fantaosha merged commit a2b9790 into taoshaf.robot.forward_kinematics Feb 28, 2023
@fantaosha fantaosha deleted the taoshaf.robot.add_device branch February 28, 2023 19:11
fantaosha added a commit that referenced this pull request Mar 1, 2023
* fixed a bug in FixedJoint

* add angle_ids

* add jacobians to FK

* forward kinematics works

* rename FK

* add tests for differentiable kinematics

* rename tests

* simplify the computation of origin

* add jacobian tests for forward kinematics

* fixed a bug for vectorize=True in SE3

* improve the efficiency of forward kinematics

* add tests for backward propagation

* update lie group load paths

* Add device to robot model (#422)

* add device to robot model

* Refactor Joint.dof as a property (#423)

* refactor joint dof

* add virtual end-effector for tests

* seems to work after name changes

* rename parent->parent_link and child->child_link

* rename angle_ids -> ancestor_active_joint_ids

* refactor tests with torch.testing.assert_close

* small refactoring of the code

* add Robot.get_links()

* remove some setters for link and joint

* made some functions private for encapsulation
fantaosha added a commit that referenced this pull request Mar 1, 2023
* add link

* add id to joint

* add id to link

* add robot model

* add name to robot

* backup

* refactor joint

* refactor link

* add robot model

* robot model works

* a minior refactor of joint

* add ancestor to links

* update dof computation

* add forward kinematics function

* Add differentiable forward kinematics (#420)

* fixed a bug in FixedJoint

* add angle_ids

* add jacobians to FK

* forward kinematics works

* rename FK

* add tests for differentiable kinematics

* rename tests

* simplify the computation of origin

* add jacobian tests for forward kinematics

* fixed a bug for vectorize=True in SE3

* improve the efficiency of forward kinematics

* add tests for backward propagation

* update lie group load paths

* Add device to robot model (#422)

* add device to robot model

* Refactor Joint.dof as a property (#423)

* refactor joint dof

* add virtual end-effector for tests

* seems to work after name changes

* rename parent->parent_link and child->child_link

* rename angle_ids -> ancestor_active_joint_ids

* refactor tests with torch.testing.assert_close

* small refactoring of the code

* add Robot.get_links()

* remove some setters for link and joint

* made some functions private for encapsulation

* consolidate if block and classmethod->staticmethod

* refactor set_robot_from_urdf_file

* rename ancestor_active_joint_ids -> ancestor_non_fixed_joint_ids

* id=-1 -> id=None

* refactor the code for simplicity

* move link into joint
fantaosha added a commit that referenced this pull request Mar 1, 2023
* add prismatic joint

* refactor prismatic joint

* Add robot model (#417)

* add link

* add id to joint

* add id to link

* add robot model

* add name to robot

* backup

* refactor joint

* refactor link

* add robot model

* robot model works

* a minior refactor of joint

* add ancestor to links

* update dof computation

* add forward kinematics function

* Add differentiable forward kinematics (#420)

* fixed a bug in FixedJoint

* add angle_ids

* add jacobians to FK

* forward kinematics works

* rename FK

* add tests for differentiable kinematics

* rename tests

* simplify the computation of origin

* add jacobian tests for forward kinematics

* fixed a bug for vectorize=True in SE3

* improve the efficiency of forward kinematics

* add tests for backward propagation

* update lie group load paths

* Add device to robot model (#422)

* add device to robot model

* Refactor Joint.dof as a property (#423)

* refactor joint dof

* add virtual end-effector for tests

* seems to work after name changes

* rename parent->parent_link and child->child_link

* rename angle_ids -> ancestor_active_joint_ids

* refactor tests with torch.testing.assert_close

* small refactoring of the code

* add Robot.get_links()

* remove some setters for link and joint

* made some functions private for encapsulation

* consolidate if block and classmethod->staticmethod

* refactor set_robot_from_urdf_file

* rename ancestor_active_joint_ids -> ancestor_non_fixed_joint_ids

* id=-1 -> id=None

* refactor the code for simplicity

* move link into joint
fantaosha added a commit that referenced this pull request Mar 8, 2023
* add prismatic joint

* refactor prismatic joint

* Add robot model (#417)

* add link

* add id to joint

* add id to link

* add robot model

* add name to robot

* backup

* refactor joint

* refactor link

* add robot model

* robot model works

* a minior refactor of joint

* add ancestor to links

* update dof computation

* add forward kinematics function

* Add differentiable forward kinematics (#420)

* fixed a bug in FixedJoint

* add angle_ids

* add jacobians to FK

* forward kinematics works

* rename FK

* add tests for differentiable kinematics

* rename tests

* simplify the computation of origin

* add jacobian tests for forward kinematics

* fixed a bug for vectorize=True in SE3

* improve the efficiency of forward kinematics

* add tests for backward propagation

* update lie group load paths

* Add device to robot model (#422)

* add device to robot model

* Refactor Joint.dof as a property (#423)

* refactor joint dof

* add virtual end-effector for tests

* seems to work after name changes

* rename parent->parent_link and child->child_link

* rename angle_ids -> ancestor_active_joint_ids

* refactor tests with torch.testing.assert_close

* small refactoring of the code

* add Robot.get_links()

* remove some setters for link and joint

* made some functions private for encapsulation

* consolidate if block and classmethod->staticmethod

* refactor set_robot_from_urdf_file

* rename ancestor_active_joint_ids -> ancestor_non_fixed_joint_ids

* id=-1 -> id=None

* refactor the code for simplicity

* move link into joint
fantaosha added a commit that referenced this pull request Mar 10, 2023
* add revolute joint

* refactor revolute joint

* add parent and child to joint

* update the path to load so3 and se3

* Add prismatic joint (#416)

* add prismatic joint

* refactor prismatic joint

* Add robot model (#417)

* add link

* add id to joint

* add id to link

* add robot model

* add name to robot

* backup

* refactor joint

* refactor link

* add robot model

* robot model works

* a minior refactor of joint

* add ancestor to links

* update dof computation

* add forward kinematics function

* Add differentiable forward kinematics (#420)

* fixed a bug in FixedJoint

* add angle_ids

* add jacobians to FK

* forward kinematics works

* rename FK

* add tests for differentiable kinematics

* rename tests

* simplify the computation of origin

* add jacobian tests for forward kinematics

* fixed a bug for vectorize=True in SE3

* improve the efficiency of forward kinematics

* add tests for backward propagation

* update lie group load paths

* Add device to robot model (#422)

* Refactor Joint.dof as a property (#423)

* refactor joint dof

* add virtual end-effector for tests

* seems to work after name changes

* rename parent->parent_link and child->child_link

* rename angle_ids -> ancestor_active_joint_ids

* refactor tests with torch.testing.assert_close

* small refactoring of the code

* add Robot.get_links()

* remove some setters for link and joint

* made some functions private for encapsulation

* consolidate if block and classmethod->staticmethod

* refactor set_robot_from_urdf_file

* rename ancestor_active_joint_ids -> ancestor_non_fixed_joint_ids

* id=-1 -> id=None

* refactor the code for simplicity

* move link into joint

* simplify the code

* minor revision to be consistent with Lie group refatcoring

* fixed a CI error

* move files to labs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants