Skip to content

Errors and Problems

Davood Dorostkar edited this page Oct 9, 2024 · 7 revisions

using mirrors for rosdep

  1. remove current configs
sudo rm -rf /etc/ros/rosdep/sources.list.d/*
rm -rf ~/.ros/rosdep
  1. add new configs
sudo mkdir -p ~/.ros/rosdep/sources.list.d
sudo mkdir -p /etc/ros/rosdep/sources.list.d/
sudo curl -o /etc/ros/rosdep/sources.list.d/10-mirror.list https://mirrors.tuna.tsinghua.edu.cn/github-raw/ros/rosdistro/master/rosdep/sources.list.d/20-default.list
sudo curl -o ~/.ros/rosdep/sources.list.d/20-custom.list https://mirrors.tuna.tsinghua.edu.cn/github-raw/ros/rosdistro/master/rosdep/sources.list.d/20-default.list
  1. edit env variable
export ROSDISTRO_INDEX_URL=https://mirrors.tuna.tsinghua.edu.cn/rosdistro/index-v4.yaml
echo 'export ROSDISTRO_INDEX_URL=https://mirrors.tuna.tsinghua.edu.cn/rosdistro/index-v4.yaml' >> ~/.bashrc
  1. now you can update rosdep
rosdep update

If not recognizing ROS syntax:

  1. Edit your settings inside ros_ws/.vscode/c_cpp_properties.json as this.
  2. Also make sure you have these plugins installed: ROS, CMake, C/C++, Clang-format
  3. Enter catkin_make
{
  "configurations": [
    {
      "name": "Linux",
      "includePath": [
        "${workspaceFolder}/**",
        "/opt/ros/noetic/include/**",
        "/usr/include/**"
      ],
      "defines": [],
      "compilerPath": "/usr/bin/gcc",
      "cStandard": "c11",
      "cppStandard": "c++14",
      "intelliSenseMode": "gcc-x64"
    }
  ],
  "version": 4
}