Skip to content

Observations on use of VS Code - Chapter 5 #6

@threent2

Description

@threent2

The following are not exactly errors but things the user should be aware of and work around.

The devcontainer.json refers to the use of docker-compose-gui.yml. This is fine for me but will need amendment for NVIDIA users.

When VS Code loads it does not run the tail end of the user's bashrc file. For me this meant that the "export LIBGL_ALWAYS_SOFTWARE=1" statement which was added to overcome graphical problems earlier was not executed.

Whenever a new terminal is opened in VS Code the sourcing of ros_entrypoint.sh and install/setup.bash needs to be repeated.

I added a batch file inside the src directory so that I could just run that when opening VS Code on subsequent occasions (or when opening another terminal in the running VS Code ).

Contents of src/con_setup.sh

(Comment line : run this once container has been created to complete the setup)
source /ros_entrypoint.sh

colcon build --packages-skip-build-finished

source install/setup.bash

(Comment line : repeat normal .bashrc additional commands - remember to also edit here when base changes)

export ROS_DISTRO=jazzy
source /opt/ros/$ROS_DISTRO/setup.bash

source install/local_setup.bash

source /usr/share/colcon_cd/function/colcon_cd.sh
export _colcon_cd_root=/opt/ros/jazzy/

export GZ_SIM_RESOURCE_PATH=~/gazebo_models
export XDG_RUNTIME_DIR=/run/user/$(id -u)
export LIBGL_ALWAYS_SOFTWARE=1
export WEBOTS_HOME=/usr/local/webots

If there is an easier way to overcome these difficulties I would be pleased to hear it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions