QuanergySystems / quanergy_client_ros

Quanergy ROS driver sample source

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

useRosTime in settings/client.xml doesn't work

worldpotato opened this issue · comments

The problem:

The ros node doesn't use the ros time even if the value for useRosTime is set to true. The default value is true, see:

<useRosTime>true</useRosTime>

How it should work:

The ros node should use the ros time if it is set in the settings.

possible solution

I think the option should be renamed to use-ros-time because it is read with as that name value. See:

("use-ros-time", po::bool_switch(&ros_node_settings.use_ros_time),

Thanks for pointing this out. It looks like the problem is the parent node name for the setting. The code is expecting Settings.RosNode.useRosTime:

use_ros_time = settings.get("Settings.RosNode.useRosTime", use_ros_time);

While the default settings uses Settings.ClientRos.useRosTime:

I will get this fixed soon. In the meantime, you can change ClientRos to RosNode in the settings file or use the command line option (--use-ros-time) to override.

Yes, figured it out on the weekend, too. But our lidar (M8) got damaged and I had no chance to test it properly.