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

support continuous joints #104

Merged
merged 2 commits into from
Aug 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion docs/source/design.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ Specifying degrees of freedom

* Degree of freedoms should be slider, cylindrical or revolute mate connectors named ``dof_something``, where
``something`` will be used to name the joint in the final document
* If the mate connector is **cylindrical** or **revolute**, a ``revolute`` joint will be issued

* If the mate connector is **cylindrical** or **revolute**, a ``revolute`` joint will be issued by default

* To make a ``continuous`` joint, add ``continuous`` or ``wheel`` in the name of the joint. For instance, a **revolute** mate named
``dof_front_left_wheel`` will result in a ``continuous`` joint named ``front_left_wheel`` in the resulting URDF.
* If the mate connector is a **slider**, a ``prismatic`` joint will be issued
* If the mate connector is **fastened**, a ``fixed`` joint will be issued
* When doing this connection, click the children joint first. This will be used to find the trunk of the robot (part with children but no parent)
Expand Down
5 changes: 3 additions & 2 deletions onshape_to_robot/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ def getLimits(jointType, name):
if enabled:
return (minimum, maximum)
else:
print(Fore.YELLOW + 'WARNING: joint ' + name + ' of type ' +
jointType + ' has no limits ' + Style.RESET_ALL)
if jointType != 'continuous':
print(Fore.YELLOW + 'WARNING: joint ' + name + ' of type ' +
jointType + ' has no limits ' + Style.RESET_ALL)
return None
5 changes: 4 additions & 1 deletion onshape_to_robot/load_robot.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,10 @@ def assignParts(root, parent):

limits = None
if data['mateType'] == 'REVOLUTE' or data['mateType'] == 'CYLINDRICAL':
jointType = 'revolute'
if 'wheel' in parts or 'continuous' in parts:
jointType = 'continuous'
else:
jointType = 'revolute'

if not config['ignoreLimits']:
limits = getLimits(jointType, data['name'])
Expand Down