Advantage Scope Game Piece Visualization

Does anyone know how I can visualize a note in my shooter when the beam break detects it? I couldnt find any example code in their documentation or CD thread. Thank You!

MapleSim! MapleSim

Yeah, I’m using maplesim, How would I use it to visualize a gamepiece inide of the robot?

Game pieces are visualized just like any other 3D object. You can publish a Pose3d or Pose3d from the robot program, and then drag the field to the poses list and choose the object type. For showing a game piece in the robot, I would recommend publish a pose array with zero or one items depending on whether the piece should be displayed. When displaying the piece, you’ll need to define a transform for the robot-relative location of the object and publish a 3D pose based on the robot’s current position and that robot-relative transform. Some familiarity with WPILib’s 3D geometry classes will be helpful for that.

MapleSim is unrelated to displaying game pieces in AdvantageScope. It can run as part of the robot program to simulate some kinds of game piece interactions, but everything needs to be publish to AdvantageScope in the format I described (whether the game pieces are real or simulated).

1 Like

Ah, makes sense, Thank you!

1 Like