Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't build mesh with Intel RealSense D435i #182

Open
Breno-de-Angelo opened this issue Jan 12, 2023 · 1 comment
Open

Can't build mesh with Intel RealSense D435i #182

Breno-de-Angelo opened this issue Jan 12, 2023 · 1 comment

Comments

@Breno-de-Angelo
Copy link

Description:
I installed Kimera-VIO-ROS following the installation README and solved compiling errors with the instructions in this issue #180 . The camera seems to be working properly, I can see both the RGB and depth images in rviz, but mesh is not being generated. I used the commands below and got all 0s in the statistics that are printed to the console. I tried modifying kimera_vio_ros.launch file matching the subscribed topics to the camera topics, but, as shown in "Console output", it didn't help.

Command:

roscore
roslaunch realsense2_camera rs_camera.launch enable_gyro:=true enable_accel:=true enable_infra1:=true enable_infra2:=true unite_imu_method:=linear_interpolation infra_width:=848 infra_height:=480 infra_fps:=30
roslaunch kimera_vio_ros kimera_vio_ros_realsense_IR.launch
rviz -d $(rospack find kimera_semantics_ros)/rviz/kimera_realsense_metric.rviz

Console output:

$ roslaunch kimera_vio_ros kimera_vio_ros_realsense_IR.launch online:=true should_use_sim_time:=false
... logging to /home/breno/.ros/log/9c8691b4-902b-11ed-adc9-7404f15057d0/roslaunch-breno-Predator-PH315-54-25053.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://breno-Predator-PH315-54:44621/

SUMMARY
========

PARAMETERS
 * /kimera_vio_ros/kimera_vio_ros_node/base_link_frame_id: base_link
 * /kimera_vio_ros/kimera_vio_ros_node/left_cam_frame_id: left_cam
 * /kimera_vio_ros/kimera_vio_ros_node/map_frame_id: map
 * /kimera_vio_ros/kimera_vio_ros_node/mono_ransac_threshold: 30
 * /kimera_vio_ros/kimera_vio_ros_node/online_run: True
 * /kimera_vio_ros/kimera_vio_ros_node/params_folder_path: /home/breno/kimer...
 * /kimera_vio_ros/kimera_vio_ros_node/position_det_threshold: 0.3
 * /kimera_vio_ros/kimera_vio_ros_node/right_cam_frame_id: right_cam
 * /kimera_vio_ros/kimera_vio_ros_node/stereo_ransac_threshold: 20
 * /kimera_vio_ros/kimera_vio_ros_node/use_lcd: False
 * /kimera_vio_ros/kimera_vio_ros_node/use_online_cam_params: False
 * /kimera_vio_ros/kimera_vio_ros_node/velocity_det_threshold: 0.1
 * /kimera_vio_ros/kimera_vio_ros_node/world_frame_id: world
 * /kimera_vio_ros/posegraph_viewer/frame_id: world
 * /rosdistro: melodic
 * /rosversion: 1.14.13
 * /use_sim_time: False

NODES
  /
    velo_link_broadcaster (tf/static_transform_publisher)
  /kimera_vio_ros/
    kimera_vio_ros_node (kimera_vio_ros/kimera_vio_ros_node)
    posegraph_viewer (pose_graph_tools/visualizer_node)

ROS_MASTER_URI=http://localhost:11311

