2

I want to simulate a Thymio 2 drawing sewing patterns on fabric. So I created a world and implemented the behavior of the robot. Then I added a Thymio2Pen to the bodySlot but the pen didn't draw at all. The robot did however drive how it is supposed to. I then created a different, very simple world with only the Thymio, the Thymio2Pen and a default floor and added a controller which set both motor velocities to 5. And again the robot did drive but it didn't draw.

So now I don't know why the pen isn't working. Maybe someone has had the same problem or knows why the pen doesn't draw.

I am using a Ubuntu Virtual Machine. The Texture Quality of Webots is medium. Tank you for your answers

marc_s
  • 675,133
  • 158
  • 1,253
  • 1,388
User883
  • 21
  • 1

1 Answers1

0

This is because the pen device need a textured floor in order to be able to draw on it. Also, the texture mapping of the floor should be simple. I would recommend you to copy the rectangle arena floor used in the thymio2_pen.wbt example:

RectangleArena {
  floorTileSize 1 1
  floorAppearance PBRAppearance {
    baseColorMap ImageTexture {
      url [
        "textures/paper.jpg"
      ]
    }
    roughness 1
    metalness 0
  }
}
Olivier Michel
  • 602
  • 3
  • 8
  • Hi Olivier, thank you for your answer. I copy and pasted the RectangleArena from the thxmio"_pen.wbt world to my world, but the pen is still not working. And I also changed the color of the pen, so that should'nt be the problem. – User883 May 30 '20 at 12:55
  • In that case, I would recommend you to start from the working *thymio_pen.wbt* example, modify it step-by-step towards your own example and see at which point the pen stops working. You will then understand the cause of the problem. – Olivier Michel Jun 09 '20 at 09:26