Skip to content

Commit 718c42a

Browse files
Merge remote-tracking branch 'upstream/devel' into topic/aba-second-order-derivatives
# Conflicts: # README.md
2 parents 399ea9c + 9443fe8 commit 718c42a

11 files changed

Lines changed: 285 additions & 20 deletions

File tree

.gitattributes

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
# GitHub syntax highlighting
2-
pixi.lock linguist-language=YAML linguist-generated=true
1+
# SCM syntax highlighting & preventing 3-way merges
2+
pixi.lock merge=binary linguist-language=YAML linguist-generated=true -diff

.github/workflows/macos-linux-windows-pixi.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@ jobs:
6666
BUILD_ADVANCED_TESTING: OFF
6767
- os: macos-15-intel
6868
BUILD_ADVANCED_TESTING: OFF
69-
- os: windows-latest
69+
- os: windows-2022
7070
environment: all
7171
build_type: Release
7272
BUILD_ADVANCED_TESTING: OFF
73-
- os: windows-latest
73+
- os: windows-2022
7474
environment: all-clang-cl
7575
build_type: Release
7676
BUILD_ADVANCED_TESTING: OFF
@@ -98,7 +98,7 @@ jobs:
9898
key: ccache-macos-linux-conda-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.environment }}_${{ github.sha }}
9999
restore-keys: ccache-macos-linux-conda-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.environment }}_
100100

101-
- uses: prefix-dev/setup-pixi@v0.9.5
101+
- uses: prefix-dev/setup-pixi@v0.9.6
102102
with:
103103
cache: true
104104
environments: ${{ matrix.environment }}
@@ -163,7 +163,7 @@ jobs:
163163
strategy:
164164
fail-fast: false
165165
matrix:
166-
os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest, macos-15-intel, windows-latest]
166+
os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest, macos-15-intel, windows-2022]
167167
environment: [all]
168168

169169
steps:
@@ -189,7 +189,7 @@ jobs:
189189
key: ccache-python-standalone-macos-linux-conda-${{ matrix.os }}-${{ matrix.environment }}_${{ github.sha }}
190190
restore-keys: ccache-python-standalone-macos-linux-conda-${{ matrix.os }}-${{ matrix.environment }}_
191191

192-
- uses: prefix-dev/setup-pixi@v0.9.5
192+
- uses: prefix-dev/setup-pixi@v0.9.6
193193
with:
194194
cache: true
195195
environments: ${{ matrix.environment }}
@@ -251,14 +251,14 @@ jobs:
251251
# strategy:
252252
# fail-fast: false
253253
# matrix:
254-
# os: [ubuntu-latest, macos-latest, macos-15-intel, windows-latest]
254+
# os: [ubuntu-latest, macos-latest, macos-15-intel, windows-2022]
255255

256256
# steps:
257257
# - uses: actions/checkout@v6
258258
# with:
259259
# submodules: recursive
260260

261-
# - uses: prefix-dev/setup-pixi@v0.9.5
261+
# - uses: prefix-dev/setup-pixi@v0.9.6
262262
# env:
263263
# CMAKE_BUILD_PARALLEL_LEVEL: 2
264264
# with:
@@ -287,7 +287,7 @@ jobs:
287287
with:
288288
submodules: recursive
289289

290-
- uses: prefix-dev/setup-pixi@v0.9.5
290+
- uses: prefix-dev/setup-pixi@v0.9.6
291291
with:
292292
cache: true
293293

.github/workflows/ros_ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,5 +65,5 @@ jobs:
6565
key: ccache-${{ matrix.env.ROS_DISTRO }}-${{ github.sha }}
6666
restore-keys: ccache-${{ matrix.env.ROS_DISTRO }}-
6767
# Run industrial_ci
68-
- uses: 'ros-industrial/industrial_ci@c553397753252d630e88e7e91aa69c6c8a478ee0'
68+
- uses: 'ros-industrial/industrial_ci@125164b9f1883cdf1858897a7146d1bebf2be5c6'
6969
env: ${{ matrix.env }}