process[kimera_vio_ros/kimera_vio_ros_node-1]: started with pid [25068]
process[kimera_vio_ros/posegraph_viewer-2]: started with pid [25069]
process[velo_link_broadcaster-3]: started with pid [25070]
[ INFO] [1673275334.203140580]: Initializing pose graph visualizer
I0109 11:42:14.301340 25068 RegularVioBackend.cpp:114] Using Regular VIO Backend.
I0109 11:42:14.301426 25068 PipelineModule.h:449] MISO Pipeline Module: Display has no output queue registered.
I0109 11:42:14.301515 25068 Pipeline.cpp:296] Pipeline Modules launched (parallel_run set to 1).
I0109 11:42:14.301661 25093 Pipeline.cpp:89] Spinning Kimera-VIO.
I0109 11:42:14.301643 25068 KimeraVioRos.cpp:137] Statistics
-----------                                  #	Log Hz	{avg     +- std    }	[min,max]
Mesher [ms]                             	    0	
VioBackend [ms]                         	    0	
VioFrontend [ms]                        	    0	
Visualizer [ms]                         	    0	
backend_input_queue Size [#]            	    0	
data_provider_left_frame_queue Size [#] 	    0	
data_provider_right_frame_queue Size [#]	    0	
display_input_queue Size [#]            	    0	
frontend_input_queue Size [#]           	    0	
mesher_backend Size [#]                 	    0	
mesher_frontend Size [#]                	    0	
visualizer_backend_queue Size [#]       	    0	
visualizer_frontend_queue Size [#]      	    0	
visualizer_mesher_queue Size [#]        	    0	
I0109 11:42:15.301731 25068 KimeraVioRos.cpp:137] Statistics
-----------                                  #	Log Hz	{avg     +- std    }	[min,max]
Display [ms]                            	    0	
Mesher [ms]                             	    0	
Stereo Data Provider [ms]               	    0	
VioBackend [ms]                         	    0	
VioFrontend [ms]                        	    0	
Visualizer [ms]                         	    0	
backend_input_queue Size [#]            	    0	
data_provider_left_frame_queue Size [#] 	   25	25.5505	{1.00000 +- 0.00000}	[1,1]
data_provider_right_frame_queue Size [#]	   25	25.5480	{13.0000 +- 7.35980}	[1,25]
display_input_queue Size [#]            	    0	
frontend_input_queue Size [#]           	    0	
mesher_backend Size [#]                 	    0	
mesher_frontend Size [#]                	    0	
visualizer_backend_queue Size [#]       	    0	
visualizer_frontend_queue Size [#]      	    0	
visualizer_mesher_queue Size [#]        	    0	
I0109 11:42:16.301743 25068 KimeraVioRos.cpp:137] Statistics
-----------                                  #	Log Hz	{avg     +- std    }	[min,max]
Display [ms]                            	    0	
Mesher [ms]                             	    0	
Stereo Data Provider [ms]               	    0	
VioBackend [ms]                         	    0	
VioFrontend [ms]                        	    0	
Visualizer [ms]                         	    0	
backend_input_queue Size [#]            	    0	
data_provider_left_frame_queue Size [#] 	   55	27.7900	{1.00000 +- 0.00000}	[1,1]
data_provider_right_frame_queue Size [#]	   55	27.7888	{28.0000 +- 16.0208}	[1,55]
display_input_queue Size [#]            	    0	
frontend_input_queue Size [#]           	    0	
mesher_backend Size [#]                 	    0	
mesher_frontend Size [#]                	    0	
visualizer_backend_queue Size [#]       	    0	
visualizer_frontend_queue Size [#]      	    0	
visualizer_mesher_queue Size [#]        	    0	
I0109 11:42:17.301785 25068 KimeraVioRos.cpp:137] Statistics

Additional files:
kimera_vio_ros.launch.txt
The change in the file above was replacing

  <!-- Subscribed Topics -->
  <arg name="left_cam_topic"                    default="/cam0/image_raw"/>
  <arg name="left_cam_info_topic"               default="/cam0/camera_info"/>
  <arg name="right_cam_topic"                   default="/cam1/image_raw"/>
  <arg name="right_cam_info_topic"              default="/cam1/camera_info"/>
  <arg name="imu_topic"                         default="/imu0"/>

by

  <!-- Subscribed Topics -->
  <arg name="left_cam_topic"                    default="/camera/infra1/image_rect_raw"/>
  <arg name="left_cam_info_topic"               default="/cam0/camera_info"/>
  <arg name="right_cam_topic"                   default="/camera/infra2/image_rect_raw"/>
  <arg name="right_cam_info_topic"              default="/cam1/camera_info"/>
  <arg name="imu_topic"                         default="/camera/imu"/>
  • KimeraVIO branch, tag or commit used:
  • GTSAM version used:
  • OpenGV version used:
  • OpenCV version used: type opencv_version
  • Operating system and version (e.g. Ubuntu 16.04 or Windows 10): Ubuntu 18.04
  • Did you change the source code? (yes / no): Only the file attached
@DragonOnGit
Copy link

hi there, the problem you faced is use the wrong camera info topic here:

<!-- Subscribed Topics -->
<arg name="left_cam_topic"                    default="/camera/infra1/image_rect_raw"/>
<arg name="left_cam_info_topic"               default="/cam0/camera_info"/>
<arg name="right_cam_topic"                   default="/camera/infra2/image_rect_raw"/>
<arg name="right_cam_info_topic"              default="/cam1/camera_info"/>
<arg name="imu_topic"                         default="/camera/imu"/>

and i recommend you change the topic in the file named kimera_vio_ros_realsense_IR.launch by the following codes:

      <param name="input_camera_info_from_ros_params" value="false"/>

      <param name="first_camera_namespace"  value="/camera/infra1"/>
      <param name="second_camera_namespace" value="/camera/infra2"/>
      <param name="first_camera_info"  value="/camera/infra1/camera_info"/>
      <param name="second_camera_info"  value="/camera/infra2/camera_info"/>
      <param name="first_output_frame"      value="left_cam_base_link"/>
      <param name="second_output_frame"     value="right_cam_base_link"/>

this may solve your problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants