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

Provide detailed and coarse collision models #199

Merged
merged 20 commits into from
Apr 22, 2022

Conversation

rhaschke
Copy link
Contributor

@rhaschke rhaschke commented Nov 9, 2021

As pointed out in #189 (comment), the coarse self-collision models not only pose an issue for the hand but also for the rest of the robot. However, the hand is most crucial for grasping.

This PR implements the ideas proposed in #189 (comment), namely

Somebody from Franka (@gollth, @marcbone) or @rickstaa? should pick this up, if we agree on the general approach.

This PR replaces/generalizes #189.
Fixes #190 (mimic joint is part of hand.xacro).

TODOs

  • The coarse collision models, which are essentially capped cylinders, should be generated using a corresponding xacro macro for capsules. I'm sure, internally Franka represents those geometries with capsules already. Thus, I leave that for you.
  • The virtual link8 has some coarse collision models associated, which should better get associated to link7. Effectively, of course, that doesn't make a difference as both links are rigidly connected. However, semantically, it would be more appealing.
  • The coarse model of link8 is composed of two very similar spheres and a cylinder that is - in my opinion - wrongly oriented. I guess, this geometry should reflect a capsule as well? Could it get replaced by a simple sphere?
    image

@rhaschke rhaschke changed the title Rework URDF generation Provide detailed and coarse collision models Nov 12, 2021
rhaschke added a commit to rhaschke/franka_ros that referenced this pull request Nov 12, 2021
…t-states-desired) and frankaemika#194 (tool-frame) into develop
@rickstaa
Copy link
Contributor

@rhaschke Thanks a lot for Implementing this! Merging the gazebo and normal urdf will make franka_ros more MoveIt MSA compatible.

rhaschke added a commit to rhaschke/franka_ros that referenced this pull request Nov 12, 2021
…t-states-desired) and frankaemika#194 (tool-frame) into develop
rhaschke added a commit to rhaschke/franka_ros that referenced this pull request Nov 12, 2021
…t-states-desired) and frankaemika#194 (tool-frame) into develop
rhaschke added a commit to rhaschke/franka_ros that referenced this pull request Nov 12, 2021
…t-states-desired) and frankaemika#194 (tool-frame) into develop
rhaschke added a commit to moveit/panda_moveit_config that referenced this pull request Nov 12, 2021
@rhaschke
Copy link
Contributor Author

Ping @gollth, @marcbone: I didn't get feedback yet on this restructuring attempt, which is crucial to allow more fine-grained collision checking with the environment (while keeping self-collision) as needed for grasping.

@gollth
Copy link
Contributor

gollth commented Nov 12, 2021

Ping @gollth, @marcbone: I didn't get feedback yet on this restructuring attempt, which is crucial to allow more fine-grained collision checking with the environment (while keeping self-collision) as needed for grasping.

We are still working on the other open points in #193. We will give you feedback here shortly

@rhaschke
Copy link
Contributor Author

rhaschke commented Jan 30, 2022

Friendly ping, @gollth. Did you already had a chance do look into this PR? This is crucial for a new Noetic release of panda_moveit_config and fixing an issue introduced months ago (when introducing coarse collision models).
Meanwhile, we have merged and (just) released the required changes to MoveIt and srdfdom:

@gollth
Copy link
Contributor

gollth commented Jan 31, 2022

Hi @rhaschke,

glad to hear the new release of MoveIT. We are currently quite busy with other stuff but have this collision model topic on the radar and will have a look soonish!

Copy link
Contributor

@gollth gollth left a comment

Choose a reason for hiding this comment

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

Hi @rhaschke, I will test your PR together with the new MoveIT shortly. In the meantime I can already give you some comments on the code itself.

  • Please revert the prefix to arm_id to avoid breaking changes. I get your point, that here it is used as a prefix to joint names, but in all our nomenclature we use the term arm_id. Especially for multi-arm situation it makes sense to distinguish multiple robots by ids.
  • Please revert the renaming the panda_arm.xacro file for backwards compatibility

@gollth
Copy link
Contributor

gollth commented Feb 2, 2022

When I run roslaunch panda_moveit_config franka_control.launch on the latest noetic-devel branch of panda moveit config my controller manager is not able to start/find the franka_gripper controller:

▏ERROR▕ /franka_control ⟩ ControllerManager::loadController() ⟩ L313 ⟫ Could not load controller 'franka_gripper' because controller type 'GripperCommand' does not exist.

Am I missing a dependency?

@rhaschke or @rickstaa could you point me somewhere please?

@rhaschke
Copy link
Contributor Author

rhaschke commented Feb 3, 2022

  • Please revert the prefix to arm_id to avoid breaking changes.
    I get your point, that here it is used as a prefix to joint names, but in all our nomenclature we use the term arm_id. Especially for multi-arm situation it makes sense to distinguish multiple robots by ids.
  • Please revert the renaming the panda_arm.xacro file for backwards compatibility

