cyberbotics / webots

Webots Robot Simulator
https://cyberbotics.com
Apache License 2.0
3.2k stars 1.68k forks source link

ConveyorPlatform PROTO object has trouble to carry objects on its belt and is not used anywhere #1483

Closed ghost closed 4 years ago

ghost commented 4 years ago

The ConveyorPlatform PROTO object does not carry elements as it should be, instead they go through the belt and their behavior is undefined. Objects might get carried out after a while or stay stuck on/in the belt.

Example video

The animationTexture field should also be removed from the PROTO file, since it is not used anymore in scenes. Instead it should be automatically computed from the conveyor belt length, so it could be (enventually) modified without altering the animation texture speed.

Following is a world using the element:

#VRML_SIM R2020b utf8
WorldInfo {
  info [
    "The MyBot robot, the robot used in the tutorial of Webots"
  ]
  title "MyBot"
}
Viewpoint {
  orientation 0.1157765509215446 0.9791030558957758 0.1671914955739801 4.234990908705313
  position -0.9314227924093998 0.3505959725554629 -0.2764105164625461
}
TexturedBackground {
}
TexturedBackgroundLight {
}
RectangleArena {
  floorSize 2 2
}
ConveyorPlatform {
  translation 0 0.05 0
}
Solid {
  translation -0.361142 0.1 0.140386
  children [
    DEF A_BOX Shape {
      appearance PBRAppearance {
        baseColor 0.333333 1 0
        roughness 1
        metalness 0
      }
      geometry Box {
        size 0.05 0.025 0.05
      }
    }
  ]
  boundingObject USE A_BOX
  physics Physics {
    mass 2
  }
}
omichel commented 4 years ago

Also a simulation world using this ConveyorPlatform PROTO should be added.

DavidMansolino commented 4 years ago

I have tried and for me it is working fine (with the Mac mini), but I have the feeling that the problem might come from the bounding objects. The bounding object of the track itself is extremely thin, the box might touch the bounding box beneath the track (which is not part of the track itself), we should try to make the box bounding object beneath the track part of the track bounding object, this looks safer.