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

Error about Eigen::all in lidartag_decode.cc #5

Closed
RyoHinata-jp opened this issue Dec 2, 2020 · 14 comments
Closed

Error about Eigen::all in lidartag_decode.cc #5

RyoHinata-jp opened this issue Dec 2, 2020 · 14 comments

Comments

@RyoHinata-jp
Copy link

hello

Once catkin_make. I'm having trouble with the following error.

/home/robotics/catkin_ws/src/LiDARTag/src/lidartag_decode.cc:841:47: error: ‘all’ is not a member of ‘Eigen’
Eigen::MatrixXf test_mat = pc1(Eigen::all, indices);
^~~
/home/robotics/catkin_ws/src/LiDARTag/src/lidartag_decode.cc:841:47: note: suggested alternatives:
In file included from /usr/include/boost/algorithm/string.hpp:21:0,
from /usr/include/pcl-1.8/pcl/io/boost.h:66,
from /usr/include/pcl-1.8/pcl/io/file_io.h:43,
from /usr/include/pcl-1.8/pcl/io/pcd_io.h:44,
from /home/robotics/catkin_ws/src/LiDARTag/include/lidartag.h:56,
from /home/robotics/catkin_ws/src/LiDARTag/src/lidartag_decode.cc:37:
/usr/include/boost/algorithm/string/predicate.hpp:438:21: note: ‘boost::algorithm::all’
inline bool all(
^~~
/usr/include/boost/algorithm/string/predicate.hpp:438:21: note: ‘boost::algorithm::all’
/home/robotics/catkin_ws/src/LiDARTag/src/lidartag_decode.cc: In lambda function:
/home/robotics/catkin_ws/src/LiDARTag/src/lidartag_decode.cc:1030:47: error: ‘all’ is not a member of ‘Eigen’
Eigen::MatrixXf test_mat = pc1(Eigen::all, indices);
^~~

I don't think Eigen::all is working well.
What should I do?

@brucejk
Copy link
Member

brucejk commented Dec 3, 2020

Hello,

Thanks for using this package!

Could you verify which Eigen version you have on your machine?

Please ensure you have at least version: 3.3.90

If you put The fastest way to get the version on your machine would be:
cat PATH_TO_YOUR_EIGEN/eigen3/Eigen/src/Core/util/Macros.h | grep VERSION

@RyoHinata-jp
Copy link
Author

Thanks for reply !

I checked and found that it is now in version 3.3.4

This was rewritten because when introducing velodyne_pointcloud, libeigen3-dev was installed as an associated package, which is 3.3.4.
The command I used was sudo apt-get install ros-melodic-velodyne

Newly introduced version 3.3.90 of Eigen from github.
I checked the version and found it to be 3.3.90.
The location of eigen3 is unchanged.

I ran catkin_make and got the same error.

home/robotics/catkin_ws/src/LiDARTag/src/lidartag_decode.cc:1030:47: error: ‘all’ is not a member of ‘Eigen’
Eigen::MatrixXf test_mat = pc1(Eigen::all, indices);

Apparently, eigen;all is still not working

I want to use this wonderful package, so please help me!

@brucejk
Copy link
Member

brucejk commented Dec 3, 2020

Hi,

No worries. I will definitely help you go through this!

Could you check whether you are using Eigen 3.3.90? Eigen::all is indeed in the library and is specified here and here.

You may have several Eigen libraries on your machine. I don't know where you put the libraries. Default location should be:
grep "#define EIGEN_[^_]*_VERSION" /usr/include/eigen3/Eigen/src/Core/util/Macros.h
grep "#define EIGEN_[^_]*_VERSION" /usr/eigen3/Eigen/src/Core/util/Macros.h

According to stackoverflow1 and stackoverflow2, I would suggest you double-check and verify which version"s" you have and if you specify the correct version to use.

@brucejk
Copy link
Member

brucejk commented Dec 6, 2020

Hi,

I am going to close this and please feel free to open this issue again if you encounter related problems.

@brucejk brucejk closed this as completed Dec 6, 2020
@RyoHinata-jp
Copy link
Author

Hi!

Surely my version is 3.3.90.
But I get the same error.

Found an interesting article. Apparently this has something to do with it.

http://eigen.tuxfamily.org/index.php?title=3.4

from here,It says that Eigen::all is available from version 3.4.

Version 3.4 is under development and has not yet been released. Version 3.4 will be labeled 3.3.9, even though there is an official version 3.3.9, as stated in this article。

https://stackoverflow.com/questions/56370502/eigen-3-4-reshaped

I think there are two versions 3.3.9.(Official 3.3.9 and 3.4 in development)

I want to use your version of Eigen. I think it is the 3.4 version marked 3.3.9.
I can't find the download page for 3.4, but I would like to get your Eigen files or a download page.

@brucejk
Copy link
Member

brucejk commented Dec 8, 2020

Hi,

Let's try one more thing. Please download Eigen from their GitLab and checkout 6f0f6f792e441c32727ed945686fefe02e6bdbc6. This is the SHA1 I am currently on. You should be able to compile. I also checked that at the latest SHA1 (baf9d762b70b030f797ab4c8e5e6ecebf5095122) on which they also have Eigen::all. I would suggest you try the version I use to ensure you have everything right and then checkout the latest SHA1.

I do apologize that I didn't realize the tagged version of 3.3.9 does not support Eigen::all whereas what I am using is the master branch where they leave the version specification in Eigen/src/Core/util/Macros.h as 3.3.9.

Please let me know if this works for you. If this works for you, I will put this into the readme.

@brucejk brucejk reopened this Dec 8, 2020
@RyoHinata-jp
Copy link
Author

Finally succeeded in catkin_make!
Apparently, the part I mentioned yesterday was the cause.
That was very helpful, thank you very much.

Also, I have another question.

As for Lidar to use, only Velodyne is supported?

Is Ouster Lidar available?

@brucejk
Copy link
Member

brucejk commented Dec 9, 2020

Hi,

Are you on the latest SHA1 or the one I am on?

As long as you have ring numbers associated with your LiDAR points, that'd be fine. Or similarly, if you only have one rotation axis, we are able to estimate the rings for you here and here.

However, I would suggest you try the provided bagfiles to see if this package works properly on your machine. To do so, please follow the steps here.

Please let me know if you have further questions!

@RyoHinata-jp
Copy link
Author

Hi!

Yes! I am on the SHA1 you are.

I used the bagfile you gave me, and it works! Thank you!

Now I'd like to try using it with my Ouster Lidar.

My question is, when you say the marker size is 0.61m, is that the t or the d in the description?
What happens if the size is different?
Do I have to print very accurately?

@brucejk
Copy link
Member

brucejk commented Dec 10, 2020

Hi,

Glad to hear it works on your machine!

  1. The size is the t in the picture.
  2. I would still suggest you use the same target sizes first. Then, if you want to use different sizes, please follow these steps. Please remember the clearance around the target uses the largest target you specify in your launch file, see here.
  3. You don't have to measure/print it accurately and precisely. A rough measure is enough!
  4. Does the Ouster LiDAR have a ring number associating with a data point? If yes, that's the best. If not and you only have one rotation axis, we can estimate the rings here and here.
  5. Please star the repo if you like the package and my answers!

Please let me know if you have other questions!

@RyoHinata-jp
Copy link
Author

Hi!

From what I've found, there doesn't seem to be any connection between ring and point data in Ouster's Lidar.
So we can just estimate the ring from x, y, and z?

Of course I pressed star!
Your package and response to my question is very nice!!

Can I use 16beam and 64beam Lidar?

I have Velodyne 16 and Ouster 32 and 64.

@brucejk
Copy link
Member

brucejk commented Dec 11, 2020

Hi,

  1. Yes, if Ouster does not have ring numbers and there is only one rotation axis, the package can estimate the ring numbers here and here.

  2. Yes, you can use all LiDARs you mentioned, but I would suggest Ouster 32 because Velodyne 16 might be too sparse, and 64 might not only have one rotation axis. Like Velodyne 64, they have two rotation axes.

Please let me know if you have further questions.

@brucejk
Copy link
Member

brucejk commented Dec 14, 2020

Hi,

Please let me know if you have other relevant problems, or I will close this issue on Monday.

If you encounter other similar problems, feel free to reopen this issue. Or if you have other problems, please open a new issue!

@simonmb
Copy link

simonmb commented Jan 31, 2022

I also had this problem. In recent versions Eigen::all was first moved to Eigen::placeholders::all and then to Eigen::indexing::all
c.f. https://eigen.tuxfamily.org/index.php?title=3.4

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

No branches or pull requests

3 participants