-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add devcontainer configuration files #109
base: noetic
Are you sure you want to change the base?
Conversation
7e95e9b
to
61bd5eb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for submitting this, we will test on our end. This review is just looking over the code as a first step. In regards to the mac support I am much more in favor of 2 because that allows us to not be tied to vscode which not everyone uses (if I'm understanding correctly).
.devcontainer/build.sh
Outdated
@@ -0,0 +1,5 @@ | |||
#!/bin/bash | |||
|
|||
cd /home/vscode/catkin_ws/src; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line assumes vscode is setup in the /home directory. Is that a reasonable assumption?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a comment explaining how the required folder will be created beforehand.
.devcontainer/build.sh
Outdated
#!/bin/bash | ||
|
||
cd /home/vscode/catkin_ws/src; | ||
./mushr/mushr_utils/install/mushr_install.bash --trivial-only; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the difference between trivial and non-trivial?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By trivial, I answering "no" to all prompted questions. The use of word "trivial" was inspired by how apt
uses that word. See https://linux.die.net/man/8/apt-get
--trivial-only
Only perform operations that are "trivial". Logically this can be considered related to --assume-yes. Where --assume-yes will answer yes to any prompt, --trivial-only will answer no.
I was tempted to use --assume-no
but I haven't seen any other linux command using such wording, but happy to be wrong here and use something else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assume-no
or no-to-all
seems more informative. Trivial to me seems vague
Thanks @schmittlema to starting the review.
I don't follow. Would you elaborate which "2" are you referring to? About VS Code, while I believe it is possible to use other IDEs, I don't think they integrate with devcontainer well, e.g., you might need to start devcontainer container yourself using cli and then try to connect to an ide server from your ide running on the host. So DX benefits you get is not as good, i.e., no more few-click devenv setup. I'm open for a quick chat if you think that can help us communicate better. I just sent you an email about this using your cs address found from your website. If MuSHR team isn't too familiar with devcontainer, I also found this Nav2 doc handy. |
Hey Mike,
I'm sure both of the above are possible, we just need to carefully document how to do this for our users.
Thanks for the clarifications on these. Happy to report that building the image and running teleop do seem to work well and without any hiccups, at least on MacOS. |
I meant |
Nice to meet you @MarkusSchiffer and thanks for taking look. Re. 1. This devcontainer config is following the exact steps mentioned in this Mushr tutorial; see this Re. 2. Funny to see this as this is the same question I had for Mushr team when I was playing with the Mushr project :) You don't need to create a new task.json file since that's just to run Re 3. Hmm.. using foxglove in local browser should work. Did you select "Open connection" => "rosbridge" => and type in "ws://localhost:9090"? I just realized that I didn't mention that in the description. Re. regarding docker-in-docker (@schmittlema). The issue with docker-in-docker not properly working in Apple Silicon machine is irrelevant to other IDE support. One would still need to use VSCode to leverage the noinstall expereince you get from using devcontainer. I was pointing out the incompatibility with M1/M2 assuming many potential users are using M1/M2. Supporting more IDEs than VSCode is ... another topic ... I'm happy to chat about that in another place (maybe in the parent discussion?) but in this PR, I'd like to see if using devcontainer + vscode would dramatically improve onboarding experience of new mushr devs (e.g., capstone class ugrads being able to get started in few clicks/no need to support installation steps from the mushr team). If not, what's missing? |
Hey Mike, |
If you run Btw, if you want to customize the VSCode bash (or other shells) settings (the shell accessible in devcontainer and not the mushr container), you could use dev container extension feature: If you are trying to connect to the running devcontainer from an external terminal, you can use install devcontainer-cli (e.g., via Initially, I've tried both approaches and have been using more of the 1st approach lately[^1]. I didn't like the feel of using terminal within vscode[^2] but the convenience of having all dev tooling (including ide) managed as code/portable across different environment, e.g., cross platform, works on local & remote/browser, (in expense of getting stuck in vscode & devcontainer, similar to how I'm already stuck with other tools like docker) made that awkwardness go away. That's just me, I'm curious to see how it works for the mushr team & its users. [^1] I may change my mind down the road |
Hello @MarkusSchiffer Is there anything else you want me to address? Btw, I cannot merge my own since I don't have write access. |
Hey Mike, Sorry for the delayed response, I've been away for a little while. Again, it seems to me that everything works. However, I personally find that this doesn't greatly simplify things for users since there's still a learning curve with the GitHub devcontainers. Additionally, I feel our official tutorial and docker image is pretty easy to set up and get going in sim for both MacOS and Linux users. Logistically, the MuSHR team is currently a bit understaffed and cannot maintain/create tutorials for this code change at this time (I've graduated and thus don't have lots of time anymore). I think how we'll proceed is somehow acknowledging your fork as some kind of official MuSHR fork for the time being, and point users toward it if they're interested. Hopefully in the near future, we can hire a new group of undergrads who might be able to look into supporting this. |
Ok. Regarding the ease-of-installation, the devcontainer-based installation should be easier if a developer is using VSCode. Based on interacting w/ you in this thread, I noticed the current devcontainer setup--ie of running mushr container within devcontainer--confuses how to run things (e.g., needing to use |
Description
This PR adds devcontainer configuration files that enable developers to open a ready-to-develop/installation-completed Mushr project in VSCode running on a local linux machine. For more details, see #108.
Steps to Test
via GitHub Action
Run "CI" workflow here
Manually
Before start, make sure you have VSCode, docker, and Dev Containers VSCode extension installed on your machine.
mjyc/mushr
repository to your local filesystem and switch tonoetic-devcontainer
branchlocalhost:8080
to open the foxglove studio webapp where you can import thefoxglove_layout.json
, tweak your visualization panels, etc.NOTE The dev container setup in this PR--more specifically docker-in-docker--does not work on mac machines with apple silicon. Checkout these two links for details:
docker-in-docker
fail to start with amd64 image on macOS M1 devcontainers/features#219Two thoughts on this issue:
docker-compose up
(while running$ ./mushr/mushr_utils/install/mushr_install.bash
), but the container image specified in docker-compose-xxx.yaml can be directly specified.devcontainer
. But taking this approach will require bigger changes (and confuse the users, etc.), so I took a more incremental approach that requires docker-in-docker.