aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorThierry Berger <contact@thierryberger.com>2024-09-03 21:48:10 +0200
committerGitHub <noreply@github.com>2024-09-03 21:48:10 +0200
commit98f9199abc3044779627b859b14f84fff3a97623 (patch)
treee082a17dccd0e40c1ecd91525280dbfcfd6e951d /crates
parent58785ce257367f9e016738c2a87413b0590cc67f (diff)
downloadrapier-98f9199abc3044779627b859b14f84fff3a97623.tar.gz
rapier-98f9199abc3044779627b859b14f84fff3a97623.tar.bz2
rapier-98f9199abc3044779627b859b14f84fff3a97623.zip
chore: add publish script for urdf and stl + unify all releases by de… (#727)
* chore: add publish script for urdf and stl + unify all releases by default * better cross platform publish support * publish in dry run within ci * publish scripts better errors, abort if a publish fails, with an exit code. * chore(rapier_urdf): fix warnings * chore(rapier-urdf): typo fix --------- Co-authored-by: Sébastien Crozet <developer@crozet.re>
Diffstat (limited to 'crates')
-rw-r--r--crates/rapier3d-urdf/src/lib.rs14
1 files changed, 6 insertions, 8 deletions
diff --git a/crates/rapier3d-urdf/src/lib.rs b/crates/rapier3d-urdf/src/lib.rs
index f6d96bd..1f913da 100644
--- a/crates/rapier3d-urdf/src/lib.rs
+++ b/crates/rapier3d-urdf/src/lib.rs
@@ -32,10 +32,7 @@ use rapier3d::{
JointAxis, MassProperties, MultibodyJointHandle, MultibodyJointSet, RigidBody,
RigidBodyBuilder, RigidBodyHandle, RigidBodySet, RigidBodyType,
},
- geometry::{
- Collider, ColliderBuilder, ColliderHandle, ColliderSet, MeshConverter, SharedShape,
- TriMeshFlags,
- },
+ geometry::{Collider, ColliderBuilder, ColliderHandle, ColliderSet, SharedShape, TriMeshFlags},
math::{Isometry, Point, Real, Vector},
na,
};
@@ -493,7 +490,7 @@ fn urdf_to_rigid_body(options: &UrdfLoaderOptions, inertial: &Inertial) -> Rigid
fn urdf_to_collider(
options: &UrdfLoaderOptions,
- mesh_dir: &Path,
+ _mesh_dir: &Path, // NOTO: this isn’t used if there is no external mesh feature enabled (like stl).
geometry: &Geometry,
origin: &Pose,
) -> Option<Collider> {
@@ -514,17 +511,18 @@ fn urdf_to_collider(
Geometry::Sphere { radius } => SharedShape::ball(*radius as Real),
Geometry::Mesh { filename, scale } => {
let path: &Path = filename.as_ref();
- let scale = scale
+ let _scale = scale
.map(|s| Vector::new(s.x as Real, s.y as Real, s.z as Real))
.unwrap_or_else(|| Vector::<Real>::repeat(1.0));
match path.extension().and_then(|ext| ext.to_str()) {
#[cfg(feature = "stl")]
Some("stl") | Some("STL") => {
- let full_path = mesh_dir.join(filename);
+ use rapier3d::geometry::MeshConverter;
+ let full_path = _mesh_dir.join(filename);
match rapier3d_stl::load_from_path(
full_path,
MeshConverter::TriMeshWithFlags(options.trimesh_flags),
- scale,
+ _scale,
) {
Ok(stl_shape) => {
shape_transform = stl_shape.pose;