jsk-ros-pkg / jsk_model_tools

JSK model utilities
https://github.com/jsk-ros-pkg/jsk_model_tools
BSD 3-Clause "New" or "Revised" License
5 stars 27 forks source link

Add urdf mesh converter #255

Open iory opened 3 months ago

iory commented 3 months ago

This package converts the colored output of the URDF Exporter plugin of SolidWorks into the format readable by ROS systems. Specifically, this package generates colored .dae models from .3dxml files.

JSK users should refer to the URDF Exporter documentation for guidance.

Quick Start

After building this package, source your workspace. Then, simply execute the command below, specifying your .3dxml URDF file path and the desired output URDF path.

rosrun urdf_mesh_converter convert_urdf_mesh.py <YOUR_URDF_PATH> --output <OUTPUT_URDF_PATH>

For a practical example, you can apply this package to an actual URDF by running the following command:

rosrun urdf_mesh_converter convert_urdf_mesh.py $(rospack find urdf_mesh_converter)/samples/pitch_yaw_2axis_camera_module.urdf --output $(rospack find urdf_mesh_converter)/samples/pitch_yaw_2axis_camera_module_modified.urdf

image

@makabe0510 @pazeshun @Masanori-Konishi If you find this package necessary, I would greatly appreciate your review.

makabe0510 commented 3 months ago

@iory

I tested this PR with the original URDF model with .3dxml mesh files.

It seems the urdf_mesh_converter is working well.

Screenshot from 2024-04-05 17-44-43

iory commented 3 months ago

Thank you.

Please wait for reviews from others as well. This is not an urgent PR, so please take your time to review it when you have a moment.

nasupium commented 1 month ago

昨年度使用していたSolidworks2023版でも、今年度使用しているSolidworks2024版からもurdf-exporterを使ってrvizにロボットを表示することができました。

pazeshun commented 2 weeks ago

Sorry for super late.

I confirmed convert_urdf_mesh.py can create colored URDF of my finger module: SOLIDWORKS view rviz view
SOLIDWORKS Education Edition - 実習にのみ使用可 -  normal_finger_module SLDASM  2024_06_17 19_44_22 Screenshot from 2024-06-17 19-42-58

SOLIDWORKS version: 2024 SP2.0 solidworks_urdf_exporter: Installed and used according to https://docs.google.com/presentation/d/1c2fdw6f_ny4jizH5VS3M7yLNd60M3rzsZs-ACR1ghNI/edit#slide=id.p ROS version: Noetic

iory commented 2 weeks ago

@pazeshun Thanks for your review! I have modified the code based on your comment.