MapIV / iris

Other
163 stars 47 forks source link

I have compiled successfully, but I have run into some problems. #2

Closed ZYCheng-coder closed 3 years ago

ZYCheng-coder commented 3 years ago

I have compiled successfully, but I have run into some problems. As shown in the screenshot, I hope to give a solution.thanks! 2020-10-22 19-55-37屏幕截图 2020-10-22 19-56-20屏幕截图

rsasaki0109 commented 3 years ago

@czy-pro

Thank you for your interest in iris. It feels like opencv is doing something wrong, but I'm not sure of the details. Could you please tell me about your environment ? I recommend building in a clean environment. I have confirmed that iris works with ros melodic on ubuntu 18.04.(I haven't done a version up of opencv, etc.)

my environment -- PCL version: 1.8.1 -- Found OpenCV: /usr (found suitable version "3.2.0", minimum required is "3.2") -- OpenCV version: 3.2.0 -- Eigen3 version: 3.3.7

renpoco commented 3 years ago

Hi all, and sir @rsasaki0109 Same issue (illegal termination of iris_node) has occurred also at my clean installed Ubuntu 18.04 environment. OpenVSLAM is seemed running normally by the way. Attachment my installing procedure list, screenshots, and "master.log" in ~/.ros/log. Installing IRIS for Ubuntu18.04.txt master.log "[Errno 111] Connection refused" is the starting point?? (The console says the iris_node*.log is put there, but it wasn't generated)

Screenshot from 2020-11-01 17-35-12 Screenshot from 2020-11-01 16-19-58 Screenshot from 2020-11-01 16-44-45 Screenshot from 2020-11-01 16-47-37 スクリーンショット 2020-11-01 18 02 56

(Although it was built in SocketViewer mode in my memo, The same result with PangolinViewer mode.)

I hope You trace some mismatch or lack of dependency. Iris has very unique features and is an engine I'm very excited about this!

rsasaki0109 commented 3 years ago

@renpoco If you build with g2o's march native option turned off, you might avoid the crash.

before

    -DBUILD_WITH_MARCH_NATIVE=ON

after

    -DBUILD_WITH_MARCH_NATIVE=OFF

I'm going to try installing it based on 「Installing IRIS for Ubuntu18.04.txt」. Please give me some time.

renpoco commented 3 years ago

sir @rsasaki0109 Thanks for quick response. I tried that, and It works!!...but something wrong... The coordinate system of the point cloud and feature points seems to be out of alignment.

Map4Iris.mp4.zip

My modified setting were described below.

First, I turn off -DBUILD_WITH_MARCH_NATIVE g2o only, standalone openvslam doesn't work well, so I had to apply it also to "openvslam/build" and "openvslam/ros". And In PangolinViewer mode, the position and orientation of the viewport behaved strangely, so I had to change the mode to SocketViewer mode.

Next, "libg2o_types_sba.so" missing error was occurred when roslaunch. So I re-setup environment valuables. export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

Attached the procedure updated version. Installing.IRIS.for.Ubuntu18.04_v0.2.txt

rsasaki0109 commented 3 years ago

@renpoco

From the video, it seems like the process is not working in time. Would it not work by slowing down the speed at which rosbag plays as shown below?

rosbag play kitti_00_video.bag -r 0.5

The rosbag is played back at 0.5x speed with the command.

I'd like to see the output of the terminal that launched openvslam.launch of iris.

renpoco commented 3 years ago

sir @rsasaki0109 Thanks for your response. I tried to edit rosbug playback speed(x0.25). But it still seems a bit strange behavior of following to point cloud. simplescreenrecorder-2020-11-02_09.27.25.mp4.zip My PC(NUC) is Corei5 & 8GB memory, so it may be a bit underpowered. I would appreciate it if you could give me the recommended hardware performance.

@czy-pro In my environment, I was able to avoid this problem by the following links advice(not only g2o but also "openvslam/build" and "openvslam/ros") and unification with PangolinViewer mode. https://github.com/MapIV/iris/issues/2#issuecomment-720058875

rsasaki0109 commented 3 years ago

@renpoco

8GB of memory might be a bit harsh... I think 16GB would be fine.

Even if you reduce the number of visualization items as shown in the image below, does iris not work well? Screenshot from 2020-11-02 10-24-18

rsasaki0109 commented 3 years ago

@renpoco

Please use the 「free」 command to check the memory used.

You can also check the cpu usage of iris with the following command.

ps aux | grep iris
renpoco commented 3 years ago

sir @rsasaki0109 Thank you for your very thorough guidance. I tried the above two check.

[full displayed] Screenshot_full_display

[reduce displayed] Screenshot_reduce_display

The status is about after 10 seconds at the start, but the CPU and memory usages is quite generous and swapping doesn't seem to be happening. CPU usage seemed certainly be reduced by reducing the display :-)

rsasaki0109 commented 3 years ago

@renpoco Once again, watching the video, it looks like the initialization failed. Repeating "roslaunch iris openvslam.launch" and "rosbag play kitti_00_video.bag" several times may cause it to run well. (Save the configuration with reduced the number of visualization items in rviz and do roslaunch.)

If the initialization is successful, the first pink trails are not wobbly.

renpoco commented 3 years ago

sir @rsasaki0109

Thank you again! I tried that approach. https://photos.app.goo.gl/HwhkS3bhRvFjKoaz6 I tried to weave in a pattern of just replaying the rosbag and relaunching rviz as well, but the match increased with each iteration, but it didn't fit perfectly until the end. At least the scales seem to have converged.

Is it because the processing power is still insufficient and the iteration is moving on to the next frame before the calculation is finished? The initial positions and scales are different, so I think it would be easier to identify the localization if we can keep them as close as possible. If there's anything we can do in this environment, please let me know!

ZYCheng-coder commented 3 years ago

I had a similar problem, 2020-11-02 13-08-32 的屏幕截图

however,thanks for you @renpoco @rsasaki0109 ,now i can run it and i will run in my data

TurtleZhong commented 3 years ago

Thanks for you @rsasaki0109 @czy-pro @kitsukawa @KYabuuchi I do not know if it possiable provide a docker image to run iris, for a base ros ubuntu docker, This one https://registry.hub.docker.com/r/ct2034/vnc-ros-kinetic-full may be a good choise. I will provide one when I run the code in the future.

rsasaki0109 commented 3 years ago

I'll get back to you if I find out anything.

rsasaki0109 commented 3 years ago

@renpoco Our main contributor advised me. You can specify the initial position in rviz's 「2D pose estimate」, so you can play the rosbag slowly afterwards.

He said that in this case, iris was able to correct the scale, but it was not able to correct the displacement of the position because of the specs of the PC. Please give us some time to find out what specs you need.

renpoco commented 3 years ago

sir @rsasaki0109 Thank you for your sharing. I'll also try again with a Corei7 & Mem 16GB environment first.

renpoco commented 3 years ago

sir @rsasaki0109 I tried retrying it in a powered up environment, but unfortunately I didn't notice any significant changes in behavior. (The processing is definitely faster.) I'll share the video again. https://photos.app.goo.gl/dzoQHbEAfxHQB8Sx5

The specifications of the machine we used below. Bare bone:GB-BXi7-4770 CPU:Core i7-4770R (3.2GHz Physical core:4, Logical core:8) Memory: 16GB https://kakaku.com/item/K0000618102/spec/

Now we just need to see if there are any mistakes in the build, or if the startup procedure or settings are different from what you intended...

rsasaki0109 commented 3 years ago

@renpoco

From the video, I think that's because the CPU is full during the initialization process. (1:04 in the video). Have you tried using rviz's "2D pose estimate" to specify the initial position? For reference, my laptop is a core i7 9th generation, and my CPU usage is as follows. It is working properly. (I'm playing rosbag at 1x speed)(It may not be very helpful, as I have other apps like chrome and slack that work just as well. As you can see in the image, there are tens of percent of CPU usage even before the iris is activated.). I will try to test the operation on a PC with a little lower performance, but I don't have a PC at hand that seems to be effective for the test now. I'm working remotely right now, so I'll ask another member to help me out.

Before running iris Screenshot from 2020-11-09 08-17-58 After running iris Screenshot from 2020-11-09 08-18-24

Your PC's memory seems to be fine.

It's possible that the build option is bad, but I didn't have any particular options (maybe just a release option) and I built it, and it worked fine. so I feel that possibility is subtle.

I'm sorry to say this now, but I don't think you need to do the action of starting roslaunch once and then playing rosbag over and over again... I commented with the intention of doing roslaunch and playing rosbag once each, several times. Your method corrects for the misalignment in azimuth, but I don't think it corrects for the misalignment in distance traveled.(i.e., the camera goes too far forward than it actually is and plunges into the wall when the camera turns.)

renpoco commented 3 years ago

sir @rsasaki0109

Thank you for your detailed answer. It was especially valuable to know the specs actually working correctly.

Have you tried using rviz's "2D pose estimate" to specify the initial position?

I tried, but it seems that iris_node dies the moment I click the arrow on the map. (There has been no response since.) I tried typing directly into Topic as shown just in case below and got the same response.

$ rostopic pub /initialpose geometry_msgs/PoseWithCovarianceStamped '{header: {frame_id: map}, pose: {pose: {position: {x: 10, y: 10} orientation: {w: 1}}}}'

Screenshot from 2020-11-11 19-46-15

I will try to test the operation on a PC with a little lower performance, but I don't have a PC at hand that seems to be effective for the test now. remotely right now, so I'll ask another member to help me out.

Thanks, I think that trial would be very helpful. I'd like to know what the minimal specs are. I understand that the lower the specs, the slower it gets, but I can't figure out how to make it work differently, even though I'm reducing the rosbag playback speed...

It's possible that the build option is bad, but I didn't have any particular options (maybe just a release option) and I built it, and it worked fine. so I feel that possibility is subtle.

I understand that it is supposed to work smoothly in normal. The problem may be that we're trying too many things around here.

I'm sorry to say this now, but I don't think you need to do the action of starting roslaunch once and then playing rosbag over and over again...

I'm sorry, I know it doesn't make much sense, but it's an unintentional operation to check the behavior of the tracker...

Your method corrects for the misalignment in azimuth, but I don't think it corrects for the misalignment in distance traveled.(i.e., the camera goes too far forward than it actually is and plunges into the wall when the camera turns.)

Yes, it was the same movement as you said.

Please let me know if you know anything about it. Thank you for your continued support!

rsasaki0109 commented 3 years ago

@renpoco

it seems that iris_node dies the moment I click the arrow on the map.

Once you have played the rosbag, pause it with the spacebar, set the initial values with rviz and then restart the rosbag with the spacebar again.

I can't figure out how to make it work differently, even though I'm reducing the rosbag playback speed...

Rather than failing to estimate because one process can't be done in time and the next one can't be done, I think the estimation fails because the process itself can't be done due to the performance of the PC. (It's just a guess on my part...)

renpoco commented 3 years ago

sir @rsasaki0109 , @czy-pro

Thank you for your kind and thorough instructions. I am sorry that I am not familiar with the ROS operation itself.

I tried a few times using the suggested method and found a pattern that converged successfully! https://photos.app.goo.gl/WErXo5gABCee6FUB8 It seems to work better setting "2D Position Estimate" a few meters back from the default start point and upward on the screen. The first half of the video is an example of success, and the second half after 2:30 is an example of failure.

I'd like to try this with the original point cloud and video this time. Thank you so much!

rsasaki0109 commented 3 years ago

I think I've solved this issue, so I'm going to close this issue.