-
Notifications
You must be signed in to change notification settings - Fork 61
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
Allow Scaling Collision Meshes #62
Allow Scaling Collision Meshes #62
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution!
I am not super convinced about including trimesh
in the mandatory dependencies, though. I think this could have some undesired effects on certain platforms and user setups due to potential conflicts with either system-wide Python packages (trimesh
and its dependencies installed via Python package managers) or one of the countless Python environment overlays. In general, I believe it is best to keep Python packages out of the manifest (they might not be handled properly like setup.py
or pyproject.toml
dependencies). What do you think?
<exec_depend>python3-trimesh-pip</exec_depend>
The user also already gets an explanatory error if they are missing the package when calling the appropriate function.
try:
import trimesh
except ImportError as err:
raise ImportError(
"Python module 'trimesh' not found! Please install it manually in order "
"to add collision objects into the MoveIt 2 planning scene."
) from err
I'm fine either way, because if we don't add it to
In my experience, for ROS projects it's easiest to manage all dependencies with I haven't used ROS/ROS2 with a virtual environment, and I understand how that could get complicated. It seems like at least one person has been able to get
I agree that this error is very helpful (and more than other open-source libraries do 😄 ). |
I went ahead and removed trimesh as a required dependency. |
* Allow scaling of collision meshes * Added trimesh to rosdeps for easier installation * Ran tests with example * Remove trimesh as a required dependency
Description
This PR allows users to scale a collision mesh when adding it into the planning scene. Note that scaling occurs within the mesh's XYZ axes.
This PR also adds
trimesh
as a dependency. Although it is not a required dependency (it is only necessary when using meshes), I think it is beneficial to add so that all possible dependencies can be installed with a singlerosdep
call.Testing
ros2 launch panda_moveit_config ex_fake_control.launch.py
ros2 run pymoveit2 ex_collision_mesh.py --ros-args -p position:="[0.5, 0.0, 0.5]" -p quat_xyzw:="[0.0, 0.0, -0.7071, 0.7071]"
ros2 run pymoveit2 ex_collision_mesh.py --ros-args -p position:="[0.5, 0.0, 0.5]" -p quat_xyzw:="[0.0, 0.0, -0.7071, 0.7071]" -p scale:="[0.5, 1.0, 1.0]"
ros2 run pymoveit2 ex_collision_mesh.py --ros-args -p position:="[0.5, 0.0, 0.5]" -p quat_xyzw:="[0.0, 0.0, -0.7071, 0.7071]" -p scale:="[0.5, 2.0, 1.0]"
ros2 run pymoveit2 ex_collision_mesh.py --ros-args -p position:="[0.5, 0.0, 0.5]" -p quat_xyzw:="[0.0, 0.0, -0.7071, 0.7071]" -p scale:="[0.5, 2.0, 5.0]"