Note that we can maintain backwards compatibility by other means. For example, #210 illustrates how to deprecate a property in favour of a more meaningful name.
A similar approach could be used for renaming the file. I fully agree with your request to maintain backwards compatibility.
However, this shouldn't hinder progress. Please tell me, which approach do you prefer: freezing or deprecating?
Before tackling such rather cosmetic changes, I would like to get a thumbs-up for the general approach.

Could not load controller 'franka_gripper' because controller type 'GripperCommand' does not exist.

The culprit is the definition of the franka_gripper controller in panda_moveit_config. As I don't (yet) have access to a real robot, I wasn't able to test the real-robot control. However, I was assuming that you provide a GripperCommand action as well, don't you?

rhaschke and others added 18 commits April 14, 2022 12:02
They serve different purposes:
- coarse collision geometries mimic the internal self-collision checking
  of the real-robot controller
- mesh models should be used for collision checking with environmental objects
- Declare inertial properties in a yaml file
- Use xacro:inertial macro
xacro requires macro names to be different from actual tag names.
This way you can specify a rotational offset between panda_link* and panda_link*_sc
This macro abstracts the creation of a "collision capsule" from two collision
spheres and a collision cylinder.

Since arbitraty RPY rotations are hard to calculate in XACRO (would require
rotation matrix multiplication and probably reduce redability) for now we only
allow the discrete 6 orientations which are aligned with X/Y/Z axes.
The capsule at link8 covers the Pilot which is attached to link7. Though rigidly
connected to link7, link8 is more a "virtual" link without geometry indicating
the flange of the robot. That's why it makes more sense to also have the
collision capsule attached to link7_sc.
…capsule-macro to SRR-1201/self-collision-geometries

* commit '2a4542cd619942667e59e4a477a9c4137ba3617d':
  HACK: Disable gripper_sim_tests_with_object because flaky
  FIX: URDF tests in Python3/Noetic
  ADD: urdfdom-py as CI dependency
  ADD: URDF test suite
  ADD: Comment explaining sx,sy,sz properties in utils.xacro
  CHANGE: Use `<xacro:collision_capsule>` also for hand.xacro
  CHANGE: Move panda_link8_sc -> panda_link7_sc
  CHANGE: Use new `<xacro:collision_capsule>` macro for self collision geometries
  ADD: `<xacro:collision_capsule>` macro
  ADD: `rpy` parameter to `<xacro:link_detailed_coarse>`
The name "detailed_coarse" is a bit contradicting. More suitable might be a name
which indicates that existing `<link>`s are augmented with additional
functionality such as self-collision geometries. This in mind it also should
also be rather consise so I went with `link_with_sc`.
@gollth
Copy link
Contributor

gollth commented Apr 21, 2022

Hi @rhaschke

sorry that this took so long. We had a bit of internal discussions about this PR, but finally found consensus. Thanks for the fix in panda_moveit_config with the self-collision checks. Now this works as expected:

SRR-1202

I took the freedom to rebase your modular-xacro branch to our latest develop (which also contains some hotfixes for the failing CI tests). Also there is now a capsule macro like you suggested in your description.

Regarding the weird capsule at the Pilot: this was actually wrongly placed and rotated -> should also be fixed now. In addition this capsule is now part of link7 like you suggested.

@rhaschke
Copy link
Contributor Author

Thanks for addressing the remaining TODOs. Looks good for me now as well. I just removed link8_sc, which became empty (doesn't have any visual or collision models associated).

We had a bit of internal discussions about this PR, but finally found consensus.

I'm curious what was controversial about this PR.

@gollth
Copy link
Contributor

gollth commented Apr 22, 2022

I'm curious what was controversial about this PR.

Mostly naming and if the _sc links should be configurable via the gazebo XACRO arg or not. For now it should be fine, with the according documentation change (will push after this is merged)

@gollth gollth merged commit c7fb393 into frankaemika:develop Apr 22, 2022
@rhaschke rhaschke deleted the modular-xacro branch April 24, 2022 10:34
kmohyeldin pushed a commit that referenced this pull request Sep 2, 2022
…ription-to-support-fr3 to develop

* commit '7e8be0dd968f6c4b80aa54d4f6bcc06bd0e7284f':
  fix cartesian pose example
  generalize over arm_id in franka_example_controllers.yaml
  CHANGE: Parameterize tests for both panda + fr3
  FIX: Make <arg> in `franka_robot` macro property
  CHANGE: Extract <limits> & <safety_controller> into custom macro
  update CHANGELOG.md
  allow selecting fr3 urdf for launch files
  define joint limits for fr3
  load joint limits directly in top-level URDf
  use correct urdfs in launch files
  refactor franka_description to support for fr3
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

Successfully merging this pull request may close these issues.

3 participants