ROBOTIS-JAPAN-GIT / turtlebot3_slam_3d

Turtlebot3 3D-SLAM demo using RTAB-Map with Jetson TX2 and ZED Mini
176 stars 62 forks source link

low fps, rtabmap parameters #7

Closed jungladicitta closed 4 years ago

jungladicitta commented 4 years ago

hello! I've got jetson tx2 and d435 camera and I tried to run rtabmap from your repo but I have got very low fps of mapCloud. Approximately 1 refresh per 2 seconds. What is your fps? What do you think, is this because i dont have wheels yet so i am publishing zeros in odom topic? I dont have wheels yet, so i am publishing zeros to odom topic and it means that my camera is not moving. What do you think, could it be the problem? here is my launch files: launch files

Affonso-Gui commented 4 years ago

I don't quite remember how was our frequency, but I think it was somewhat low as well.

@t-kitajima Can I ask for further check?

t-kitajima commented 4 years ago

@jungladicitta @Affonso-Gui I will check it, so please take a moment.

robograffitti commented 4 years ago

@jungladicitta It doesn't matter for low refresh rate of map cloud. It was around 1 hz. However, publish rate of odometry and tf should be fast enough. If you have any other problem related to rtabmap, ask in their repository.

jungladicitta commented 4 years ago

@t-kitajima ok, thanks! Maybe you have some video of your screen with rviz, I'll appreciate if you can send me some. Do you run rviz on remote computer? If you do, do you use ethernet cable or wi-fi?

jungladicitta commented 4 years ago

@yoshimalucky how fast should be input topics for rtabmap? Around 100 Hz?

Affonso-Gui commented 4 years ago

@jungladicitta The input rates of the topics are recorded in our bag files https://github.com/ROBOTIS-JAPAN-GIT/turtlebot3_slam_3d#launching-demo-program. You can get the exact values by playing them :+1:

We ran rviz on the remote computer with wi-fi connection.

t-kitajima commented 4 years ago

@jungladicitta

For your information, the video when using ZED mini is up below. Mapping : TB3 + TX2 + ZED mini + RTAB-Map

jungladicitta commented 4 years ago

@Affonso-Gui @yoshimalucky here is input rates from full version of bag file:

nvidia@tegra-ubuntu:~$ rostopic hz /stereo_camera/left/camera_info 
subscribed to [/stereo_camera/left/camera_info]
WARNING: may be using simulated time
average rate: 17.085
    min: 0.050s max: 0.062s std dev: 0.00441s window: 16
average rate: 17.184
    min: 0.050s max: 0.066s std dev: 0.00482s window: 34
average rate: 17.203
    min: 0.050s max: 0.066s std dev: 0.00486s window: 51
average rate: 17.084
    min: 0.050s max: 0.066s std dev: 0.00456s window: 68
^Caverage rate: 17.142
    min: 0.050s max: 0.066s std dev: 0.00465s window: 75
nvidia@tegra-ubuntu:~$ rostopic hz /stereo_camera/left/image_rect_color
subscribed to [/stereo_camera/left/image_rect_color]
WARNING: may be using simulated time
average rate: 8.435
    min: 0.101s max: 0.133s std dev: 0.00964s window: 8
average rate: 8.511
    min: 0.101s max: 0.133s std dev: 0.00914s window: 17
average rate: 8.464
    min: 0.101s max: 0.133s std dev: 0.00846s window: 25
^Caverage rate: 8.459
    min: 0.101s max: 0.133s std dev: 0.00829s window: 28
nvidia@tegra-ubuntu:~$ rostopic hz /stereo_camera/depth/depth_registered
subscribed to [/stereo_camera/depth/depth_registered]
WARNING: may be using simulated time
average rate: 8.186
    min: 0.111s max: 0.133s std dev: 0.00918s window: 8
average rate: 8.369
    min: 0.095s max: 0.133s std dev: 0.01064s window: 16
average rate: 8.382
    min: 0.095s max: 0.133s std dev: 0.01014s window: 25
average rate: 8.431
    min: 0.095s max: 0.133s std dev: 0.00949s window: 34
^Caverage rate: 8.401
    min: 0.095s max: 0.133s std dev: 0.00967s window: 35
nvidia@tegra-ubuntu:~$ rostopic hz /stereo_camera/odom
subscribed to [/stereo_camera/odom]
WARNING: may be using simulated time
average rate: 16.756
    min: 0.051s max: 0.071s std dev: 0.00506s window: 16
average rate: 16.451
    min: 0.051s max: 0.083s std dev: 0.00660s window: 32
average rate: 16.389
    min: 0.051s max: 0.083s std dev: 0.00606s window: 48
average rate: 16.338
    min: 0.050s max: 0.083s std dev: 0.00569s window: 64
^Caverage rate: 16.323
    min: 0.050s max: 0.083s std dev: 0.00583s window: 70
nvidia@tegra-ubuntu:~$ rostopic hz /scan
subscribed to [/scan]
WARNING: may be using simulated time
average rate: 4.981
    min: 0.192s max: 0.205s std dev: 0.00594s window: 4
average rate: 5.000
    min: 0.182s max: 0.212s std dev: 0.00923s window: 9
