Bash rosrun在找到我自己的柳絮工作区后无法工作
我正在遵循,在创建自己的包之后,我面临以下行为: 如果尝试执行任何已安装的程序包(例如,Bash rosrun在找到我自己的柳絮工作区后无法工作,bash,ros,catkin,Bash,Ros,Catkin,我正在遵循,在创建自己的包之后,我面临以下行为: 如果尝试执行任何已安装的程序包(例如,any_-package),我会得到以下错误: [rosrun] Couldn't find executable named <any_package> below /opt/ros/kinetic/share/<any_package> [rosrun] Found the following, but they're either not files [rosrun] or no
any_-package
),我会得到以下错误:
[rosrun] Couldn't find executable named <any_package> below /opt/ros/kinetic/share/<any_package>
[rosrun] Found the following, but they're either not files
[rosrun] or not executable:
[rosrun] /opt/ros/kinetic/share/<any_package>
我假设你的工作区被污染了。 我假设您刚刚将
my_package
复制到my_package_2
,而没有在my_package_2
中编辑package.xml
文件。
中没有真正提到它,因为它假定您使用正确的命令来创建具有唯一包名的清单文件。
只需按如下方式编辑名称标记:
<name>my_package</name>
myu包
到
my_package_2
在相应的文件夹中。请更具体一些!你使用什么操作系统?你的工作区看起来怎么样?普通的Ubuntu 16.04。工作区与教程中的工作区完全相同。您的链接指向一长串教程步骤/任务。您能否提供一个更具体的链接,指向您遇到问题的本教程的确切部分。这会让其他人更容易帮你解决问题。当然,我已经更新了链接!当然,它提供了
多个名称相同的包“my_package”…
。我将编辑问题。如果有帮助,不要忘记将答案标记为正确!
You have to make sure you edit CmakeLists.txt according to your compile version, c++ executable declaration & Specify libraries to link a library
Below are step step modification and then run catkin_make before running your project:
step 1
add_compile_options(-std=c++11)
step 2
## Declare a C++ executable
## With catkin_make all packages are built within a single CMake context
## The recommended prefix ensures that target names across packages don't collide
add_executable(${PROJECT_NAME}_node src/myproject_node.cpp)
step 3
## Specify libraries to link a library or executable target against
target_link_libraries(${PROJECT_NAME}_node
${catkin_LIBRARIES}
)
<name>my_package_2</name>
You have to make sure you edit CmakeLists.txt according to your compile version, c++ executable declaration & Specify libraries to link a library
Below are step step modification and then run catkin_make before running your project:
step 1
add_compile_options(-std=c++11)
step 2
## Declare a C++ executable
## With catkin_make all packages are built within a single CMake context
## The recommended prefix ensures that target names across packages don't collide
add_executable(${PROJECT_NAME}_node src/myproject_node.cpp)
step 3
## Specify libraries to link a library or executable target against
target_link_libraries(${PROJECT_NAME}_node
${catkin_LIBRARIES}
)