remaro-network / tudelft_hackathon

REMARO Summer School Delft 2022 - Underwater robotics hackathon
32 stars 4 forks source link

VSCode discussion #30

Closed Rezenders closed 2 years ago

Rezenders commented 2 years ago

Some comments regarding the vscode docker integration:

Documentation:

  1. Add link with instructions on how to install visual studio (just link to vsc website)
  2. Since the vsc requires to run docker without sudo we should add instructions or a link pointing to instructions on how to set docker to run without sudo
  3. Instructions for installing the vscode docker extension (Remote - Containers?)
  4. We can remove from the readme the ros2_ws part, it doesn't have anything that is being used
  5. In ardupilot instructions part change cd ardupilot to cd /workspaces/tudelft_hackathon/dockerfiles/ros1-2-ignition/ardupilot
  6. Move the . ~/.profile from troubleshooting to before the sim_vehicle command
  7. Still missing instructions on how to run everything combined. Basically what is written here

General comments:

  1. Since we are not using anything with ros1 I think we should remove everything related to it. Documentation and from the containers.
  2. It is kind of confusing that the hackathon repo is duplicated on /workspaces/tudelft_hackathon and /tudelft_hackathon_ws/src/tudelft_hackathon
  3. Necessary to source remaro_world files
  4. Necessary to install mavros deps
  5. I think we should remove the part concerning the installation of ardupilot and just use this image as base. It already has ignition + ros2 + ardupilot+ hackathon code. Basically in the first line change FROM rezenders/ignition:foxy-nvidia to FROM rezenders/ignition:hackathon. This would also solve points 9, 10, and 11
  6. Also I am not sure if I understand what the vscode plugin for ros is doing, and why it is creating the /workspaces/ dir. Since everything that is required is already contained in the docker images, don't we just need the vscode plugin to open the graphical interface and mount the required volumes? I would suggest remove everything that is not needed, to have the minimal setup necessary
  7. Ignition version is wrong, it is not sourcing the one that was built from source. And if I source the folder with ignition built from source, the graphical interface stops working, it says it is missing opengl. I was using nvidia-docker to be able to access opengl.
ign gazebo --version
Ignition Gazebo, version 3.13.0
Copyright (C) 2018 Open Source Robotics Foundation.
Released under the Apache 2.0 License.
Rezenders commented 2 years ago

Commit b70a1a3 solves points 1, 2, and 6

Rezenders commented 2 years ago

I created a draft PR #31 to solve this issues. Still need to address points 13 and 14. The more urgent one is 14, since without solving this point it is not possible to reproduce the hackathon activities. I will try to address it tomorrow. Also, if we keep these changes to the dockerfile using the ignition:hackathon image as base, the submodules can also be removed since they are not used.

olayasturias commented 2 years ago

If I try to run the node after directly opening the container, I get the error: ros2: command not found -> it is necessary to source ros (could we done with the shortcut 's') after sourcing ros, I get the following error: Package 'tudelft_hackathon' not found: "package 'tudelft_hackathon' not found, searching: ['/opt/ros/foxy'] Which workspace do I need to source? That is, where is tudelft_hackaton installed?

Rezenders commented 2 years ago

Hey Olaya. Try updating the docker image rezenders/ignition:hackathon. I just updated it in the dockerhub repo. If that doesn't work let me know.

jpcoffelt commented 2 years ago

On the "Run Ardupilot with software in the loop (SITL)" step of the instructions:

ros@ubu:/workspaces/tudelft_hackathon/dockerfiles/ros1-2-ignition/ardupilot$
Tools/autotest/sim_vehicle.py -L RATBeach -v ArduSub --model=JSON --out=udp:0.0.0.0:14550 --console

I get the following error: bash: Tools/autotest/sim_vehicle.py: No such file or directory

Rezenders commented 2 years ago

I added a few commits to PR #31. Now it is sourcing everything that is necessary, and it should work for a system with a nvidia gpu.

For systems without nvidia the .devcontainer Dockerfile should start from rezenders/ignition:hackathon-non-nvidia and in devcontainer.json the build args should be different for amd and intel gpu, like here.

@olayasturias can you review that PR and check if you agree with all the changes or point out anything you don't agree with so we can close it

olayasturias commented 2 years ago

When running the launch file, I got the following error>

what(): UAS: GeographicLib exception: File not readable /usr/share/GeographicLib/geoids/egm96-5.pgm | Run install_geographiclib_dataset.sh script in order to install Geoid Model dataset! [ERROR] [mavros_node-4]: process has died [pid 21419, exit code -6, cmd '/home/docker/tudelft_hackathon_ws/install/mavros/lib/mavros/mavros_node --ros-args --params-file /tmp/launch_params_hjih9ox7']. [ign gazebo-1] Unable to find or download file

I fixed it by installing geographic lib as follows>

wget https://raw.githubusercontent.com/mavlink/mavros/master/mavros/scripts/install_geographiclib_datasets.sh
sudo bash ./install_geographiclib_datasets.sh   

Then I get this error>

ModuleNotFoundError: No module named 'mavros_wrapper'

Despite of ros-foxy-mavros being installed. These errors don't seem to affect the performance of the bluerov anyway.

I think we can merge the PR directly :)