Description
moveit_py crashes with a segmentation fault when calling RobotState.set_joint_group_positions() or RobotState.set_joint_group_active_positions() from Python, even with a valid joint group name and a correctly sized NumPy array.
I was able to reproduce this outside of MoveItPy planning/execution. The issue occurs with just RobotModel + RobotState, which suggests the problem is in the Python binding path for the joint-group setter methods.
ROS Distro
Humble
OS and version
Ubuntu 22.04
Source or binary build?
Source
If binary, which release version?
No response
If source, which branch?
humble
Which RMW are you using?
None
Steps to Reproduce
I can reproduce the crash with a minimal script like this:
import glob
import numpy as np
from moveit.core.robot_model import RobotModel
from moveit.core.robot_state import RobotState
# Generate or provide a valid URDF path for the robot
urdf_path = sorted(glob.glob("/tmp/m0609_*.urdf"))[-1]
srdf_path = "/home/username/ros2_ws/install/dsr_moveit_config_m0609/share/dsr_moveit_config_m0609/config/dsr.srdf"
model = RobotModel(urdf_xml_path=urdf_path, srdf_xml_path=srdf_path)
state = RobotState(model)
state.update()
state.set_joint_group_positions(
joint_model_group_name="manipulator",
position_values=np.array([0.0, 0.0, 1.57, 0.0, 1.57, 0.0], dtype=float),
)
I also reproduced the same crash with:
state.set_joint_group_active_positions(
"manipulator",
np.array([0.0, 0.0, 1.57, 0.0, 1.57, 0.0], dtype=float),
)
Important notes:
- The group name is valid.
- The input length matches the group DOF.
- Setting individual joints through state.joint_positions = {...} works correctly.
- The crash therefore seems specific to the joint-group setter binding path.
- Reproduced consistently with Doosan Robotics config (dsr_moveit_config_m0609) on Humble.
I have not yet confirmed whether this reproduces with other robot configs (e.g., Panda), so this may be config/model-dependent or may expose a generic binding issue.
Expected behavior
The joint group positions should be updated successfully, and the Python process should continue running normally.
Actual behavior
Python terminates with a segmentation fault.
Backtrace or Console output
[INFO] [moveit_robot_model.robot_model]: Loading robot model 'm0609'...
Segmentation fault (core dumped)
Description
moveit_pycrashes with a segmentation fault when callingRobotState.set_joint_group_positions()orRobotState.set_joint_group_active_positions()from Python, even with a valid joint group name and a correctly sized NumPy array.I was able to reproduce this outside of
MoveItPyplanning/execution. The issue occurs with justRobotModel + RobotState, which suggests the problem is in the Python binding path for the joint-group setter methods.ROS Distro
Humble
OS and version
Ubuntu 22.04
Source or binary build?
Source
If binary, which release version?
No response
If source, which branch?
humble
Which RMW are you using?
None
Steps to Reproduce
I can reproduce the crash with a minimal script like this:
I also reproduced the same crash with:
Important notes:
I have not yet confirmed whether this reproduces with other robot configs (e.g., Panda), so this may be config/model-dependent or may expose a generic binding issue.
Expected behavior
The joint group positions should be updated successfully, and the Python process should continue running normally.
Actual behavior
Python terminates with a segmentation fault.
Backtrace or Console output
[INFO] [moveit_robot_model.robot_model]: Loading robot model 'm0609'...
Segmentation fault (core dumped)