average rate: 4.605
    min: 0.182s max: 0.398s std dev: 0.05509s window: 13
average rate: 4.708
    min: 0.182s max: 0.398s std dev: 0.04708s window: 18
^Caverage rate: 4.765
    min: 0.182s max: 0.398s std dev: 0.04171s window: 23

and here is my rates:

nvidia@tegra-ubuntu:~$ rostopic hz /camera/color/camera_info 
subscribed to [/camera/color/camera_info]
average rate: 13.375
    min: 0.013s max: 0.139s std dev: 0.04586s window: 12
average rate: 13.240
    min: 0.012s max: 0.139s std dev: 0.04470s window: 24
average rate: 12.122
    min: 0.012s max: 0.139s std dev: 0.04621s window: 35
average rate: 11.998
    min: 0.012s max: 0.139s std dev: 0.04869s window: 46
average rate: 12.024
    min: 0.012s max: 0.139s std dev: 0.04828s window: 59
^Caverage rate: 11.872
    min: 0.012s max: 0.139s std dev: 0.04759s window: 66
nvidia@tegra-ubuntu:~$ rostopic hz /camera/color/image_rect_color
subscribed to [/camera/color/image_rect_color]
average rate: 14.930
    min: 0.021s max: 0.106s std dev: 0.01705s window: 15
average rate: 15.008
    min: 0.021s max: 0.106s std dev: 0.01222s window: 30
^Caverage rate: 14.958
    min: 0.021s max: 0.106s std dev: 0.01100s window: 38
nvidia@tegra-ubuntu:~$ rostopic hz /camera/depth/image_rect_raw
subscribed to [/camera/depth/image_rect_raw]
average rate: 15.319
    min: 0.008s max: 0.105s std dev: 0.02354s window: 15
average rate: 15.039
    min: 0.008s max: 0.105s std dev: 0.01939s window: 30
average rate: 15.084
    min: 0.008s max: 0.111s std dev: 0.01912s window: 45
^Caverage rate: 15.082
    min: 0.008s max: 0.111s std dev: 0.01981s window: 52
nvidia@tegra-ubuntu:~$ rostopic hz /odom
subscribed to [/odom]
average rate: 10.019
    min: 0.081s max: 0.118s std dev: 0.01225s window: 9
average rate: 10.008
    min: 0.081s max: 0.118s std dev: 0.01042s window: 19
average rate: 10.000
    min: 0.081s max: 0.118s std dev: 0.00904s window: 29
average rate: 9.997
    min: 0.081s max: 0.118s std dev: 0.00870s window: 39
average rate: 10.003
    min: 0.075s max: 0.123s std dev: 0.00947s window: 49
average rate: 10.001
    min: 0.075s max: 0.123s std dev: 0.00885s window: 60
average rate: 10.001
    min: 0.075s max: 0.123s std dev: 0.00819s window: 70
average rate: 10.001
    min: 0.075s max: 0.123s std dev: 0.00788s window: 80
^Caverage rate: 10.002
    min: 0.075s max: 0.123s std dev: 0.00774s window: 83
nvidia@tegra-ubuntu:~$ rostopic hz /scan
subscribed to [/scan]
average rate: 8.868
    min: 0.099s max: 0.124s std dev: 0.00915s window: 8
average rate: 8.700
    min: 0.098s max: 0.150s std dev: 0.01421s window: 17
average rate: 8.826
    min: 0.097s max: 0.150s std dev: 0.01357s window: 26
average rate: 9.015
    min: 0.091s max: 0.150s std dev: 0.01304s window: 35
average rate: 8.885
    min: 0.091s max: 0.159s std dev: 0.01445s window: 44
average rate: 8.830
    min: 0.091s max: 0.159s std dev: 0.01451s window: 52
average rate: 8.837
    min: 0.076s max: 0.159s std dev: 0.01628s window: 61
average rate: 8.917
    min: 0.076s max: 0.159s std dev: 0.01544s window: 71
average rate: 8.946
    min: 0.076s max: 0.159s std dev: 0.01487s window: 80

I think my rates is ok, isnt it? what do you think?

jungladicitta commented 4 years ago

@t-kitajima thanks for the video! @Affonso-Gui @t-kitajima I also have problem with darknet, it freezes, and window become shadowed. https://yadi.sk/i/tLKKMYGwmbSK1w What do you think, is this because I am running rviz on jetson instead of remote computer?

robograffitti commented 4 years ago

@jungladicitta Without running rviz, subscribe the darknet image topic with an image view.

robograffitti commented 4 years ago

Or, try to use a powerful desktop or laptop.

jungladicitta commented 4 years ago

@yoshimalucky ok, I'll try. I run rviz on jetson, Do you think I should run rviz on remote computer instead?

jungladicitta commented 4 years ago

@yoshimalucky @t-kitajima @Affonso-Gui I have tried to disable d435 parameters and run rviz on remote computer and rtabmap is still working with freezes and mapCloud refresh rate is still very low. Moreover, tf refreshes with big delay. 5-10 seconds approximately. I have checked input topics rates for rtabmap and they are ok. what else could you recommend to check?