FoundationPoseROS2 is a ROS2-integrated system for 6D object pose estimation and tracking, based on the FoundationPose architecture. It uses RealSense2 with the Segment Anything Model 2 (SAM2) framework for end-to-end, model-based, real-time pose estimation and tracking of novel objects.
Hi, I select an object and then select input, but it results in a runtime error. Terminal Information (foundationpose_ros2) a@robot:/data/project/FoundationPoseROS2$ python ./foundationpose_ros_multi.py Warp 1.3.1 initialized: CUDA Toolkit 12.5, Driver 12.4 Devices: "cpu" : "x86_64" "cuda:0" : "NVIDIA RTX A6000" (47 GiB, sm_86, mempool enabled) "cuda:1" : "NVIDIA RTX A6000" (47 GiB, sm_86, mempool enabled) CUDA peer access: Supported fully (all-directional) Kernel cache: /home/a/.cache/warp/1.3.1 [init()] self.cfg: lr: 0.0001 c_in: 6 zfar: 'Infinity' debug: null n_view: 1 run_id: 3wy8qqex use_BN: true exp_name: 2024-01-11-20-02-45 n_epochs: 62 save_dir: /home/bowenw/debug/2024-01-11-20-02-45/ use_mask: false loss_type: pairwise_valid optimizer: adam batch_size: 64 crop_ratio: 1.1 enable_amp: true use_normal: false max_num_key: null warmup_step: -1 input_resize:
[init()] self.h5_file:None [init()] Using pretrained model from /data/project/FoundationPoseROS2/FoundationPose/learning/training/../../weights/2024-01-11-20-02-45/model_best.pth [init()] init done [init()] welcome [init()] self.cfg: lr: 0.0001 c_in: 6 zfar: .inf debug: null w_rot: 0.1 n_view: 1 run_id: null use_BN: true rot_rep: axis_angle ckpt_dir: /data/project/FoundationPoseROS2/FoundationPose/learning/training/../../weights/2023-10-28-18-33-37/model_best.pth exp_name: 2023-10-28-18-33-37 save_dir: /tmp/2023-10-28-18-33-37/ loss_type: l2 optimizer: adam trans_rep: tracknet batch_size: 64 crop_ratio: 1.2 use_normal: false BN_momentum: 0.1 max_num_key: null warmup_step: -1 input_resize:
[init()] self.h5_file: [init()] Using pretrained model from /data/project/FoundationPoseROS2/FoundationPose/learning/training/../../weights/2023-10-28-18-33-37/model_best.pth [init()] init done [INFO] [1732369121.290993259] [pose_estimation_node]: Camera intrinsic matrix initialized: [[ 895.45 0 649.12] [ 0 896.3 359.8] [ 0 0 1]]
0: 1024x1024 1 0, 1 1, 1 2, 1 3, 1 4, 1 5, 1 6, 1 7, 1 8, 1 9, 1 10, 1 11, 2762.4ms Speed: 21.3ms preprocess, 2762.4ms inference, 0.7ms postprocess per image at shape (1, 3, 1024, 1024) [INFO] [1732369129.194321491] [pose_estimation_node]: Object 0 selected. Traceback (most recent call last): File "/data/project/FoundationPoseROS2/./foundationpose_ros_multi.py", line 236, in click_event model_pts=temp_mesh.vertices, AttributeError: 'Scene' object has no attribute 'vertices' [INFO] [1732369136.964438968] [pose_estimation_node]: Object 1 selected. [reset_object()] self.diameter:0.2973231969400526, vox_size:0.01486615984700263 [reset_object()] self.pts:torch.Size([528, 3]) [reset_object()] reset done [make_rotation_grid()] cam_in_obs:(42, 4, 4) [make_rotation_grid()] rot_grid:(252, 4, 4) num original candidates = 252 num of pose after clustering: 252 [make_rotation_grid()] after cluster, rot_grid:(252, 4, 4) [make_rotation_grid()] self.rot_grid: torch.Size([252, 4, 4]) [register()] Welcome Module Utils 64702ec load on device 'cuda:0' took 0.40 ms (cached) [register()] valid too small, return [guess_translation()] valid is empty [track_one()] Please init pose by register first Traceback (most recent call last): File "/data/project/FoundationPoseROS2/./foundationpose_ros_multi.py", line 394, in
main()
File "/data/project/FoundationPoseROS2/./foundationpose_ros_multi.py", line 389, in main
rclpy.spin(node)
File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/init.py", line 222, in spin
executor.spin_once()
File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 739, in spin_once
self._spin_once_impl(timeout_sec)
File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 736, in _spin_once_impl
raise handler.exception()
File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/task.py", line 239, in call
self._handler.send(None)
File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 437, in handler
await call_coroutine(entity, arg)
File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 362, in _execute_subscription
await await_or_execute(sub.callback, msg)
File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 107, in await_or_execute
return callback(*args)
File "/data/project/FoundationPoseROS2/./foundationpose_ros_multi.py", line 165, in depth_callback
self.process_images()
File "/data/project/FoundationPoseROS2/./foundationpose_ros_multi.py", line 326, in process_images
pose = pose_est.track_one(rgb=color, depth=depth, K=self.cam_K, iteration=args.track_refine_iter)
File "/data/project/FoundationPoseROS2/./FoundationPose/estimater.py", line 253, in track_one
raise RuntimeError
RuntimeError