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

feat(cmake): make colcon build fast again #146

Merged
merged 6 commits into from
Jun 7, 2024

Conversation

knzo25
Copy link
Collaborator

@knzo25 knzo25 commented May 14, 2024

PR Type

Work in progress

  • Improvement

Related Links

Description

Review Procedure

Remarks

Pre-Review Checklist for the PR Author

PR Author should check the checkboxes below when creating the PR.

  • Assign PR to reviewer

Checklist for the PR Reviewer

Reviewers should check the checkboxes below before approval.

  • Commits are properly organized and messages are according to the guideline
  • (Optional) Unit tests have been written for new behavior
  • PR title describes the changes

Post-Review Checklist for the PR Author

PR Author should check the checkboxes below before merging.

  • All open points are addressed and tracked via issues or tickets

CI Checks

  • Build and test for PR: Required to pass before the merge.

@knzo25 knzo25 self-assigned this May 14, 2024
@mojomex
Copy link
Collaborator

mojomex commented May 14, 2024

I tested this PR with the following launch configurations, with PCAPs:

  • ros2 launch nebula_ros robosense_launch.all_hw.xml sensor_model:=Helios
    • undefined symbol: nebula::drivers::RobosenseInfoDriver::RobosenseInfoDriver(std::shared_ptr<nebula::drivers::RobosenseSensorConfiguration> const&)
  • ros2 launch nebula_ros hesai_launch_all_hw.xml sensor_model:=Pandar128E4X
    • no issues observed
  • ros2 launch nebula_ros velodyne_launch_all_hw.xml sensor_model:=VLP32
    • no issues observed

I currently don"t have any Velodyne or Continental PCAPs to test with.

@knzo25
Copy link
Collaborator Author

knzo25 commented May 14, 2024

@mojomex

I ran the command without a pcap and there were no issues, does that error only happen when you start replaying the pcap?

