ami-iit / comodo

Suite of parametrized controller with simulation environments for co-design of Humanoid Robots
BSD 3-Clause "New" or "Revised" License
15 stars 4 forks source link

Adding the code and first draft installation #2

Closed CarlottaSartore closed 1 year ago

CarlottaSartore commented 1 year ago

Populating the repository and add first installation procedure.

For now, for urdf-modifier we depend on a fork, I am planning soon to open a PR upstream to fix this

CarlottaSartore commented 1 year ago

Thanks @traversaro ! I wanted to implement this:

Minor comments. I also had a comment on the notebook, but for some reason I can't comment. Instead of downloading a whole repo, it may be faster to just download https://raw.githubusercontent.com/icub-tech-iit/ergocub-gazebo-simulations/master/models/stickBot/model.urdf .

But I am not finding a way to avoid copy the whole repo, via gitpython, (e.g. https://stackoverflow.com/questions/51239168/how-to-download-single-file-from-a-git-repository-using-python) do you know how can be done ? thanks

traversaro commented 1 year ago

But I am not finding a way to avoid copy the whole repo, via gitpython, (e.g. https://stackoverflow.com/questions/51239168/how-to-download-single-file-from-a-git-repository-using-python) do you know how can be done ? thanks

(disclaimer, untested chatgpt generated code, but I think you get the idea):

import urllib.request

url = 'https://raw.githubusercontent.com/icub-tech-iit/ergocub-gazebo-simulations/master/models/stickBot/model.urdf'
destination = 'stickbot_model.urdf'

urllib.request.urlretrieve(url, destination)
CarlottaSartore commented 1 year ago

(disclaimer, untested chatgpt generated code, but I think you get the idea):

Done in a956e56ebd1044072f207b5e312c1e6c0b233d7a

Actually, this meant changing the dependency (and with it the installation) from gitpython to urllib3,at first I was not so happy about it but by thinking more about it, is not a big harm since is used only in the example.

CarlottaSartore commented 1 year ago

Thanks everybody ! Merging !