rickstaa / realsense-ros-gazebo

Gazebo implementation of the realsense-ros repository
45 stars 8 forks source link

Add imu support for the 435i camera #3

Open naoya-kumagai opened 2 years ago

naoya-kumagai commented 2 years ago

Hi! Great repo!

When I launch the following launch file

roslaunch realsense2_description view_d435i_model_rviz_gazebo.launch

the output of

rostopic list

is

/camera/color/camera_info /camera/color/image_raw /camera/color/image_raw/compressed /camera/color/image_raw/compressed/parameter_descriptions /camera/color/image_raw/compressed/parameter_updates /camera/color/image_raw/compressedDepth /camera/color/image_raw/compressedDepth/parameter_descriptions /camera/color/image_raw/compressedDepth/parameter_updates /camera/color/image_raw/theora /camera/color/image_raw/theora/parameter_descriptions /camera/color/image_raw/theora/parameter_updates /camera/depth/camera_info /camera/depth/color/points /camera/depth/image_raw /camera/depth/image_raw/compressed /camera/depth/image_raw/compressed/parameter_descriptions /camera/depth/image_raw/compressed/parameter_updates /camera/depth/image_raw/compressedDepth /camera/depth/image_raw/compressedDepth/parameter_descriptions /camera/depth/image_raw/compressedDepth/parameter_updates /camera/depth/image_raw/theora /camera/depth/image_raw/theora/parameter_descriptions /camera/depth/image_raw/theora/parameter_updates /camera/infra1/camera_info /camera/infra1/image_raw /camera/infra1/image_raw/compressed /camera/infra1/image_raw/compressed/parameter_descriptions /camera/infra1/image_raw/compressed/parameter_updates /camera/infra1/image_raw/compressedDepth /camera/infra1/image_raw/compressedDepth/parameter_descriptions /camera/infra1/image_raw/compressedDepth/parameter_updates /camera/infra1/image_raw/theora /camera/infra1/image_raw/theora/parameter_descriptions /camera/infra1/image_raw/theora/parameter_updates /camera/infra2/camera_info /camera/infra2/image_raw /camera/infra2/image_raw/compressed /camera/infra2/image_raw/compressed/parameter_descriptions /camera/infra2/image_raw/compressed/parameter_updates /camera/infra2/image_raw/compressedDepth /camera/infra2/image_raw/compressedDepth/parameter_descriptions /camera/infra2/image_raw/compressedDepth/parameter_updates /camera/infra2/image_raw/theora /camera/infra2/image_raw/theora/parameter_descriptions /camera/infra2/image_raw/theora/parameter_updates /clicked_point /clock /gazebo/link_states /gazebo/model_states /gazebo/parameter_descriptions /gazebo/parameter_updates /gazebo/performance_metrics /gazebo/set_link_state /gazebo/set_model_state /initialpose /joint_states /move_base_simple/goal /rosout /rosout_agg /tf /tf_static

I was expecting to see imu data below. /camera/gyro/imu_info /camera/gyro/sample /camera/accel/imu_info

How do I get the imu data?

rickstaa commented 2 years ago

@naoya-kumagai Thanks for opening up this issue. I looked through the code, and it looks like the IMU has not yet been implemented.

This is because the gazebo simulation in this repository uses the topics that are published by the realsense_gazebo_plugin (see _d435.gazebo.xacro#L120-L144). As a result, these topics first need to be made available in the pal-robotics/realsense_gazebo_plugin before we can add them to the gazebo simulation.

I would therefore advise you to open a new issue in the pal-robotics/realsense_gazebo_plugin repository or create a pull request yourself. After the topics are published, we can add them to the gazebo simulation.

rickstaa commented 2 years ago

@naoya-kumagai Please feel to reopen this issue might the IMU feature be implemented in the upstream.

rickstaa commented 2 years ago

@naoya-kumagai Looks like there is already a pull request for this feature https://github.com/pal-robotics/realsense_gazebo_plugin/pull/22. Let's keep this open till the pull request is merged.