ros2 launch nebula_ros robosense_launch.all_hw.xml sensor_model:=Helios
[INFO] [launch]: All log files can be found below /home/kenzo/.ros/log/2024-05-14-18-34-04-364137-kenzo-TUF-1734631
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [robosense_hw_interface_ros_wrapper_node-1]: process started with pid [1734632]
[INFO] [robosense_driver_ros_wrapper_node-2]: process started with pid [1734634]
[INFO] [robosense_hw_monitor_ros_wrapper_node-3]: process started with pid [1734636]
[robosense_hw_interface_ros_wrapper_node-1] [INFO] [1715679244.505016413] [IoContext::IoContext]: Thread(s) Created: 1
[robosense_hw_interface_ros_wrapper_node-1] [INFO] [1715679244.505088649] [IoContext::IoContext]: Thread(s) Created: 1
[robosense_hw_interface_ros_wrapper_node-1] [INFO] [1715679244.505162578] [robosense_hw_driver]: SensorConfig:SensorModel: HELIOS, FrameID: robosense, HostIP: 192.168.1.201, SensorIP: 192.168.1.202, DataPort: 6701, ReturnMode: Unknown, Frequency: 0, MTU: 0, Use sensor time: 0, GnssPort: 7792, ScanPhase:0, RotationSpeed:0, FOV(Start):0, FOV(End):0
[robosense_driver_ros_wrapper_node-2] [WARN] [1715679244.505280800] [robosense_cloud]: RobosenseDriverRosWrapper
[robosense_hw_monitor_ros_wrapper_node-3] [INFO] [1715679244.505375739] [IoContext::IoContext]: Thread(s) Created: 1
[robosense_hw_monitor_ros_wrapper_node-3] [INFO] [1715679244.505443476] [IoContext::IoContext]: Thread(s) Created: 1
[robosense_driver_ros_wrapper_node-2] [INFO] [1715679244.505475667] [robosense_cloud]: SensorConfig:SensorModel: HELIOS, FrameID: robosense, HostIP: 192.168.1.201, SensorIP: 192.168.1.202, DataPort: 2368, ReturnMode: , Frequency: 32557, MTU: 0, Use sensor time: 0, GnssPort: 7792, ScanPhase:0, RotationSpeed:104, FOV(Start):0, FOV(End):0
[robosense_driver_ros_wrapper_node-2] [INFO] [1715679244.505486497] [robosense_cloud]: robosense_cloud. Starting...
[robosense_driver_ros_wrapper_node-2] [INFO] [1715679244.505492208] [robosense_cloud]: robosense_cloud. Driver 
[robosense_hw_interface_ros_wrapper_node-1] [INFO] [1715679244.505613797] [robosense_hw_driver]: Starting interface.
[robosense_hw_interface_ros_wrapper_node-1] Starting UDP server for data packets on: SensorModel: HELIOS, FrameID: robosense, HostIP: 192.168.1.201, SensorIP: 192.168.1.202, DataPort: 6701, ReturnMode: Unknown, Frequency: 0, MTU: 0, Use sensor time: 0, GnssPort: 7792, ScanPhase:0, RotationSpeed:0, FOV(Start):0, FOV(End):0
[robosense_hw_interface_ros_wrapper_node-1] Udp Connection Error192.168.1.202,6701
[robosense_hw_interface_ros_wrapper_node-1] [INFO] [1715679244.505763389] [robosense_hw_driver]: Starting UDP server for info packets on: 192.168.1.202:7792
[robosense_hw_interface_ros_wrapper_node-1] Udp Connection Error192.168.1.202,7792
[robosense_hw_interface_ros_wrapper_node-1] Starting UDP server for info packets on: SensorModel: HELIOS, FrameID: robosense, HostIP: 192.168.1.201, SensorIP: 192.168.1.202, DataPort: 6701, ReturnMode: Unknown, Frequency: 0, MTU: 0, Use sensor time: 0, GnssPort: 7792, ScanPhase:0, RotationSpeed:0, FOV(Start):0, FOV(End):0
[robosense_driver_ros_wrapper_node-2] [WARN] [1715679244.506591146] [robosense_cloud]: Initialized decoder ros wrapper.
[robosense_hw_monitor_ros_wrapper_node-3] [WARN] [1715679245.506014858] [robosense_hw_monitor_robosense]: diagnostic_updater: No HW_ID was set. This is probably a bug. Please report it. For devices that do not have a HW_ID, set this value to 'none'. This warning only occurs once all diagnostics are OK. It is okay to wait until the device is open before calling setHardwareID.
^C[WARNING] [launch]: user interrupted with ctrl-c (SIGINT)
[robosense_hw_interface_ros_wrapper_node-1] [INFO] [1715679252.701855126] [rclcpp]: signal_handler(signum=2)
[robosense_driver_ros_wrapper_node-2] [INFO] [1715679252.701853533] [rclcpp]: signal_handler(signum=2)
[robosense_hw_monitor_ros_wrapper_node-3] [INFO] [1715679252.701853673] [rclcpp]: signal_handler(signum=2)
[INFO] [robosense_hw_monitor_ros_wrapper_node-3]: process has finished cleanly [pid 1734636]
[INFO] [robosense_hw_interface_ros_wrapper_node-1]: process has finished cleanly [pid 1734632]
[INFO] [robosense_driver_ros_wrapper_node-2]: process has finished cleanly [pid 1734634]

@mojomex
Copy link
Collaborator

mojomex commented May 14, 2024

@knzo25 Yes, for Robosense, the InfoDecoder only gets instantiated once the first pointcloud packet has been received..

@knzo25
Copy link
Collaborator Author

knzo25 commented May 14, 2024

@mojomex
Fixed in 92fdeef

@mojomex
Copy link
Collaborator

mojomex commented May 14, 2024

@mojomex Fixed in 92fdeef

@knzo25 It still seems to occur after the fix:

