I tried isaac_ros_foundationpose and the original FoundationPose, but when I input the same rgb, depth and mask images, they output different results. The original FoundationPose result (the left one) is perfect while the isaac_ros_foundationpose result (the right one) is not so good.
I deployed isaac_ros_foundationpose and converted the model to tensorrt according to the quickstart tutorial . The mask was obtained by a yolov8 model I trained myself. The rgb and depth images were obtained directly from rs_launch.launch.py of realsense-ros and the image size was 640x480.
The following is the launch file I created to launch the isaac_ros_foundationpose node:
from ament_index_python.packages import get_package_share_directory
import launch
from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription
from launch.launch_description_sources import PythonLaunchDescriptionSource
from launch.conditions import IfCondition, UnlessCondition
from launch.substitutions import LaunchConfiguration
from launch_ros.actions import ComposableNodeContainer, Node
from launch_ros.descriptions import ComposableNodeMESH_FILE_NAME = ‘/workspaces/isaac_ros-dev/isaac_ros_assets/isaac_ros_foundationpose/carton/zhonghua.obj’
TEXTURE_MAP_NAME = ‘/workspaces/isaac_ros-dev/isaac_ros_assets/isaac_ros_foundationpose/carton/assets/zhonghua_color.jpg’
REFINE_MODEL_NAME = ‘/tmp/refine_model.onnx’
REFINE_ENGINE_NAME = ‘/workspaces/isaac_ros-dev/isaac_ros_assets/models/foundationpose/refine_trt.plan’
SCORE_MODEL_NAME = ‘/tmp/score_model.onnx’
SCORE_ENGINE_NAME = ‘/workspaces/isaac_ros-dev/isaac_ros_assets/models/foundationpose/score_trt.plan’def generate_launch_description():
“”“Generate launch description for testing relevant nodes.”“”launch_args = [ DeclareLaunchArgument( 'mesh_file_path', default_value=MESH_FILE_NAME, description='The absolute file path to the mesh file'), DeclareLaunchArgument( 'texture_path', default_value=TEXTURE_MAP_NAME, description='The absolute file path to the texture map'), DeclareLaunchArgument( 'refine_model_file_path', default_value=REFINE_MODEL_NAME, description='The absolute file path to the refine model'), DeclareLaunchArgument( 'refine_engine_file_path', default_value=REFINE_ENGINE_NAME, description='The absolute file path to the refine trt engine'), DeclareLaunchArgument( 'score_model_file_path', default_value=SCORE_MODEL_NAME, description='The absolute file path to the score model'), DeclareLaunchArgument( 'score_engine_file_path', default_value=SCORE_ENGINE_NAME, description='The absolute file path to the score trt engine'), ] mesh_file_path = LaunchConfiguration('mesh_file_path') texture_path = LaunchConfiguration('texture_path') refine_model_file_path = LaunchConfiguration('refine_model_file_path') refine_engine_file_path = LaunchConfiguration('refine_engine_file_path') score_model_file_path = LaunchConfiguration('score_model_file_path') score_engine_file_path = LaunchConfiguration('score_engine_file_path') # Realsense depth is in uint16 and millimeters. Convert to float32 and meters convert_metric_node = ComposableNode( package='isaac_ros_depth_image_proc', plugin='nvidia::isaac_ros::depth_image_proc::ConvertMetricNode', remappings=[ ('image_raw', 'camera/aligned_depth_to_color/image_raw'), ('image', 'depth_fp32') ] ) foundationpose_node = ComposableNode( name='foundationpose', package='isaac_ros_foundationpose', plugin='nvidia::isaac_ros::foundationpose::FoundationPoseNode', parameters=[{ 'mesh_file_path': mesh_file_path, 'texture_path': texture_path, 'refine_model_file_path': refine_model_file_path, 'refine_engine_file_path': refine_engine_file_path, 'refine_input_tensor_names': ['input_tensor1', 'input_tensor2'], 'refine_input_binding_names': ['input1', 'input2'], 'refine_output_tensor_names': ['output_tensor1', 'output_tensor2'], 'refine_output_binding_names': ['output1', 'output2'], 'score_model_file_path': score_model_file_path, 'score_engine_file_path': score_engine_file_path, 'score_input_tensor_names': ['input_tensor1', 'input_tensor2'], 'score_input_binding_names': ['input1', 'input2'], 'score_output_tensor_names': ['output_tensor'], 'score_output_binding_names': ['output1'], 'refine_iterations': 1, }], remappings=[ ('pose_estimation/depth_image', 'depth_fp32'), ('pose_estimation/image', 'camera/color/image_raw'), ('pose_estimation/camera_info', 'camera/color/camera_info'), ('pose_estimation/segmentation', 'mask'), ('pose_estimation/output', 'output')] ) foundationpose_container = ComposableNodeContainer( name='foundationpose_container', namespace='foundationpose_container', package='rclcpp_components', executable='component_container_mt', composable_node_descriptions=[convert_metric_node, foundationpose_node], output='screen' ) return launch.LaunchDescription(launch_args + [foundationpose_container])
Just in case, the following is the log file of the foundationpose node.
foundationpose.log (9.2 KB)
Any help would be greatly appreciated.