compas_fab icon indicating copy to clipboard operation
compas_fab copied to clipboard

Add examples for scaling a robot.

Open yck011522 opened this issue 4 years ago • 2 comments

Feature Request

It would be nice to have an example showing how to load a robot from URDF / ROS (robot in meters) and then scale it (for millimeters).

robot = client.load_robot(load_geometry=True)
robot.artist = RobotArtist(robot.model)
robot.scale(1000)

It should also be ensured that scale() can be called before or after setting the artist, and lead to the same result.

Additionally, it should be clarified (eg in the documentation) whether scale() is idempotent or not, ie. calling .scale(100) twice in a raw causes twice the scaling (ie 10000) or is it idempotent in that multiple identical calls cause the same effect. Ideally, the call should be idempotent.

yck011522 avatar Jun 04 '20 14:06 yck011522

Hello good! I would like to add this example to the repository in a pr. Do you have a directory or folder where you would prefer me to add the example? or just in the root of the directory?

pablocorbalann avatar Feb 25 '21 22:02 pablocorbalann

Hi @pblcc ! Great! Yes, we have a place that would make sense, I would suggest to put these examples under the examples/02_description_models together with other related examples: https://github.com/compas-dev/compas_fab/tree/main/docs/examples/02_description_models

Thanks!

gonzalocasas avatar Feb 26 '21 09:02 gonzalocasas