Differences

This shows you the differences between two versions of the page.

Link to this comparison view

tutorials:demo:fetch_and_place_2 [2021/11/03 16:33] – created arthurtutorials:demo:fetch_and_place_2 [2021/11/03 16:38] (current) arthur
Line 172: Line 172:
 This should have spawned a green sausage on the floor near the origin of the "map" coordinate frame. This should have spawned a green sausage on the floor near the origin of the "map" coordinate frame.
 {{ :tutorials:demo:weisswurst.png?600 |}} {{ :tutorials:demo:weisswurst.png?600 |}}
 +
 +==== Visualizing Coordinates ====
 +
 +If you want to know if a coordinate you defined is correct, you can visualize the axis of the coordinate frame in the Bullet World and see for yourself.
 +Try the following:
 +
 +<code lisp>
 +PP-TUT> (visualize-coordinates :bottle)
 +</code>
 +This will spawn a coordinate frame on our bottle object.
 +The argument here is the object type for which we want to visualize the coordinates.
 +Make sure you use '':'' in front of the bottle because it's an object type.
 +{{ :tutorials:demo:bottle_coordinate.png?600 |}}
 +
 +You can also visualize the coordinates of an object with a specific name:
 +<code lisp>
 +PP-TUT> (spawn-object '((1.5 1 1) (0 0 0 1)) :weisswurst 'wurst-1 '(0 1 0))
 +PP-TUT> (visualize-coordinates 'wurst-1)
 +</code>
 +This will spawn a green sausage on the sink counter and visualize its coordinate frame.
 +Note how here we used the name of the object, '''wurst-1'', instead of its type, '':weisswurst''. **Note:**//The
 +weisswurst might have a different coordinate axes than that shown in the picture below for you below because of
 +its shape and the randomness of the simulation//
 +{{ :tutorials:demo:wurst_coordinate.png?600 |}}
 +
 +You can also visualize poses that don't have any objects on them yet, for example:
 +<code lisp>
 +PP-TUT> (init-projection)
 +PP-TUT> (visualize-coordinates *base-pose-near-table*)
 +</code>
 +You will see the coordinate near the table on the right side of the kitchen visualized.
 +{{ :tutorials:demo:base_pose_coordinate.png?600 |}}
 +
 +You can also change the scale of the coordinate frame, if you don't quite see it:
 +<code lisp>
 +PP-TUT> (visualize-coordinates *base-pose-near-table* 1.0)
 +</code>
 +That will make the axes 1 meter long.
 +{{ :tutorials:demo:base_pose_coordinate_large_.png?600 |}}
 +
  
 ==== Perceiving Objects ==== ==== Perceiving Objects ====
Line 269: Line 309:
  
 ''setf'' is used to assign a value to a variable. ''setf'' is used to assign a value to a variable.
 +
  
 ==== Picking up Objects ==== ==== Picking up Objects ====