I am trying to set up a Lidar, IMU, and depth camera in Webots on a ROS 2 robot in its xacro file (starting with just the Lidar).
I currently have the following:
<webots>
<plugin type="webots_ros2_driver::Ros2Lidar">
<frameName>laser_frame</frameName>
<enabled>true</enabled>
<scanRate>10</scanRate>
<topicName>/scan</topicName>
<alwaysOn>true</alwaysOn>
</plugin>
<plugin type="webots_ros2_control::Ros2Control"/>
</webots>
I'm not sure about the parameters since I just adapted it from the IMU plugin from the turtlebot webots_ros2 example. But the only error I have is this:
[driver-2] ModuleNotFoundError: No module named 'webots_ros2_driver::Ros2Lidar'
[driver-2] terminate called after throwing an instance of 'std::runtime_error'
[driver-2] what(): The webots_ros2_driver::Ros2Lidar plugin cannot be found (C++ or Python).
I've found the Ros2Lidar plugin locally (I think), but it doesn't seem to be able to find it. The demos all work, but the vast majority are just from robots built IN Webots .proto files. But I need to use ROS for the robot itself that uses a xacro file.
Any hints would be appreciated.
Thanks in advance, Craig