[INFO] [launch]: All log files can be found below [...]
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [robosense_hw_interface_ros_wrapper_node-1]: process started with pid [227788]
[INFO] [robosense_driver_ros_wrapper_node-2]: process started with pid [227790]
[INFO] [robosense_hw_monitor_ros_wrapper_node-3]: process started with pid [227792]
[robosense_driver_ros_wrapper_node-2] [WARN 1715683935.166282727] [robosense_cloud]: RobosenseDriverRosWrapper (RobosenseDriverRosWrapper() at ~/nebula/src/nebula_ros/src/robosense/robosense_decoder_ros_wrapper.cpp:10)
[robosense_driver_ros_wrapper_node-2] [INFO 1715683935.166361921] [robosense_cloud]: SensorConfig:SensorModel: BPEARL, FrameID: robosense, HostIP: 127.0.0.1, SensorIP: 127.0.0.1, DataPort: 2368, ReturnMode: , Frequency: 32597, MTU: 0, Use sensor time: 0, GnssPort: 3010, ScanPhase:0, RotationSpeed:104, FOV(Start):0, FOV(End):0 (GetParameters() at ~/nebula/src/nebula_ros/src/robosense/robosense_decoder_ros_wrapper.cpp:296)
[robosense_driver_ros_wrapper_node-2] [INFO 1715683935.166368907] [robosense_cloud]: robosense_cloud. Starting... (RobosenseDriverRosWrapper() at ~/nebula/src/nebula_ros/src/robosense/robosense_decoder_ros_wrapper.cpp:21)
[robosense_driver_ros_wrapper_node-2] [INFO 1715683935.166373179] [robosense_cloud]: robosense_cloud. Driver  (RobosenseDriverRosWrapper() at ~/nebula/src/nebula_ros/src/robosense/robosense_decoder_ros_wrapper.cpp:28)
[robosense_hw_interface_ros_wrapper_node-1] [INFO 1715683935.166363372] [IoContext::IoContext]: Thread(s) Created: 1 (IoContext() at ~/nebula/src/transport_drivers/io_context/src/io_context.cpp:44)
[robosense_hw_interface_ros_wrapper_node-1] [INFO 1715683935.166398723] [IoContext::IoContext]: Thread(s) Created: 1 (IoContext() at ~/nebula/src/transport_drivers/io_context/src/io_context.cpp:44)
[robosense_hw_interface_ros_wrapper_node-1] [INFO 1715683935.166469150] [robosense_hw_driver]: SensorConfig:SensorModel: BPEARL, FrameID: robosense, HostIP: 127.0.0.1, SensorIP: 127.0.0.1, DataPort: 2010, ReturnMode: Unknown, Frequency: 0, MTU: 0, Use sensor time: 0, GnssPort: 3010, ScanPhase:0, RotationSpeed:0, FOV(Start):0, FOV(End):0 (GetParameters() at ~/nebula/src/nebula_ros/src/robosense/robosense_hw_interface_ros_wrapper.cpp:146)
[robosense_hw_interface_ros_wrapper_node-1] [INFO 1715683935.166753306] [robosense_hw_driver]: Starting interface. (StreamStart() at ~/nebula/src/nebula_ros/src/robosense/robosense_hw_interface_ros_wrapper.cpp:44)
[robosense_hw_monitor_ros_wrapper_node-3] [INFO 1715683935.166764875] [IoContext::IoContext]: Thread(s) Created: 1 (IoContext() at ~/nebula/src/transport_drivers/io_context/src/io_context.cpp:44)
[robosense_hw_interface_ros_wrapper_node-1] Starting UDP server for data packets on: SensorModel: BPEARL, FrameID: robosense, HostIP: 127.0.0.1, SensorIP: 127.0.0.1, DataPort: 2010, ReturnMode: Unknown, Frequency: 0, MTU: 0, Use sensor time: 0, GnssPort: 3010, ScanPhase:0, RotationSpeed:0, FOV(Start):0, FOV(End):0
[robosense_hw_monitor_ros_wrapper_node-3] [INFO 1715683935.166805376] [IoContext::IoContext]: Thread(s) Created: 1 (IoContext() at ~/nebula/src/transport_drivers/io_context/src/io_context.cpp:44)
[robosense_hw_interface_ros_wrapper_node-1] Starting UDP server for info packets on: SensorModel: BPEARL, FrameID: robosense, HostIP: 127.0.0.1, SensorIP: 127.0.0.1, DataPort: 2010, ReturnMode: Unknown, Frequency: 0, MTU: 0, Use sensor time: 0, GnssPort: 3010, ScanPhase:0, RotationSpeed:0, FOV(Start):0, FOV(End):0
[robosense_hw_interface_ros_wrapper_node-1] [INFO 1715683935.166834299] [robosense_hw_driver]: Starting UDP server for info packets on: 127.0.0.1:3010 (PrintInfo() at ~/nebula/src/nebula_hw_interfaces/src/nebula_robosense_hw_interfaces/robosense_hw_interface.cpp:229)
[robosense_hw_interface_ros_wrapper_node-1] [INFO 1715683935.166953762] [robosense_hw_driver]: Bpearl V4 detected. (PrintInfo() at ~/nebula/src/nebula_hw_interfaces/src/nebula_robosense_hw_interfaces/robosense_hw_interface.cpp:229)
[robosense_driver_ros_wrapper_node-2] [WARN 1715683935.167033234] [robosense_cloud]: Initialized decoder ros wrapper. (RobosenseDriverRosWrapper() at ~/nebula/src/nebula_ros/src/robosense/robosense_decoder_ros_wrapper.cpp:43)
[robosense_driver_ros_wrapper_node-2] [INFO 1715683935.187756354] [robosense_cloud]: Bpearl V4 detected. (ReceiveScanMsgCallback() at ~/nebula/src/nebula_ros/src/robosense/robosense_decoder_ros_wrapper.cpp:53)
[robosense_driver_ros_wrapper_node-2] [INFO 1715683935.187779853] [robosense_cloud]: Initializing info driver... (InitializeInfoDriver() at ~/nebula/src/nebula_ros/src/robosense/robosense_decoder_ros_wrapper.cpp:190)
[robosense_driver_ros_wrapper_node-2] [INFO 1715683935.187808634] [robosense_cloud]: robosense_cloudWrapper=OK (ReceiveScanMsgCallback() at ~/nebula/src/nebula_ros/src/robosense/robosense_decoder_ros_wrapper.cpp:62)
[robosense_driver_ros_wrapper_node-2] [WARN 1715683935.187818384] [robosense_cloud]: Waiting for info packet. (ReceiveScanMsgCallback() at ~/nebula/src/nebula_ros/src/robosense/robosense_decoder_ros_wrapper.cpp:67)
[robosense_driver_ros_wrapper_node-2] [WARN 1715683935.287840505] [robosense_cloud]: Waiting for info packet. (ReceiveScanMsgCallback() at ~/nebula/src/nebula_ros/src/robosense/robosense_decoder_ros_wrapper.cpp:67)
[robosense_driver_ros_wrapper_node-2] [WARN 1715683935.387843109] [robosense_cloud]: Waiting for info packet. (ReceiveScanMsgCallback() at ~/nebula/src/nebula_ros/src/robosense/robosense_decoder_ros_wrapper.cpp:67)
[robosense_driver_ros_wrapper_node-2] [WARN 1715683935.487783615] [robosense_cloud]: Waiting for info packet. (ReceiveScanMsgCallback() at ~/nebula/src/nebula_ros/src/robosense/robosense_decoder_ros_wrapper.cpp:67)
[robosense_driver_ros_wrapper_node-2] [WARN 1715683935.587706747] [robosense_cloud]: Waiting for info packet. (ReceiveScanMsgCallback() at ~/nebula/src/nebula_ros/src/robosense/robosense_decoder_ros_wrapper.cpp:67)
[robosense_hw_monitor_ros_wrapper_node-3] ~/nebula/install/nebula_ros/lib/nebula_ros/robosense_hw_monitor_ros_wrapper_node: symbol lookup error: ~/nebula/install/nebula_ros/lib/librobosense_hw_monitor_ros_wrapper.so: undefined symbol: _ZN6nebula7drivers19RobosenseInfoDriverC1ERKSt10shared_ptrINS0_28RobosenseSensorConfigurationEE
[robosense_driver_ros_wrapper_node-2] [INFO 1715683935.611950822] [robosense_cloud]: SensorConfig:SensorModel: BPEARL V4.0, FrameID: robosense, HostIP: 127.0.0.1, SensorIP: 127.0.0.1, DataPort: 2368, ReturnMode: SingleStrongest, Frequency: 32597, MTU: 0, Use sensor time: 1, GnssPort: 3010, ScanPhase:0, RotationSpeed:104, FOV(Start):0, FOV(End):0 (ReceiveInfoMsgCallback() at ~/nebula/src/nebula_ros/src/robosense/robosense_decoder_ros_wrapper.cpp:148)
[robosense_driver_ros_wrapper_node-2] [INFO 1715683935.611989234] [robosense_cloud]: Initializing driver... (InitializeDriver() at ~/nebula/src/nebula_ros/src/robosense/robosense_decoder_ros_wrapper.cpp:178)
[ERROR] [robosense_hw_monitor_ros_wrapper_node-3]: process has died [pid 227792, exit code 127, cmd '~/nebula/install/nebula_ros/lib/nebula_ros/robosense_hw_monitor_ros_wrapper_node --ros-args -r __node:=robosense_hw_monitor_robosense --params-file /tmp/launch_params_zjj2p73w --params-file /tmp/launch_params_o7u4iziu --params-file /tmp/launch_params_gp3cxrc3 --params-file /tmp/launch_params_ew_y1ked'].
[robosense_driver_ros_wrapper_node-2] [INFO 1715683935.620949551] [RobosenseDecoder]: 0x55759f536500 (RobosenseDecoder() at ~/nebula/src/nebula_decoders/include/nebula_decoders/nebula_decoders_robosense/decoders/robosense_decoder.hpp:199)
[robosense_driver_ros_wrapper_node-2] [INFO 1715683935.620979150] [robosense_cloud]: robosense_cloudWrapper=OK (ReceiveInfoMsgCallback() at ~/nebula/src/nebula_ros/src/robosense/robosense_decoder_ros_wrapper.cpp:151)
[ERROR] [robosense_hw_interface_ros_wrapper_node-1]: process has died [pid 227788, exit code -11, cmd '~/nebula/install/nebula_ros/lib/nebula_ros/robosense_hw_interface_ros_wrapper_node --ros-args -r __node:=robosense_hw_driver --params-file /tmp/launch_params_qqyplla2 --params-file /tmp/launch_params_93im3b1u --params-file /tmp/launch_params_muoka2yk --params-file /tmp/launch_params_t9h601xz --params-file /tmp/launch_params_9ui6geiu --params-file /tmp/launch_params_emphvkz7 --params-file /tmp/launch_params_o6q2s0zs'].

