-
按视频操作建立Python型node时报错
ros2: error: unrecognized arguments: dependencies rclpy -
@郭远雄 把完整指令,操作系统,版本贴出来,估计是你指令打错了
-
ros2 foxy
gyx@gyx-virtual-machine:~/town_ws/src$ ros2 pkg create village_li --build-type ament_python dependencies rclpy
usage: ros2 [-h] Callros2 <command> -h
for more detailed usage. ...
ros2: error: unrecognized arguments: dependencies rclpy -
ubuntu20.04
-
按你教程操作的,
-
@郭远雄 在 ros2错误 ros2: error: unrecognized arguments: dependencies rclpy 中说:
--build-type ament_python dependencies rclpy
没记错应该是 --dependencies rclpy
-
谢谢,真如老师说的
-
gyx@gyx-virtual-machine:~/town_ws$ ros2 run village_li li4_node
No executable found
这是什么问题?? 老师 -
import rclpy
from rclpy.node import Node
def main(args=None):
rclpy.init(args=args)
li4_node = Node("li4")
li4_node.get_logger().info("")
rclpy.spin(li4_node)
rclpy.shutdown()
我抄写的程序 -
from setuptools import setup
package_name = 'village_li'
setup(
name=package_name,
version='0.0.0',
packages=[package_name],
data_files=[
('share/ament_index/resource_index/packages',
['resource/' + package_name]),
('share/' + package_name, ['package.xml']),
],
install_requires=['setuptools'],
zip_safe=True,
maintainer='gyx',
maintainer_email='gyx@todo.todo',
description='TODO: Package description',
license='TODO: License declaration',
tests_require=['pytest'],
entry_points={
'console_scripts': [
"li4_node = village_li.li4:main"
],
},
) -
前几天按另一个教程也报这错误,找不到可执行文件,
-
@郭远雄 colcon的一个bug,使用colcon build --symlink-install 编译即可
-
@郭远雄 一个问题提一个帖子即可,回复也把有用的信息放在一起说完,不要当微信用哦!
-