cyberbotics / urdf2webots

Utility to convert URDF files to Webots PROTO nodes
Apache License 2.0
132 stars 43 forks source link

How to generate a passive joint? #199

Closed Bozenton closed 1 year ago

Bozenton commented 1 year ago

Hi, there

Thanks for your sharing of work!

I want to create a passive joint for my inverted pendulum car model, where the joint connecting car with rod need to be passive. I refer to an example provided by webots:

https://github.com/cyberbotics/webots/blob/9c6469597a29f84dff5fcf05d3443d8fd38947f4/projects/samples/howto/inverted_pendulum/worlds/inverted_pendulum.wbt#L70-L79

I find that its HingeJoint only has device of PositionSensor, but doesn't have a RotationalMotor. Is there any way to make my joint like this when converting urdf file to proto?

Hope for your reply :smiley:

omichel commented 1 year ago

Yes, it should be possible to do this from a URDF file and then convert it to Webots. However, it would be simpler to create it directly in a Webots PROTO or Webots world file, taking inspiration from the example you mention. Why don't you do that?

IDavGal commented 1 year ago

I'm interested in this as well, and cannot find how to do it using the tool. According to the writeRobot code, the motor is created along with the HingeJoint. How would it be possible?

In my case I'm working in a webots simulation for a robot that's defined with a URDF and is subject to change, so I'm generating the proto on runtime.