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

[registration] ndt running error same as #5734 #5713

Closed
kitzhongzhengqi opened this issue May 17, 2023 · 2 comments
Closed

[registration] ndt running error same as #5734 #5713

kitzhongzhengqi opened this issue May 17, 2023 · 2 comments
Labels
status: triage Labels incomplete

Comments

@kitzhongzhengqi
Copy link

kitzhongzhengqi commented May 17, 2023

Hello,as you say , with ndt I got the same error as ndt_omp:

srand((int)time(0));
   pcl::PointCloud<RsPointXYZIRT> cloud;
  // Fill in the cloud data
  cloud.width    = 5;
  cloud.height   = 1;
  cloud.is_dense = false;
  cloud.resize (cloud.width * cloud.height);
  for (auto& point: cloud)
  {
    point.x = 1024 * rand () / (RAND_MAX + 1.0f);
    point.y = 1024 * rand () / (RAND_MAX + 1.0f);
    point.z = 1024 * rand () / (RAND_MAX + 1.0f);
    point.intensity = 0;
    point.ring = 0;
    point.timestamp = 0;
  }
pcl::PointCloud < RsPointXYZIRT>::Ptr cloudPointer(new pcl::PointCloud<RsPointXYZIRT>);
cloudPointer = cloud.makeShared();
ndt_map_->setInputTarget(cloudPointer);

gdb debug infos as below:

localization_adapter: /usr/include/boost/smart_ptr/shared_ptr.hpp:734: typename boost::detail::sp_member_access::type boost::shared_ptr::operator->() const [with T = pcl::NormalDistributionsTransform<apal_sensor_service::RsPointXYZIRT, apal_sensor_service::RsPointXYZIRT>; typename boost::detail::sp_member_access::type = pcl::NormalDistributionsTransform<apal_sensor_service::RsPointXYZIRT, apal_sensor_service::RsPointXYZIRT>*]: Assertion `px != 0' failed.

Thread 23 "localization_ad" received signal SIGABRT, Aborted.
[Switching to Thread 0x7fffa37fe700 (LWP 22909)]
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1 0x00007ffff42d3859 in __GI_abort () at abort.c:79
#2 0x00007ffff42d3729 in __assert_fail_base (fmt=0x7ffff4469588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x7ffff6a07624 "px != 0",
file=0x7ffff6a075f8 "/usr/include/boost/smart_ptr/shared_ptr.hpp", line=734, function=) at assert.c:92
#3 0x00007ffff42e4fd6 in __GI___assert_fail (assertion=0x7ffff6a07624 "px != 0", file=0x7ffff6a075f8 "/usr/include/boost/smart_ptr/shared_ptr.hpp", line=734,
function=0x7ffff6a09010 "typename boost::detail::sp_member_access::type boost::shared_ptr::operator->() const [with T = pcl::NormalDistributionsTransform<apal_sensor_service::RsPointXYZIRT, apal_sensor_service::RsPointX"...) at assert.c:101
#4 0x00007ffff6567fdd in boost::shared_ptr<pcl::NormalDistributionsTransform<apal_sensor_service::RsPointXYZIRT, apal_sensor_service::RsPointXYZIRT> >::operator-> (this=0x7fffe000d100)
at /usr/include/boost/smart_ptr/shared_ptr.hpp:734
#5 0x00007ffff65318a0 in LidarL10n::DynamicLoadMap (this=0x7fffe0009f20) at /home/apal-robo-percp/colcon_ws/src/ros2_loc_node/apal_localization/src/l10n/src/lidar_l10n/lidar_l10n.cpp:1931
#6 0x00007ffff63e9c7b in apal::localization::Localization::loadmap (this=0x7fffe0002d70)
at /home/apal-robo-percp/colcon_ws/src/ros2_loc_node/apal_localization/src/interface/src/localization_impl.cpp:287
#7 0x0000555555ac53b3 in std::__invoke_impl<void, void (apal::localization::LocalizationInterface::)(), std::shared_ptrapal::localization::LocalizationInterface>(std::__invoke_memfun_deref, void (apal::localization::LocalizationInterface::&&)(), std::shared_ptrapal::localization::LocalizationInterface&&) (__f=@0x555556151dd8: &virtual table offset 328, __t=...)
at /usr/include/c++/9/bits/invoke.h:73
#8 0x0000555555aab98d in std::__invoke<void (apal::localization::LocalizationInterface::)(), std::shared_ptrapal::localization::LocalizationInterface > (
__fn=@0x555556151dd8: &virtual table offset 328) at /usr/include/c++/9/bits/invoke.h:95
#9 0x0000555555a8a431 in std::thread::_Invoker<std::tuple<void (apal::localization::LocalizationInterface::
)(), std::shared_ptrapal::localization::LocalizationInterface > >::_M_invoke<0ul, 1ul> (
this=0x555556151dc8) at /usr/include/c++/9/thread:244
#10 0x0000555555a09874 in std::thread::_Invoker<std::tuple<void (apal::localization::LocalizationInterface::)(), std::shared_ptrapal::localization::LocalizationInterface > >::operator() (
this=0x555556151dc8) at /usr/include/c++/9/thread:251
#11 0x00005555559ee028 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (apal::localization::LocalizationInterface::
)(), std::shared_ptrapal::localization::LocalizationInterface > > >::_M_run (this=0x555556151dc0) at /usr/include/c++/9/thread:195
#12 0x00007ffff4706de4 in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
#13 0x00007ffff44ab609 in start_thread (arg=) at pthread_create.c:477
#14 0x00007ffff43d0133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

@mvieth

@kitzhongzhengqi kitzhongzhengqi added the status: triage Labels incomplete label May 17, 2023
@mvieth
Copy link
Member

mvieth commented May 17, 2023

Seems like ndt_map_ is a shared pointer that is not initialized

@kitzhongzhengqi
Copy link
Author

yes,problem solved.thanks

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

No branches or pull requests

2 participants