slightech / MYNT-EYE-D-SDK

MYNT EYE D SDK (MYNT® EYE Depth Camera)
http://www.myntai.com/mynteye/depth
Other
99 stars 87 forks source link

imu and temp are not being published ROS. #57

Open saikishor opened 4 years ago

saikishor commented 4 years ago

Hello,

I have been trying your ros wrapper, it works like a charm, however, the imu and the temperature info has a publisher, but in reality it is not publishing anything. Moreover, this callback (https://github.com/slightech/MYNT-EYE-D-SDK/blob/master/wrappers/ros/src/mynteye_wrapper_d/src/mynteye_wrapper_nodelet.cc#L493) is not being called at any point of time, which is pretty important to publish the IMU and TEMPERATURE info. Any idea?.

flinnna commented 4 years ago

Hello, we can get imu and temperature info by subscribing imu and temperature nodes. rostopic echo /mynteye/imu/data_raw rostopic echo /mynteye/temp/data_raw

saikishor commented 4 years ago

@flinnna that's strange. The thing is I am seeing the publishers by rostopic, but no information is being published in the topics. For instance, this is what I see when i use rostopic hz to check the frequency of published messages. My device is MYNT-EYE-D model: D-1000-120 FOV

~/other_ws/mynt_ws/src$ rostopic hz /mynteye/imu/data_raw_processed
subscribed to [/mynteye/imu/data_raw_processed]
no new messages
no new messages

~/other_ws/mynt_ws/src$ rostopic hz /mynteye/imu/data_raw
subscribed to [/mynteye/imu/data_raw]
no new messages
no new messages

I am attaching my roslaunch log when i run the command roslaunch mynteye_wrapper_d display.launch. Can you see if something is different from yours.

Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://congo:46101/

SUMMARY
========

PARAMETERS
 * /mynteye/left/image_color/disable_pub_plugins: ['image_transport...
 * /mynteye/left/image_mono/disable_pub_plugins: ['image_transport...
 * /mynteye/right/image_color/disable_pub_plugins: ['image_transport...
 * /mynteye/right/image_mono/disable_pub_plugins: ['image_transport...
 * /mynteye_wrapper_d_node/base_frame: mynteye_link_frame
 * /mynteye_wrapper_d_node/color_mode: 0
 * /mynteye_wrapper_d_node/color_stream_format: 1
 * /mynteye_wrapper_d_node/depth_frame: mynteye_depth_frame
 * /mynteye_wrapper_d_node/depth_mode: 0
 * /mynteye_wrapper_d_node/depth_stream_format: 1
 * /mynteye_wrapper_d_node/depth_topic: mynteye/depth/ima...
 * /mynteye_wrapper_d_node/depth_type: 0
 * /mynteye_wrapper_d_node/dev_mode: 2
 * /mynteye_wrapper_d_node/framerate: 30
 * /mynteye_wrapper_d_node/gravity: 9.8
 * /mynteye_wrapper_d_node/imu_frame: mynteye_imu_frame
 * /mynteye_wrapper_d_node/imu_frame_processed: mynteye_imu_frame...
 * /mynteye_wrapper_d_node/imu_processed_topic: mynteye/imu/data_...
 * /mynteye_wrapper_d_node/imu_timestamp_align: True
 * /mynteye_wrapper_d_node/imu_topic: mynteye/imu/data_raw
 * /mynteye_wrapper_d_node/ir_depth_only: False
 * /mynteye_wrapper_d_node/ir_intensity: 4
 * /mynteye_wrapper_d_node/left_color_frame: mynteye_left_colo...
 * /mynteye_wrapper_d_node/left_color_topic: mynteye/left/imag...
 * /mynteye_wrapper_d_node/left_mono_frame: mynteye_left_mono...
 * /mynteye_wrapper_d_node/left_mono_topic: mynteye/left/imag...
 * /mynteye_wrapper_d_node/mesh_file: D-0315.obj
 * /mynteye_wrapper_d_node/points_factor: 1000.0
 * /mynteye_wrapper_d_node/points_frame: mynteye_points_frame
 * /mynteye_wrapper_d_node/points_frequency: 10
 * /mynteye_wrapper_d_node/points_topic: mynteye/points/da...
 * /mynteye_wrapper_d_node/right_color_frame: mynteye_right_col...
 * /mynteye_wrapper_d_node/right_color_topic: mynteye/right/ima...
 * /mynteye_wrapper_d_node/right_mono_frame: mynteye_right_mon...
 * /mynteye_wrapper_d_node/right_mono_topic: mynteye/right/ima...
 * /mynteye_wrapper_d_node/serial_number: 
 * /mynteye_wrapper_d_node/state_ae: True
 * /mynteye_wrapper_d_node/state_awb: True
 * /mynteye_wrapper_d_node/stream_mode: 3
 * /mynteye_wrapper_d_node/temp_frame: mynteye_temp_frame
 * /mynteye_wrapper_d_node/temp_topic: mynteye/temp/data...
 * /rosdistro: melodic
 * /rosversion: 1.14.3

NODES
  /
    b2d_broadcaster (tf/static_transform_publisher)
    b2imu_broadcaster (tf/static_transform_publisher)
    b2imu_processed_broadcaster (tf/static_transform_publisher)
    b2l_c_broadcaster (tf/static_transform_publisher)
    b2l_m_broadcaster (tf/static_transform_publisher)
    b2p_broadcaster (tf/static_transform_publisher)
    b2r_c_broadcaster (tf/static_transform_publisher)
    b2r_m_broadcaster (tf/static_transform_publisher)
    b2temp_broadcaster (tf/static_transform_publisher)
    mynteye_wrapper_d_node (mynteye_wrapper_d/mynteye_wrapper_d_node)
    rviz (rviz/rviz)

auto-starting new master
process[master]: started with pid [2111]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 7d52d134-05ed-11ea-a276-2c4d544ed170
process[rosout-1]: started with pid [2122]
started core service [/rosout]
process[b2l_m_broadcaster-2]: started with pid [2129]
process[b2l_c_broadcaster-3]: started with pid [2130]
process[b2r_m_broadcaster-4]: started with pid [2136]
process[b2r_c_broadcaster-5]: started with pid [2142]
process[b2d_broadcaster-6]: started with pid [2148]
process[b2p_broadcaster-7]: started with pid [2154]
process[b2imu_broadcaster-8]: started with pid [2160]
process[b2temp_broadcaster-9]: started with pid [2166]
process[b2imu_processed_broadcaster-10]: started with pid [2172]
process[mynteye_wrapper_d_node-11]: started with pid [2178]
[ INFO] [1573632818.759330861]: Initializing nodelet with 8 worker threads.
[ INFO] [1573632818.817537331]: base_frame: mynteye_link
[ INFO] [1573632818.817564950]: left_mono_frame: mynteye_left_mono_frame
[ INFO] [1573632818.817575888]: left_color_frame: mynteye_left_color_frame
[ INFO] [1573632818.817588458]: right_mono_frame: mynteye_right_mono_frame
[ INFO] [1573632818.817600923]: right_color_frame: mynteye_right_color_frame
[ INFO] [1573632818.817612644]: depth_frame: mynteye_depth_frame
[ INFO] [1573632818.817626148]: points_frame: mynteye_points_frame
[ INFO] [1573632818.817638276]: imu_frame: mynteye_imu_frame
[ INFO] [1573632818.817650299]: temp_frame: mynteye_temp_frame
[ INFO] [1573632818.817662048]: imu_frame_processed: mynteye_imu_frame_processed
I/eSPDI_API: eSPDI: EtronDI_InitunameData.release = 4.4.0-141-generic
version 4.4.0
process[rviz-12]: started with pid [2184]
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-user'
[ INFO] [1573632818.986237927]: rviz version 1.13.3
[ INFO] [1573632818.986263079]: compiled against Qt version 5.9.5
[ INFO] [1573632818.986270437]: compiled against OGRE version 1.9.0 (Ghadamon)
Camera 0 serial number : 20373347344D500400570045
[ INFO] [1573632819.394611533]: ------------------------------
[ INFO] [1573632819.394637324]: Device Information
[ INFO] [1573632819.394651336]: ------------------------------
[ INFO] [1573632819.394672995]: 0 | index: 0, name: /dev/video0, type: 2, pid: 0x120, vid: 0x1e4e, chip_id: 0x15, fw_version: SICI-B12-B0135P-016-006-Beta4-ISO_Plugout2M(Interleave), serial_number: 20373347344D500400570045
[ INFO] [1573632819.394683985]: ------------------------------
[ INFO] [1573632819.394696138]: Selected device : 0 with S/N : 20373347344D500400570045 for streaming information
[ INFO] [1573632819.394732375]: Color Stream Information
[ INFO] [1573632819.394789517]: ------------------------------
[ INFO] [1573632819.394808256]: 0 | index: 0, width: 1280, height: 720, format: STREAM_YUYV
[ INFO] [1573632819.394830730]: 1 | index: 1, width: 2560, height: 720, format: STREAM_YUYV
[ INFO] [1573632819.394845382]: 2 | index: 2, width: 2560, height: 960, format: STREAM_YUYV
[ INFO] [1573632819.394898103]: 3 | index: 3, width: 1280, height: 480, format: STREAM_YUYV
[ INFO] [1573632819.394907386]: 4 | index: 4, width: 640, height: 480, format: STREAM_YUYV
[ INFO] [1573632819.394913202]: 5 | index: 5, width: 1280, height: 720, format: STREAM_MJPG
[ INFO] [1573632819.394921147]: 6 | index: 6, width: 2560, height: 720, format: STREAM_MJPG
[ INFO] [1573632819.394930074]: 7 | index: 7, width: 2560, height: 960, format: STREAM_MJPG
[ INFO] [1573632819.394950194]: ------------------------------
[ INFO] [1573632819.394965778]: Depth Stream Information
[ INFO] [1573632819.394977494]: ------------------------------
[ INFO] [1573632819.394988016]: 0 | index: 0, width: 1280, height: 720, format: STREAM_YUYV
[ INFO] [1573632819.394998506]: 1 | index: 1, width: 640, height: 480, format: STREAM_YUYV
[ INFO] [1573632819.395043439]: ------------------------------
[ INFO] [1573632819.396066328]: Advertized service get_params
[ INFO] [1573632819.407342643]: Advertized on topic mynteye/left/image_mono
[ INFO] [1573632819.414688163]: Advertized on topic mynteye/left/image_color
[ INFO] [1573632819.421743597]: Advertized on topic mynteye/right/image_mono
[ INFO] [1573632819.428765842]: Advertized on topic mynteye/right/image_color
[ INFO] [1573632819.440378754]: Advertized on topic mynteye/depth/image_raw
[ INFO] [1573632819.440685440]: Advertized on topic mynteye/points/data_raw
[ INFO] [1573632819.440971521]: Advertized on topic mynteye/imu/data_raw
[ INFO] [1573632819.441251554]: Advertized on topic mynteye/imu/data_raw_processed
[ INFO] [1573632819.441535657]: Advertized on topic mynteye/temp/data_raw
D/eSPDI_API: SetPropertyValue control=7 value=0D/eSPDI_API: SetPropertyValue control=7 value=35D/eSPDI_API: SetPropertyValue control=7 value=1-- Auto-exposure state: enabled
D/eSPDI_API: SetPropertyValue control=7 value=0D/eSPDI_API: SetPropertyValue control=7 value=12D/eSPDI_API: SetPropertyValue control=7 value=1-- Auto-white balance state: enabled
-- Framerate: 30
D/eSPDI_API: SetPropertyValue control=7 value=7-- Color Stream: 2560x720 YUYV
-- Depth Stream: 1280x720 YUYV
D/eSPDI_API: SetPropertyValue control=7 value=0D/eSPDI_API: SetPropertyValue control=7 value=3D/eSPDI_API: SetPropertyValue control=7 value=4
-- IR intensity: 4
D/eSPDI_API: CVideoDevice::OpenDevice 2560x720 fps=30
D/eSPDI_API: CVideoDevice::OpenDevice 1280x720 fps=30
[ INFO] [1573632819.644561290]: Stereo is NOT SUPPORTED
[ INFO] [1573632819.645134759]: OpenGl version: 4.5 (GLSL 4.5).
[ INFO] [1573632825.413746499]: Open camera success
[ INFO] [1573632825.413805234]: Camera info is created
Error: Motion intrinsics not found
This device not supported to get motion intrinsics.

Please let me know.

flinnna commented 4 years ago

hello, D1200 support Android only.And this camera does not have imu module.

saikishor commented 4 years ago

@flinnna sorry, I mentioned it wrong, my device is D-1000-120 FOV. I believe this has IMU integrated.

saikishor commented 4 years ago

@flinnna If you can just review the log and let me know if something looks strange. It would be helpful. it's strange that I can't get the IMU data.

flinnna commented 4 years ago

emmmm, Error: Motion intrinsics not found This device not supported to get motion intrinsics. It seems like not have imu params.You can try ./samples/_output/bin/get_imu_params.

saikishor commented 4 years ago

@flinnna Thanks for the input. I have tried the commands and this is what I get. Can you take a look once.

For the command ./samples/_output/bin/get_imu, I get the following output:

I/eSPDI_API: eSPDI: EtronDI_InitunameData.release = 4.4.0-141-generic
version 4.4.0

Camera 0 serial number : 20373347344D500400570045
--------------------------------------------------------------------------------
Index | Device Information
--------------------------------------------------------------------------------
    0 | index: 0, name: /dev/video0, type: 2, pid: 0x120, vid: 0x1e4e, chip_id: 0x15, fw_version: SICI-B12-B0135P-016-006-Beta4-ISO_Plugout2M(Interleave), serial_number: 20373347344D500400570045
--------------------------------------------------------------------------------
Auto select a device to open, index: 0
--------------------------------------------------------------------------------
Index | Color Stream Information
--------------------------------------------------------------------------------
    0 | index: 0, width: 1280, height: 720, format: STREAM_YUYV
    1 | index: 1, width: 2560, height: 720, format: STREAM_YUYV
    2 | index: 2, width: 2560, height: 960, format: STREAM_YUYV
    3 | index: 3, width: 1280, height: 480, format: STREAM_YUYV
    4 | index: 4, width: 640, height: 480, format: STREAM_YUYV
    5 | index: 5, width: 1280, height: 720, format: STREAM_MJPG
    6 | index: 6, width: 2560, height: 720, format: STREAM_MJPG
    7 | index: 7, width: 2560, height: 960, format: STREAM_MJPG
--------------------------------------------------------------------------------
Index | Depth Stream Information
--------------------------------------------------------------------------------
    0 | index: 0, width: 1280, height: 720, format: STREAM_YUYV
    1 | index: 1, width: 640, height: 480, format: STREAM_YUYV
--------------------------------------------------------------------------------
Open device: 0, /dev/video0

Error: IMU is not supported on your device.

For the command ./samples/_output/bin/get_imu_params, I get the following output:

./samples/_output/bin/get_imu_params
I/eSPDI_API: eSPDI: EtronDI_InitunameData.release = 4.4.0-141-generic
version 4.4.0

Camera 0 serial number : 20373347344D500400570045
--------------------------------------------------------------------------------
Index | Device Information
--------------------------------------------------------------------------------
    0 | index: 0, name: /dev/video0, type: 2, pid: 0x120, vid: 0x1e4e, chip_id: 0x15, fw_version: SICI-B12-B0135P-016-006-Beta4-ISO_Plugout2M(Interleave), serial_number: 20373347344D500400570045
--------------------------------------------------------------------------------
Auto select a device to open, index: 0
--------------------------------------------------------------------------------
Index | Color Stream Information
--------------------------------------------------------------------------------
    0 | index: 0, width: 1280, height: 720, format: STREAM_YUYV
    1 | index: 1, width: 2560, height: 720, format: STREAM_YUYV
    2 | index: 2, width: 2560, height: 960, format: STREAM_YUYV
    3 | index: 3, width: 1280, height: 480, format: STREAM_YUYV
    4 | index: 4, width: 640, height: 480, format: STREAM_YUYV
    5 | index: 5, width: 1280, height: 720, format: STREAM_MJPG
    6 | index: 6, width: 2560, height: 720, format: STREAM_MJPG
    7 | index: 7, width: 2560, height: 960, format: STREAM_MJPG
--------------------------------------------------------------------------------
Index | Depth Stream Information
--------------------------------------------------------------------------------
    0 | index: 0, width: 1280, height: 720, format: STREAM_YUYV
    1 | index: 1, width: 640, height: 480, format: STREAM_YUYV
--------------------------------------------------------------------------------
Open device: 0, /dev/video0

D/eSPDI_API: SetPropertyValue control=7 value=0D/eSPDI_API: SetPropertyValue control=7 value=35D/eSPDI_API: SetPropertyValue control=7 value=1-- Auto-exposure state: enabled
D/eSPDI_API: SetPropertyValue control=7 value=0D/eSPDI_API: SetPropertyValue control=7 value=12D/eSPDI_API: SetPropertyValue control=7 value=1-- Auto-white balance state: enabled
-- Framerate: 10
D/eSPDI_API: SetPropertyValue control=7 value=7-- Color Stream: 1280x720 YUYV
-- Depth Stream: 1280x720 YUYV
D/eSPDI_API: SetPropertyValue control=7 value=0D/eSPDI_API: SetPropertyValue control=7 value=0D/eSPDI_API: SetPropertyValue control=7 value=0
-- IR intensity: 0
D/eSPDI_API: CVideoDevice::OpenDevice 1280x720 fps=10
D/eSPDI_API: CVideoDevice::OpenDevice 1280x720 fps=10

Open device success

Error: Motion intrinsics not found
This device not supported to get motion intrinsics.
Error: Motion extrinsics not found
This device not supported to get motion extrinsics.
jiziye commented 4 years ago

Perhaps you can refresh the main chip firmware and the auxiliary chip firmware. https://mynt-eye-d-sdk.readthedocs.io/en/latest/firmware/contents.html Then try to get the imu data. by the way, be sure to use the USB3.0 interface.

saikishor commented 4 years ago

@jiziye Thanks for the reply. I will try to do it and will keep you posted. Yes, I am using the device on USB 3.0.