.github/workflows/update_pixi_lockfile.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
persist-credentials: false
2828

2929
- name: Set up pixi
30-
uses: prefix-dev/setup-pixi@v0.9.5
30+
uses: prefix-dev/setup-pixi@v0.9.6
3131
with:
3232
run-install: false
3333

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
1616

1717
### Fixed
1818

19+
- Fix Viser visualizer: apply URDF `<mesh scale>` to mesh vertices instead of scaling the link translation ([#2878](https://github.com/stack-of-tasks/pinocchio/pull/2878))
20+
1921
- Fix build issue with g++ 12 ([#2890](https://github.com/stack-of-tasks/pinocchio/pull/2890))
22+
- Fix useless memory allocation in Python checkers ([#2897](https://github.com/stack-of-tasks/pinocchio/pull/2897) and [#2907](https://github.com/stack-of-tasks/pinocchio/pull/2907))
2023

2124
### Changed
2225

2326
- nix: switch to flakoboros ([#2882](https://github.com/stack-of-tasks/pinocchio/pull/2882))
2427

28+
2529
## [4.0.0] - 2026-04-13
2630

2731
### Highlights

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,8 @@ Please note that we always advise including the `pinocchio/fwd.hpp` header as th
203203
| **Humble** | [![](https://build.ros2.org/job/Hbin_uJ64__pinocchio__ubuntu_jammy_amd64__binary/badge/icon)](https://build.ros2.org/job/Hbin_uJ64__pinocchio__ubuntu_jammy_amd64__binary) |
204204
| **Jazzy** | [![](https://build.ros2.org/job/Jbin_uN64__pinocchio__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Jbin_uN64__pinocchio__ubuntu_noble_amd64__binary) |
205205
| **Kilted** | [![](https://build.ros2.org/job/Kbin_uN64__pinocchio__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Kbin_uN64__pinocchio__ubuntu_noble_amd64__binary) |
206-
| **Rolling** | [![](https://build.ros2.org/job/Rbin_uN64__pinocchio__ubuntu_noble_amd64__binary/badge/icon)](https://build.ros2.org/job/Rbin_uN64__pinocchio__ubuntu_noble_amd64__binary) |
206+
| **Lyrical** | [![](https://build.ros2.org/job/Lbin_uR64__pinocchio__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Lbin_uR64__pinocchio__ubuntu_resolute_amd64__binary) |
207+
| **Rolling** | [![](https://build.ros2.org/job/Rbin_uR64__pinocchio__ubuntu_resolute_amd64__binary/badge/icon)](https://build.ros2.org/job/Rbin_uR64__pinocchio__ubuntu_resolute_amd64__binary) |
207208

208209
## Visualization
209210

@@ -296,13 +297,14 @@ In addition to the core dev team, the following people have also been involved i
296297
- [Sarah El Kazdadi](https://github.com/sarah-ek) (Inria): multi-precision arithmetic support
297298
- [Nicolas Torres Alberto](https://scholar.google.com/citations?user=gYNLhEIAAAAJ&hl=en) (Inria): features extension
298299
- [Shubham Singh](https://github.com/shubhamsingh91) (UT Austin): second-order inverse and forward dynamics derivatives
299-
- [Sebastian Castro](https://roboticseabass.com) (RAI Institute): Viser visualizer and MeshCat visualizer feature extension
300+
- [Sebastian Castro](https://roboticseabass.com): Viser visualizer and MeshCat visualizer feature extension
300301
- [Lev Kozlov](https://github.com/lvjonok): Kinetic and potential energy regressors
301302
- [Simeon Nedelchev](https://github.com/simeon-ned): Pseudo inertia and Log-Cholesky parametrization
302303
- [Alexy Legrand](https://www.linkedin.com/in/alexy-legrand-125889232/): Viser color bug fixes
303304
- [Pierre Puchaud](https://github.com/ipuch): Ellipsoid Joint
304305
- [Lucas Joseph](https://github.com/LucasJoseph): Ellipsoid Joint
305306
- [Megane Millan](https://github.com/MegMll): core developer (MJCF, joint mimic, etc.)
307+
- [Tingfan Wu](https://github.com/tingfan): Viser visualizer mesh-scale bug fix
306308

307309
If you have participated in the development of **Pinocchio**, please add your name and contribution to this list.
308310

bindings/python/pinocchio/visualize/viser_visualizer.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,12 +201,18 @@ def loadViewerGeometryObject(self, geometry_object, prefix="", color=None):
201201
)
202202
elif isinstance(geom, MESH_TYPES):
203203
frame = self._add_mesh_from_path(
204-
name, geometry_object.meshPath, color_override
204+
name,
205+
geometry_object.meshPath,
206+
color_override,
207+
scale=geometry_object.meshScale,
205208
)
206209
elif isinstance(geom, coal.Convex):
207210
if len(geometry_object.meshPath) > 0:
208211
frame = self._add_mesh_from_path(
209-
name, geometry_object.meshPath, color_override
212+
name,
213+
geometry_object.meshPath,
214+
color_override,
215+
scale=geometry_object.meshScale,
210216
)
211217
else:
212218
frame = self._add_mesh_from_convex(name, geom, color_override)
@@ -215,16 +221,18 @@ def loadViewerGeometryObject(self, geometry_object, prefix="", color=None):
215221

216222
self.frames[name] = frame
217223

218-
def _add_mesh_from_path(self, name, mesh_path, color):
224+
def _add_mesh_from_path(self, name, mesh_path, color, scale):
219225
"""
220226
Load a mesh from a file.
221227
"""
222228
extension = Path(mesh_path).suffix.lower()
223229
if extension == ".dae" or color is None:
224230
mesh = trimesh.load_scene(mesh_path)
231+
mesh.apply_scale(scale)
225232
return self.viewer.scene.add_mesh_trimesh(name, mesh)
226233
else:
227234
mesh = trimesh.load_mesh(mesh_path)
235+
mesh.apply_scale(scale)
228236
return self.viewer.scene.add_mesh_simple(
229237
name,
230238
mesh.vertices,
@@ -305,7 +313,7 @@ def updatePlacements(self, geometry_type):
305313
# Update viewer configuration.
306314
frame_name = prefix + "/" + geometry_object.name
307315
frame = self.frames[frame_name]
308-
frame.position = M.translation * geometry_object.meshScale
316+
frame.position = M.translation
309317
frame.wxyz = pin.Quaternion(M.rotation).coeffs()[
310318
[3, 0, 1, 2]
311319
] # Pinocchio uses xyzw

include/pinocchio/bindings/python/utils/model-checker.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ namespace pinocchio
3232
// Convert the object to a tuple
3333
boost::python::tuple py_args = boost::python::extract<boost::python::tuple>(args);
3434

35-
context::Model m = boost::python::extract<context::Model>(py_args[model_arg_list_idx]);
36-
if (!m.check(MimicChecker()))
35+
boost::python::extract<const context::Model &> get_model(py_args[model_arg_list_idx]);
36+
if (!get_model().check(MimicChecker()))
3737
{
3838
PyErr_SetString(PyExc_RuntimeError, m_error_message.c_str());
3939
return false;
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
<COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.1">
2+
<asset>
3+
<created>2026-06-04T00:00:00.000000</created>
4+
<modified>2026-06-04T00:00:00.000000</modified>
5+
<up_axis>Y_UP</up_axis>
6+
</asset>
7+
<library_effects>
8+
<effect id="effect0" name="effect0">
9+
<profile_COMMON>
10+
<technique sid="common">
11+
<phong>
12+
<emission>
13+
<color>0.0 0.0 0.0 1.0</color>
14+
</emission>
15+
<ambient>
16+
<color>0.0 0.0 0.0 1.0</color>
17+
</ambient>
18+
<diffuse>
19+
<color>0.0 0.0 0.0 1.0</color>
20+
</diffuse>
21+
<specular>
22+
<color>0.0 0.0 0.0 1.0</color>
23+
</specular>
24+
<shininess>
25+
<float>0.0</float>
26+
</shininess>
27+
<reflective>
28+
<color>0.0 0.0 0.0 1.0</color>
29+
</reflective>
30+
<reflectivity>
31+
<float>0.0</float>
32+
</reflectivity>
33+
<transparent>
34+
<color>0.0 0.0 0.0 1.0</color>
35+
</transparent>
36+
<transparency>
37+
<float>1.0</float>
38+
</transparency>
39+
</phong>
40+
</technique>
41+
</profile_COMMON>
42+
</effect>
43+
</library_effects>
44+
<library_geometries>
45+
<geometry id="geometry0" name="box">
46+
<mesh>
47+
<source id="verts-array">
48+
<float_array count="24" id="verts-array-array">-0.5 -0.5 -0.5 -0.5 -0.5 0.5 -0.5 0.5 -0.5 -0.5 0.5 0.5 0.5 -0.5 -0.5 0.5 -0.5 0.5 0.5 0.5 -0.5 0.5 0.5 0.5</float_array>
49+
<technique_common>
50+
<accessor count="8" source="#verts-array-array" stride="3">
51+
<param type="float" name="X" />
52+
<param type="float" name="Y" />
53+
<param type="float" name="Z" />
54+
</accessor>
55+
</technique_common>
56+
</source>
57+
<source id="normals-array">
58+
<float_array count="24" id="normals-array-array">-0.5773503 -0.5773503 -0.5773503 -0.5773503 -0.5773503 0.5773503 -0.5773503 0.5773503 -0.5773503 -0.5773503 0.5773503 0.5773503 0.5773503 -0.5773503 -0.5773503 0.5773503 -0.5773503 0.5773503 0.5773503 0.5773503 -0.5773503 0.5773503 0.5773503 0.5773503</float_array>
59+
<technique_common>
60+
<accessor count="8" source="#normals-array-array" stride="3">
61+
<param type="float" name="X" />
62+
<param type="float" name="Y" />
63+
<param type="float" name="Z" />
64+
</accessor>
65+
</technique_common>
66+
</source>
67+
<vertices id="verts-array-vertices">
68+
<input semantic="POSITION" source="#verts-array" />
69+
</vertices>
70+
<triangles count="12" material="material0">
71+
<input offset="0" semantic="VERTEX" source="#verts-array-vertices" />
72+
<input offset="1" semantic="NORMAL" source="#normals-array" />
73+
<p>1 1 3 3 0 0 4 4 1 1 0 0 0 0 3 3 2 2 2 2 4 4 0 0 1 1 7 7 3 3 5 5 1 1 4 4 5 5 7 7 1 1 3 3 7 7 2 2 6 6 4 4 2 2 2 2 7 7 6 6 6 6 5 5 4 4 7 7 5 5 6 6</p>
74+
</triangles>
75+
</mesh>
76+
</geometry>
77+
</library_geometries>
78+
<library_materials>
79+
<material id="material0" name="defaultmaterial">
80+
<instance_effect url="#effect0" />
81+
</material>
82+
</library_materials>
83+
<library_visual_scenes>
84+
<visual_scene id="scene">
85+
<node id="node0" name="node0">
86+
<instance_geometry url="#geometry0">
87+
<bind_material>
88+
<technique_common>
89+
<instance_material symbol="material0" target="#material0" />
90+
</technique_common>
91+
</bind_material>
92+
</instance_geometry>
93+
</node>
94+
</visual_scene>
95+
</library_visual_scenes>
96+
<scene>
97+
<instance_visual_scene url="#scene" />
98+
</scene>
99+
</COLLADA>

unittest/python/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ if(urdfdom_FOUND)
147147
bindings_urdf
148148
bindings_geometry_model_urdf
149149
bindings_contact_inverse_dynamics
150+
bindings_viser_visualizer
150151
)
151152
endif(urdfdom_FOUND)
152153

0 commit comments

Comments
 (0)