Hey Guys so i did the construct open class (How Robots Move) recently and was wondering i can download the files on the rosject to run locally.
Any help would be appreciated. as up until now i had been working on the rosject to finish my work and now i have to showcase it somewhere so i need to run it locally.
of course.you can download code,and run locally. Github has many similar projects.
What i mean to say is i was working on my own project on the rosject and now that i have completely finished it i want to download it and run it locally for a showcase.
EDIT:
Github has removed authentication by HTTP and it does look like ssh keys are removed between sessions on theconstruct.ai logins.
So this means that you could do the suggested below for ssh, BUT each time you logout and back in you will most likely need to regenerate a new ssh key and add it to git. Unless:
You update your bashrc file ( a file they have made clear is stored ) to keep the ssh private key information available to write it back into the filename initially created by your ssh-keygen command.
Note that while this is “possible” I wouldn’t call it wise or secure. But it is possible.
==================================
Hey @visheshuni if you’re familiar with git and source control, you can do the following in your /ros_ws in the terminal within the browser.
- In Git UI on the web - Create a new repo on git name it whatever you want for instance - ros2_thecontstruct_tutorials
- In Construct.Ai terminal window
- cd ~/ros_ws
- git init
- git remote add origin “the https clone url”
- this should looks something like https://github.com/Your_username/Your_git_repo.git
- vim .gitignore and add the following to it, because the build install and logs really shouldn’t be visible on source control for others to see and you most likely need to rebuild locally anyway.
- */build/
- */install/
- */log/
- git add .
- git commit -m “Some log message”
- this might ask you to run commands like git config --global user.name and user.email. Run those if it asks ( likelky will )
- re-run git commit -m "some message " if the config commands were needed
- git push origin master ( or main depending on how you setup your repo )
Your code should all live in source control now. Meaning you can technically do all your local development, push changes back to your repo, pull those changes into theconstruct.ai env, and both use their resources and your own.
I recommend using the HTTPS version for git instead of SSH in this instance as I don’t know if everytime the env boots, if it will kill ssh keys in theconstruct.ai env. If it does… well you’d have to make a key potentially everytime you want to move things around, which is a pain. So try https first.
Happy coding.
Thank you so much for your response yes I am familiar with git and source control will try that.
Yeah - if it is giving you trouble ping me. I got it working earlier today when I saw this, I had been thinking about doing it but until this I hadn’t really had motivation to.
@gotbordom @visheshuni @2001315lei
You can download a rosject’s file by clicking the download button on the details page.
@bayodesegun yeah that is definitely an option. From my perspective I saw this as an interesting way to keep my work in source control anyway.
I think it just depends on your end goal. Mine was to keep a repo update to date both on my local machine as well as within a class. Well that and it seemed like an interesting thing to see if we could do.
If you’re just looking to have a single copy of the completed work, downloading it is far easier.
Thank you for your reply i have done the git source control as it is far better and can go back to previous changes.