-
Notifications
You must be signed in to change notification settings - Fork 169
Open
Labels
needs infoNeeds more informationNeeds more information
Description
I want to test isaac_ros_visual_slam in isaacsim, but I encountered the following error.

-
isaacsim version: 4.5
-
isaacsim usd: nvblox_sample_scene.usd
-
system env: ubuntu22.04 + 4090(laptop)
-
use docker: isaac_ros_dev-x86_64 latest
for run, I modified some code:
def generate_launch_description():
"""Launch file which brings up visual slam node configured for Isaac Sim."""
visual_slam_node = ComposableNode(
name='visual_slam_node',
package='isaac_ros_visual_slam',
plugin='nvidia::isaac_ros::visual_slam::VisualSlamNode',
remappings=[('visual_slam/image_0', 'front_stereo_camera/left/image_raw'), // change the topoic name
('visual_slam/camera_info_0', 'front_stereo_camera/left/camera_info'),
('visual_slam/image_1', 'front_stereo_camera/right/image_raw'), // change the topoic name
('visual_slam/camera_info_1', 'front_stereo_camera/right/camera_info')],
parameters=[{
'use_sim_time': True,
'enable_image_denoising': True,
'rectified_images': True,
'enable_slam_visualization': True,
'enable_observations_view': True,
'enable_landmarks_view': True,
}])
visual_slam_launch_container = ComposableNodeContainer(
name='visual_slam_launch_container',
namespace='',
package='rclcpp_components',
executable='component_container',
composable_node_descriptions=[
visual_slam_node,
],
output='screen',
)
return launch.LaunchDescription([visual_slam_launch_container])
and
void FillCameraDistortion(const CameraInfoType::ConstSharedPtr & msg, CUVSLAM_Camera & camera)
{
// Fallback to pinhole distortion if no distortion was provided.
std::string distortion_model_name = msg->distortion_model;
const auto distortion_params = msg->d.data();
if (distortion_model_name.empty() &&
Eigen::Vector3d(distortion_params).isZero())
{
distortion_model_name = "plumb_bob";
}
if (distortion_model_name == sensor_msgs::distortion_models::PLUMB_BOB) {
return FillDistortion<DistortionModel::BROWN>(msg, camera);
}
if (distortion_model_name == sensor_msgs::distortion_models::EQUIDISTANT) {
return FillDistortion<DistortionModel::FISHEYE>(msg, camera);
}
if (distortion_model_name == "pinhole") { // before this is "plumb_bob", I think this is a bug.
return FillDistortion<DistortionModel::PINHOLE>(msg, camera);
}
if (distortion_model_name == sensor_msgs::distortion_models::RATIONAL_POLYNOMIAL) {
return FillDistortion<DistortionModel::RATIONAL_POLYNOMIAL>(msg, camera);
}
throw std::runtime_error("Unsupported distortion model.");
}
camera_info topic:
ros2 topic echo /front_stereo_camera/left/camera_info --once
header:
stamp:
sec: 297
nanosec: 766682196
frame_id: front_stereo_camera_left_optical
height: 480
width: 640
distortion_model: pinhole
d:
- 0.14781099557876587
- -0.03231300041079521
- -0.0001939999929163605
- -3.5000000934815034e-05
- 0.008822999894618988
- 0.5179129838943481
- -0.06707999855279922
- 0.016950000077486038
k:
- 319.2705186497959
- 0.0
- 320.0
- 0.0
- 319.2705186497959
- 240.0
- 0.0
- 0.0
- 1.0
r:
- 1.0
- 0.0
- 0.0
- 0.0
- 1.0
- 0.0
- 0.0
- 0.0
- 1.0
p:
- 319.5230171605077
- 0.0
- 319.52310943603516
- 0.0
- 0.0
- 319.5230171605077
- 238.17369842529297
- 0.0
- 0.0
- 0.0
- 1.0
- 0.0
binning_x: 0
binning_y: 0
roi:
x_offset: 0
y_offset: 0
height: 0
width: 0
do_rectify: false
---
other topic:
> ros2 topic list
/back_stereo_imu/imu
/chassis/imu
/chassis/odom
/clock
/cmd_vel
/front_stereo_camera/depth/ground_truth
/front_stereo_camera/left/camera_info
/front_stereo_camera/left/image_raw
/front_stereo_camera/right/camera_info
/front_stereo_camera/right/image_raw
/front_stereo_camera/semantic_labels
/front_stereo_camera/semantics/ground_truth
/front_stereo_imu/imu
/left_stereo_camera/depth/ground_truth
/left_stereo_camera/left/camera_info
/left_stereo_camera/left/image_raw
/left_stereo_camera/right/camera_info
/left_stereo_camera/right/image_raw
/left_stereo_camera/semantic_labels
/left_stereo_camera/semantics/ground_truth
/left_stereo_imu/imu
/parameter_events
/right_stereo_camera/depth/ground_truth
/right_stereo_camera/left/camera_info
/right_stereo_camera/left/image_raw
/right_stereo_camera/right/camera_info
/right_stereo_camera/right/image_raw
/right_stereo_camera/semantic_labels
/right_stereo_camera/semantics/ground_truth
/right_stereo_imu/imu
/rosout
/tf
run cmd:
ros2 launch isaac_ros_visual_slam isaac_ros_visual_slam_isaac_sim.launch.py
Metadata
Metadata
Assignees
Labels
needs infoNeeds more informationNeeds more information