Closed slowrunner closed 1 year ago
Workaround: Added ", optvalue", ", f_optvalue", ", b_optvalue" as appropriate for each declare_parameter() to get it to properly compile.
Also had to change ydlidarlaunch.py removing node from executable, name, namespace to get it to build:
driver_node = LifecycleNode(package='ydlidar_ros2_driver',
executable='ydlidar_ros2_driver_node',
name='ydlidar_ros2_driver_node',
output='screen',
emulate_tty=True,
parameters=[parameter_file],
namespace='/',
)
maybe, @lghrainbow is solve this issue in below PR ?
In my environment, this repository gives the following errors: [ydlidar_ros2_driver_node-1] terminate called after throwing an instance of 'rclcpp::exceptions::UninitializedStaticallyTypedParameterException' [ydlidar_ros2_driver_node-1] what(): Statically typed parameter 'fixed_resolution' must be initialized. [static_transform_publisher-2] [INFO] [1666711686.062313321] [static_tf_pub_laser]: Spinning until stopped - publishing transform
I had to change "resolution_fixed: true" to "fixed_resolution: true" in params/ydlidar.yaml and then the @lghrainbow humble updates worked for me
Oh, sorry for my misunderstanding. You use raspberry pi ? It is different from my environment.(amd64 , Ubuntu 22.04)
Sorry, I'm not geat with git. Can I get a copy of the code that works for Humble on Ubuntu 20.04 Jammy. Is it in the Pull Request somewhere?
Mr Bearing #20 worked for me 😀
@slowrunner "Workaround: Added ", optvalue", ", f_optvalue", ", b_optvalue" as appropriate for each declare_parameter() to get it to properly compile." I'm a ROS2 newbie and don't know what 'optvalue' is nor which is appropriate where. Could you please give example code changes? Thanks!!
This is the version I used by @lghrainbow that compiles under ROS2 Humble / Ubuntu 22.04 Jammy / Python 3.10.6 (Updated 3/19/23 to point to file I used successfully):
I'm using the same environment and getting the same error.
I later made a change to the code, and the compilation passed without a hitch.
std::string str_optvalue = "/dev/ydlidar"; std::string str_port = "port"; node->declare_parameter(str_port,str_optvalue); node->get_parameter("port", str_optvalue);
Compile errors in ROS2 Humble (on Ubuntu 22.04 Server Jammy)