Closed PymZoR closed 1 year ago
Was this ever solved? I have the same issue at the moment and I still haven't figured out how to get a Lidar (from any device) created from a pure urdf robot.
I am transferring this issue to Urdf2Webots repository, as it directly concerns the importer. The way to import a Lidar has been answered here: https://robotics.stackexchange.com/questions/24596/how-do-i-integrate-webots-sensor-plugins-into-a-ros2-urdf-xacro-file. The combination of gazebo and sensor tags allows to import Webots devices from URDFs and to use them with webots_ros2
plugins.
@omichel Is there a reason why the <gazebo>
tag is mandatory to import sensors? Is it because urdf2webots
was first (and only?) intended to convert gazebo URDFs to Webots PROTOs? If this is the case we may extend it to single <sensor>
tags, as URDFs may be used in webots_ros2
and created from scratch. On another hand, it may be good to encourage users to create their robots in PROTO format. Any thoughts?
Yes, this <gazebo>
tag was supported to ease the Webots conversion from URDF files designed for Gazebo.
I agree it is way better to create and maintain a robot model as a Webots PROTO file and use Webots to export the corresponding URDF model for use with ROS nodes.
Describe the Bug When defining a robot using only one URDF and no existing PROTO,
reference
property of thedevice
tag does not work. In the turtlebot example, it works because the turtlebot already exists in the world file and the urdf is only used for defining webots plugins : https://github.com/cyberbotics/webots_ros2/blob/master/webots_ros2_turtlebot/resource/turtlebot_webots.urdf#L4Steps to Reproduce Consider the following urdf :
NOTE : I added
<collision>
and<visual>
tags to thelaser_link
otherwise it is not created in webots. Probably linked to the issue : https://github.com/cyberbotics/urdf2webots/issues/201The
laser_link
is not created, nor the Lidar object.Expected behavior A Lidar object should exist in Webots and the ROS ropic
/scan
should be advertised.Affected Packages List of affected packages:
System