symbol lookup error: ~/nebula/install/nebula_ros/lib/librobosense_hw_monitor_ros_wrapper.so: undefined symbol: _ZN6nebula7drivers19RobosenseInfoDriverC1ERKSt10shared_ptrINS0_28RobosenseSensorConfigurationEE

demangles to nebula::drivers::RobosenseInfoDriver::RobosenseInfoDriver(std::shared_ptr<nebula::drivers::RobosenseSensorConfiguration> const&)

@knzo25
Copy link
Collaborator Author

knzo25 commented May 14, 2024

Aah, the monitor. I only tested the driver itself by forcing a the initialization in the constructor. I will fix it in the next commit

@knzo25
Copy link
Collaborator Author

knzo25 commented May 14, 2024

Fixed in a0ef63b

kenzo@kenzo-TUF:~/workspace/nebula_sprint$ ldd install/nebula_ros/lib/librobosense_hw_monitor_ros_wrapper.so  | grep libnebula_decoders_robosense_info
	libnebula_decoders_robosense_info.so => /home/kenzo/workspace/nebula_sprint/install/nebula_decoders/lib/libnebula_decoders_robosense_info.so (0x00007dbb5b4c3000)
kenzo@kenzo-TUF:~/workspace/nebula_sprint$ objdump -TC /home/kenzo/workspace/nebula_sprint/install/nebula_decoders/lib/libnebula_decoders_robosense_info.so | grep "nebula::drivers::RobosenseInfoDriver::RobosenseInfoDriver(std::shared_ptr<nebula::drivers::RobosenseSensorConfiguration> const&)"
00000000000084b0 g    DF .text	00000000000004b8  Base        nebula::drivers::RobosenseInfoDriver::RobosenseInfoDriver(std::shared_ptr<nebula::drivers::RobosenseSensorConfiguration> const&)
00000000000084b0 g    DF .text	00000000000004b8  Base        nebula::drivers::RobosenseInfoDriver::RobosenseInfoDriver(std::shared_ptr<nebula::drivers::RobosenseSensorConfiguration> const&)

