《看山是山》视觉导航技术系列
学术方向改成了视觉惯性导航技术,打算从学习VINS-mono技术开始。
首先完成ROS系统的使用。
完成第一个ROS工程:helloworld
使用系统:ubuntu18.04
使用软件:vscode2019
使用VScode搭建ROS开发环境
参考鬼木士的博客创建hellowworld,出现以下问题:
- 没有生成exe可执行文件
- 没有生成相应的package包
- 在output里面出现警告:[2021/4/11 下午3:45:48] 在“${workspaceFolder}/build/compile_commands.json”中未找到“helloworld.cpp”。此文件将改用文件夹“test_ros”中来自 c_cpp_properties.json 的 “includePath”。
对于问题三:
在c_cpp_properties.json文件中手动添加 ros工作区的环境,可以消除这个警告
重新编译的话 rospack list可以看到编译得到helloworld软件包
然而
运行:
roscore
rosrun helloworld helloworld
报错:
[rosrun] Couldn't find executable named helloworld below /home/nbwang/project/test_ros/src/helloworld
参考博主qqLML_ZR 说明:
ros入门程序,报错 Couldn‘t find executable named hello below /home/c415/desktop/test/src
原有生成的可执行文件在${workspaceFolder}/build
把生成的可执行文件复制在 ${workspaceFolder}/devel/lib中
再次运行即可成功
——————
不做代码生成者,只做代码搬运工
感谢以上两位大佬qqLML_ZR 和**[鬼木士的博文提供参考。
ROAS+VScode
Predefined variables#
The following predefined variables are supported:
${workspaceFolder} - the path of the folder opened in VS Code
${workspaceFolderBasename} - the name of the folder opened in VS Code without any slashes (/)
${file} - the current opened file
${fileWorkspaceFolder} - the current opened file's workspace folder
${relativeFile} - the current opened file relative to workspaceFolder
${relativeFileDirname} - the current opened file's dirname relative to workspaceFolder
${fileBasename} - the current opened file's basename
${fileBasenameNoExtension} - the current opened file's basename with no file extension
${fileDirname} - the current opened file's dirname
${fileExtname} - the current opened file's extension
${cwd} - the task runner's current working directory on startup
${lineNumber} - the current selected line number in the active file
${selectedText} - the current selected text in the active file
${execPath} - the path to the running VS Code executable
${defaultBuildTask} - the name of the default build task
${pathSeparator} - the character used by the operating system to separate components in file paths