NVIDIA-ISAAC-ROS / isaac_ros_cumotion

NVIDIA-accelerated packages for arm motion planning and control
https://developer.nvidia.com/isaac-ros-gems
Other
51 stars 6 forks source link

Unable to start the cuMotion planner node #7

Closed tfuru-macnica closed 1 week ago

tfuru-macnica commented 1 month ago

Hi. I have tried the Quickstart of isaac_ros_cumotion_moveit on Jetson AGX Orin dev kit (32GB) with JetPack 6.0GA, but I have been unable to start the cuMotion planner node for both Universal Robot and Franka for the following error. Please advise me on how to fix this issue.

admin@jao-desktop:/workspaces/isaac_ros-dev$ ros2 run isaac_ros_cumotion cumotion_planner_node --ros-args -p robot:=ur10e.xrdf -p urdf_path:=${ISAAC_ROS_WS}/isaac_ros_assets/urdf/ur10e.urdf

A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.0.0 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.

If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.

Traceback (most recent call last):  File "/opt/ros/humble/lib/isaac_ros_cumotion/cumotion_planner_node", line 33, in <module>
    sys.exit(load_entry_point('isaac-ros-cumotion==3.0.0', 'console_scripts', 'cumotion_planner_node')())
  File "/opt/ros/humble/lib/isaac_ros_cumotion/cumotion_planner_node", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 171, in load
    module = import_module(match.group('module'))
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/opt/ros/humble/lib/python3.10/site-packages/isaac_ros_cumotion/cumotion_planner.py", line 14, in <module>
    from curobo.geom.sdf.world import CollisionCheckerType
  File "/opt/ros/humble/lib/python3.10/site-packages/curobo/geom/sdf/world.py", line 18, in <module>
    import torch
  File "/usr/local/lib/python3.10/dist-packages/torch/__init__.py", line 1417, in <module>
    from .functional import *  # noqa: F403
  File "/usr/local/lib/python3.10/dist-packages/torch/functional.py", line 7, in <module>
    import torch.nn.functional as F
  File "/usr/local/lib/python3.10/dist-packages/torch/nn/__init__.py", line 1, in <module>
    from .modules import *  # noqa: F403
  File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/__init__.py", line 35, in <module>
    from .transformer import TransformerEncoder, TransformerDecoder, \
  File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/transformer.py", line 20, in <module>
    device: torch.device = torch.device(torch._C._get_default_device()),  # torch.device('cpu'),
/usr/local/lib/python3.10/dist-packages/torch/nn/modules/transformer.py:20: UserWarning: Failed to initialize NumPy: _ARRAY_API not found (Triggered internally at /opt/pytorch/pytorch/torch/csrc/utils/tensor_numpy.cpp:84.)
  device: torch.device = torch.device(torch._C._get_default_device()),  # torch.device('cpu'),
[INFO] [1720584889.840185723] [cumotion_action_server]: Loaded robot file name: ur10e.xrdf
[INFO] [1720584889.841198618] [cumotion_action_server]: warming up cuMotion, wait until ready
Traceback (most recent call last):
  File "/opt/ros/humble/lib/isaac_ros_cumotion/cumotion_planner_node", line 33, in <module>
    sys.exit(load_entry_point('isaac-ros-cumotion==3.0.0', 'console_scripts', 'cumotion_planner_node')())
  File "/opt/ros/humble/lib/python3.10/site-packages/isaac_ros_cumotion/cumotion_planner.py", line 711, in main
    cumotion_action_server = CumotionActionServer()
  File "/opt/ros/humble/lib/python3.10/site-packages/isaac_ros_cumotion/cumotion_planner.py", line 159, in __init__
    self.warmup()
  File "/opt/ros/humble/lib/python3.10/site-packages/isaac_ros_cumotion/cumotion_planner.py", line 226, in warmup
    motion_gen_config = MotionGenConfig.load_from_robot_config(
  File "/opt/ros/humble/lib/python3.10/site-packages/curobo/wrap/reacher/motion_gen.py", line 639, in load_from_robot_config
    ik_solver_cfg = IKSolverConfig.load_from_robot_config(
  File "/usr/lib/python3.10/contextlib.py", line 79, in inner
    return func(*args, **kwds)
  File "/opt/ros/humble/lib/python3.10/site-packages/curobo/wrap/reacher/ik_solver.py", line 293, in load_from_robot_config
    grad_cfg = ArmReacherConfig.from_dict(
  File "/usr/lib/python3.10/contextlib.py", line 79, in inner
    return func(*args, **kwds)
  File "/opt/ros/humble/lib/python3.10/site-packages/curobo/rollout/arm_base.py", line 195, in from_dict
    cost = cls.cost_from_dict(
  File "/opt/ros/humble/lib/python3.10/site-packages/curobo/rollout/arm_reacher.py", line 141, in cost_from_dict
    return ArmReacherCostConfig.from_dict(
  File "/opt/ros/humble/lib/python3.10/site-packages/curobo/rollout/arm_reacher.py", line 118, in from_dict
    data = ArmCostConfig._get_formatted_dict(
  File "/opt/ros/humble/lib/python3.10/site-packages/curobo/rollout/arm_base.py", line 94, in _get_formatted_dict
    data[k] = cost_key_list[k](**data_dict[k], tensor_args=tensor_args)
  File "<string>", line 18, in __init__
  File "/opt/ros/humble/lib/python3.10/site-packages/curobo/rollout/cost/dist_cost.py", line 42, in __post_init__
    return super().__post_init__()
  File "/opt/ros/humble/lib/python3.10/site-packages/curobo/rollout/cost/cost_base.py", line 39, in __post_init__
    self.weight = self.tensor_args.to_device(self.weight)
  File "/opt/ros/humble/lib/python3.10/site-packages/curobo/types/base.py", line 35, in to_device
    return torch.as_tensor(np.array(data_tensor), device=self.device, dtype=self.dtype)
TypeError: len() of unsized object
[ros2run]: Process exited with failure 1
Sanjay1911 commented 2 weeks ago

Try pip install "numpy<2" before ros2 launch

tfuru-macnica commented 1 week ago

@Sanjay1911 Thank you! It has worked.