@mojomex
Copy link
Collaborator

mojomex commented May 14, 2024

@knzo25 Now there's no unknown symbol error but a segfault:

[Unknown/Just-In-Time compiled code] (Unknown Source:0)
libnebula_hw_interfaces_robosense.so!std::this_thread::sleep_for<long, std::ratio<1l, 1l> >() (/usr/include/c++/11/bits/this_thread_sleep.h:82)
libnebula_hw_interfaces_robosense.so!nebula::drivers::RobosenseHwInterface::InfoInterfaceStart(nebula::drivers::RobosenseHwInterface * const this) (/home/maxschmeller/nebula-knzo/src/nebula_hw_interfaces/src/nebula_robosense_hw_interfaces/robosense_hw_interface.cpp:144)
librobosense_hw_ros_wrapper.so!nebula::ros::RobosenseHwInterfaceRosWrapper::StreamStart(nebula::ros::RobosenseHwInterfaceRosWrapper * const this) (/home/maxschmeller/nebula-knzo/src/nebula_ros/src/robosense/robosense_hw_interface_ros_wrapper.cpp:46)
librobosense_hw_ros_wrapper.so!nebula::ros::RobosenseHwInterfaceRosWrapper::RobosenseHwInterfaceRosWrapper(nebula::ros::RobosenseHwInterfaceRosWrapper * const this,  options) (/home/maxschmeller/nebula-knzo/src/nebula_ros/src/robosense/robosense_hw_interface_ros_wrapper.cpp:38)
librobosense_hw_ros_wrapper.so!__gnu_cxx::new_allocator<nebula::ros::RobosenseHwInterfaceRosWrapper>::construct<nebula::ros::RobosenseHwInterfaceRosWrapper, rclcpp::NodeOptions const&>(nebula::ros::RobosenseHwInterfaceRosWrapper * __p) (/usr/include/c++/11/ext/new_allocator.h:160)
librobosense_hw_ros_wrapper.so!std::allocator_traits<std::allocator<nebula::ros::RobosenseHwInterfaceRosWrapper> >::construct<nebula::ros::RobosenseHwInterfaceRosWrapper, rclcpp::NodeOptions const&>(nebula::ros::RobosenseHwInterfaceRosWrapper * __p) (/usr/include/c++/11/bits/alloc_traits.h:516)
librobosense_hw_ros_wrapper.so!std::_Sp_counted_ptr_inplace<nebula::ros::RobosenseHwInterfaceRosWrapper, std::allocator<nebula::ros::RobosenseHwInterfaceRosWrapper>, (__gnu_cxx::_Lock_policy)2>::_Sp_counted_ptr_inplace<rclcpp::NodeOptions const&>(std::_Sp_counted_ptr_inplace<nebula::ros::RobosenseHwInterfaceRosWrapper, std::allocator<nebula::ros::RobosenseHwInterfaceRosWrapper>, (__gnu_cxx::_Lock_policy)2> * const this) (/usr/include/c++/11/bits/shared_ptr_base.h:519)
librobosense_hw_ros_wrapper.so!std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<nebula::ros::RobosenseHwInterfaceRosWrapper, std::allocator<nebula::ros::RobosenseHwInterfaceRosWrapper>, rclcpp::NodeOptions const&>(nebula::ros::RobosenseHwInterfaceRosWrapper *& __p, std::__shared_count<(__gnu_cxx::_Lock_policy)2> * const this) (/usr/include/c++/11/bits/shared_ptr_base.h:650)
librobosense_hw_ros_wrapper.so!std::__shared_ptr<nebula::ros::RobosenseHwInterfaceRosWrapper, (__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<nebula::ros::RobosenseHwInterfaceRosWrapper>, rclcpp::NodeOptions const&>(std::__shared_ptr<nebula::ros::RobosenseHwInterfaceRosWrapper, (__gnu_cxx::_Lock_policy)2> * const this) (/usr/include/c++/11/bits/shared_ptr_base.h:1342)
librobosense_hw_ros_wrapper.so!std::shared_ptr<nebula::ros::RobosenseHwInterfaceRosWrapper>::shared_ptr<std::allocator<nebula::ros::RobosenseHwInterfaceRosWrapper>, rclcpp::NodeOptions const&>(std::shared_ptr<nebula::ros::RobosenseHwInterfaceRosWrapper> * const this) (/usr/include/c++/11/bits/shared_ptr.h:409)
librobosense_hw_ros_wrapper.so!std::allocate_shared<nebula::ros::RobosenseHwInterfaceRosWrapper, std::allocator<nebula::ros::RobosenseHwInterfaceRosWrapper>, rclcpp::NodeOptions const&>() (/usr/include/c++/11/bits/shared_ptr.h:863)
librobosense_hw_ros_wrapper.so!std::make_shared<nebula::ros::RobosenseHwInterfaceRosWrapper, rclcpp::NodeOptions const&>() (/usr/include/c++/11/bits/shared_ptr.h:879)
librobosense_hw_ros_wrapper.so!rclcpp_components::NodeFactoryTemplate<nebula::ros::RobosenseHwInterfaceRosWrapper>::create_node_instance(rclcpp_components::NodeFactoryTemplate<nebula::ros::RobosenseHwInterfaceRosWrapper> * const this, const rclcpp::NodeOptions & options) (/opt/ros/humble/include/rclcpp_components/rclcpp_components/node_factory_template.hpp:45)
libcomponent_manager.so!rclcpp_components::ComponentManager::on_load_node(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<composition_interfaces::srv::LoadNode_Request_<std::allocator<void> > >, std::shared_ptr<composition_interfaces::srv::LoadNode_Response_<std::allocator<void> > >) (Unknown Source:0)
libcomponent_manager.so!std::_Function_handler<void (std::shared_ptr<rmw_request_id_s>, std::shared_ptr<composition_interfaces::srv::LoadNode_Request_<std::allocator<void> > >, std::shared_ptr<composition_interfaces::srv::LoadNode_Response_<std::allocator<void> > >), std::_Bind<void (rclcpp_components::ComponentManager::*(rclcpp_components::ComponentManager*, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>))(std::shared_ptr<rmw_request_id_s>, std::shared_ptr<composition_interfaces::srv::LoadNode_Request_<std::allocator<void> > >, std::shared_ptr<composition_interfaces::srv::LoadNode_Response_<std::allocator<void> > >)> >::_M_invoke(std::_Any_data const&, std::shared_ptr<rmw_request_id_s>&&, std::shared_ptr<composition_interfaces::srv::LoadNode_Request_<std::allocator<void> > >&&, std::shared_ptr<composition_interfaces::srv::LoadNode_Response_<std::allocator<void> > >&&) (Unknown Source:0)
libcomponent_manager.so![Unknown/Just-In-Time compiled code] (Unknown Source:0)
librclcpp.so!rclcpp::Executor::execute_service(std::shared_ptr<rclcpp::ServiceBase>) (Unknown Source:0)
librclcpp.so!rclcpp::Executor::execute_any_executable(rclcpp::AnyExecutable&) (Unknown Source:0)
librclcpp.so!rclcpp::executors::SingleThreadedExecutor::spin() (Unknown Source:0)

@mojomex
Copy link
Collaborator

mojomex commented May 14, 2024

If you need a PCAP for testing, you can take the ones here.
I am using helios_rewrited.pcapng (has to be renamed to pcap because it is not a valid pcapng).

Also, the PCAP replay script:
tier4/pcap_replay can be used to replay the files and remap them to localhost:

Terminal 1

cd nebula_ws
source install/setup.bash
ros2 launch nebula_ros nebula_launch.py sensor_model:=Helios sensor_ip:=127.0.0.1 host_ip:=127.0.0.1 data_port:=2010 gnss_port:=3010

Terminal 2

cd pcap_replay/pcap_replay
./replay.py -l path/to/my.pcap

@mojomex
Copy link
Collaborator

mojomex commented Jun 6, 2024

Since

has been closed in favor of the already merged

PR on develop, it would be best to move this PR to develop as well and make the necessary changes for the single node architecture. @knzo25, if you are too busy right now, I can make the necessary changes if so desired.

@knzo25
Copy link
Collaborator Author

knzo25 commented Jun 6, 2024

Since

has been closed in favor of the already merged

PR on develop, it would be best to move this PR to develop as well and make the necessary changes for the single node architecture. @knzo25, if you are too busy right now, I can make the necessary changes if so desired.

I will be doing it in a few hours. Btw, try not to close/merge other people PRs without consultation. For the robosense one, since Mehmet wrote the code, I wanted to confirm he had no concerns about that line of code

@knzo25 knzo25 changed the base branch from main to develop June 6, 2024 07:30
@mojomex
Copy link
Collaborator

mojomex commented Jun 6, 2024

try not to close/merge other people PRs without consultation

The PR closed itself after changing the branch to develop and rebasing (as there were no changes in the branch after rebase), I agree this was not optimal

Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>
Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>
Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>
…nd cleaned unused parts

Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>
Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>
@knzo25 knzo25 marked this pull request as ready for review June 6, 2024 11:03
@knzo25
Copy link
Collaborator Author

knzo25 commented Jun 6, 2024

@mojomex
I think it is ready for review now

This PR: Summary: 18 packages finished [1min 43s]
Develop: Summary: 18 packages finished [3min 37s]

Tested with colcon test, and ros launch nebula_ros for at least one sensor of each vendor

@knzo25 knzo25 requested a review from mojomex June 6, 2024 11:05
@knzo25 knzo25 changed the title feat(cmake): cmake optimization in progress feat(cmake): make colcon build fast again Jun 6, 2024
Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>
@knzo25
Copy link
Collaborator Author

knzo25 commented Jun 7, 2024

@mojomex
I saw a thread about this
autowarefoundation/autoware.universe#7317
so I though to try it in my desktop. Here are the results:

This PR
Summary: 16 packages finished [1min 6s]

This PR + faster ament
Summary: 39 packages finished [1min 13s]
(note: it is slower since it has to compile ament)

Develop
Summary: 16 packages finished [2min 18s]

Develop + faster ament
Summary: 39 packages finished [2min 0s]

Copy link
Collaborator

@mojomex mojomex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

🟢 Evaluation

🟢 Build Testing

Compiled every package in Nebula with --packages-up-to to see if all dependencies of the respective package are met. Here is the test script used:

pkgs=(
  continental_msgs
  continental_srvs
  nebula_common
  nebula_msgs
  pandar_msgs
  robosense_msgs
  nebula_decoders
  nebula_hw_interfaces
  nebula_tests
  nebula_ros
  nebula_examples
  nebula_sensor_driver
)

for pkg in "${pkgs[@]}"
do
  clear
  echo "====== TEST BUILDING UP TO $pkg ======"
  rm -rf install/ log/ build/
  colcon build --symlink-install --packages-up-to "$pkg" || exit
done

Result: All dependencies (at least at build time) were met.

🟢 Running with RosBag/PCAP

For each vendor, I launched Nebula with either PCAP (Hesai, Robosense) or RosBag (Velodyne). There was no data or real sensor available for Continental, so just launched it without test data.

Result: There were no undefined symbols or segfaults.

🟢 Code Review

The duplicate parameter_descriptors.cpp in nebula_examples is not particularly nice but we ideally don't want to link against nebula_ros either since it is not used in any unit tests. Maybe, as a separate PR, we can make parameter descriptors header-only.

@mojomex mojomex merged commit 1a82516 into tier4:develop Jun 7, 2024
9 checks passed
mojomex added a commit to mojomex/nebula that referenced this pull request Jun 7, 2024
mojomex added a commit that referenced this pull request Jun 26, 2024
…162)

