Skip to main content
11 events
when toggle format what by license comment
Apr 17, 2023 at 21:21 vote accept Craig MS
Apr 6, 2023 at 7:04 comment added Yannick Goumaz You should be able to combine the gazebo tag to import your sensor and the webots tag (containing the device tag in my answer) to enable and configure the imported Lidar. We would love to review your contribution on urdf2webots.
Apr 6, 2023 at 0:31 comment added Craig MS Looking into the code it doesn't look too tricky to add GPS into urdf2webots so I might do that.
Apr 5, 2023 at 18:29 comment added Craig MS Yeah. I've just discovered that the <webots> tag is irrelevant to the lidar working correctly. The only thing that seems to use that tag is the ROS2Control plugin for diffdrive. The gazebo tag alone is enough to implement the lidar successfully and activate it. But the camera doesn't start unless I manually "override the controller" in the Robot window interface. Additionally, I can't seem to figure out how to implement a GPS... I'm using the standard gazebo GPS tag like with the other sensors but maybe GPS isn't implemented in whichever script the URDFSpawner() node uses? New question?
Apr 4, 2023 at 10:25 comment added Yannick Goumaz You are right, the gazebo tag is mandatory for the sensor to correctly be added to the generated PROTO file. I will take a look if we could simplify this part of the converter. On another note, what do you mean by "I still had to enable them in webots"? Is the enable tag in the URDF not enough to create the topics and enable the corresponding Lidar (and other sensors)?
Apr 3, 2023 at 22:33 comment added Craig MS I solved this! Apparently, the URDFspawner script can import using gazebo tags... a bit weird but okay. I managed to get the robot importing and working just by using <gazebo> <sensor> tags in the URDF. I still had to enable them in webots but after that they worked as expected.
Apr 3, 2023 at 8:14 comment added Craig MS Ah thanks for the clarification! Does setting these devices in the urdf require a webots proto in addition to the urdf? Devices don't seem to be added when I import from a xacro/urdf. I have devices defined in the xacro file and everything imports spawns in webots properly including the ros2_controllers, but Lidars and such don't seem to come along?
Apr 3, 2023 at 6:21 comment added Yannick Goumaz I am very sorry for the confusion. I thought I had changed this field. In fact, the name of the Lidar in Webots should be given in the reference of the device tag. I have edited my answer.
Apr 3, 2023 at 6:17 history edited Yannick Goumaz CC BY-SA 4.0
added 14 characters in body
Apr 1, 2023 at 3:25 comment added Craig MS Thanks for the reply! I've tried adding the Lidar as you described but I haven't seen anything show up in webots, nor are there topicspublished in ROS 2. I can't see any errors either so there's no indication that it's failing. I have the frameName linked with the urdf physical lidar shape. But it doesn't seem to be working. Any ideas? Does the reference="hokuyo" refer to a hardware model? Or is it just a name?
Mar 31, 2023 at 10:58 history answered Yannick Goumaz CC BY-SA 4.0