adyczech / elevation_mapping

Robot-centric elevation mapping for rough terrain navigation
BSD 3-Clause "New" or "Revised" License
2 stars 3 forks source link

Some Info needed for building elevation_mapping in ROS2 Humble. #2

Open babahadjsaid opened 7 months ago

babahadjsaid commented 7 months ago

Hello, So I'm trying to fix the bugs i'm getting when building this lib in ros2 humble, i had some issues concerning a couple of lines, some of them were easy and strainght forward, but some (the ones i will share here), were a bit tricky, in sense that they need some technical detail, and they are: in this line: https://github.com/adyczech/elevation_mapping/blob/b2481c22100d83956483dce7db7d62c459db0736/elevation_mapping/src/sensor_processors/SensorProcessorBase.cpp#L136 the Duration class was init with a value of 1.0, which doesn't meet any constractor looking to the constractors i found that the way to do so is by specifying the seconds and nanoseconds as integer, So my question is what is the value you meant by 1.0, is it 1 sec ?

whereas in this line: https://github.com/adyczech/elevation_mapping/blob/b2481c22100d83956483dce7db7d62c459db0736/elevation_mapping/src/input_sources/Input.cpp#L28 a some parameters were being declared, but the syntax needed a default value if the user didn't provide one, can you give me the list of default values that i can put there ? Thank you so much.

siddarth09 commented 3 months ago

Hey, do you have any updates on this ? have you ported the package to humble?

babahadjsaid commented 3 months ago

Yes, I did.

For line 136 of the sensor base file, the solution was:

rclcpp::Duration::from_seconds(1.0));

For line 28 of the input file:

nodeHandle_->declare_parameter(inputSourceName + ".type", "");

Note: If I remember correctly, it's not only line 28; other lines have this issue as well. The solution is basically to add the default value as a third parameter.

If you need any further information, please let me know.

siddarth09 commented 3 months ago

Hey can you just send me your working package? it will be really helpful for me

babahadjsaid commented 3 months ago

here it is. https://github.com/babahadjsaid/elevation_mapping

siddarth09 commented 3 months ago

thanks bro

siddarth09 commented 3 months ago

Hey bro, I am getting .NaN values. Do you know how to fix that issue?

babahadjsaid commented 3 months ago

Check if the variances are being published at all. If they are, they shouldn't be so large because in the calculation there will be a division by numbers that are near zero, which produces very large outputs (namely NaN).

siddarth09 commented 3 months ago

No, they are just giving me zeros. But i can see the grid map output in Rviz.

babahadjsaid commented 3 months ago

what values are NAN then ? I had an assumption but tell me to see if we are in the same page.

siddarth09 commented 2 months ago

hey sorry, I was sick and couldn't answer your reply. I am getting NaN when I echo the /elevation_map topic. I do not know what i should be looking at since I am using this package for first time.