* chore: fix pre-commit versions and clang-format hook failure

* chore(docs): fix documentation pre-commit errors

* chore: fix pre-commit and compiler warnings in all code files modified between main..develop

* chore(yamllint): ignore yaml document start in clang-format config as it is required

* chore: add copyright and license headers

* chore(pre-commit): allow multiple documents in YAML files to make .clang-format file check pass

* chore: make pre-commit pass for parameter schema code

* chore: add copyright and license to all source files

* chore: implement pre-commit suggestions in all CPP/HPP files

* chore: whitespace changes in non-cpp files to satisfy pre-commit

* chore: flake8 changes to satisfy pre-commit

* fix: allow implicit conversion to status types again

* chore: clean up imports

* chore: add override/inline where necessary

* chore(nebula_ros): remove obsolete wrapper base types

* chore: move nolint comments to be robust to formatting linebreaks

* chore(velodyne): fix indentation in velodyne calibration files to satisfy yamllint and ignore them in prettier to prevent conflicting styles

* chore(hesai): fix decoder test config yaml quotations

* chore: whitespace changes

* chore: remove empty, un-parseable local.cspell.json

* chore(prettier): ignore yaml and json files as they are handled by yamllint/clang-tidy respectively

* chore: make pre-commit pass on new files after #146

* chore: update cspell to pass spell-check

* chore: rename contributing.md docs page to make failing link check pass
@mojomex mojomex mentioned this pull request Jul 18, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants