微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

“ros2 启动turtlebot3_gazebo turtlebot3_world.launch.py​​”导致未找到包

如何解决“ros2 启动turtlebot3_gazebo turtlebot3_world.launch.py​​”导致未找到包

这些是使用的命令:

$ source /opt/ros/foxy/setup.bash
ROS_disTRO was set to 'noetic' before. Please make sure that the environment does not mix paths from different distributions.
$ export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:~/turtlebot3_ws/src/turtlebot3_simulations/turtlebot3_gazebo/models
$ export TURTLEBOT3_MODEL=burger
$ ros2 launch turtlebot3_gazebo turtlebot3_world.launch.py
Package 'turtlebot3_gazebo' not found: "package 'turtlebot3_gazebo' not found,searching: ['/opt/ros/foxy']"

解决方法

路径中是否有可能缺少子目录?

export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:~/turtlebot3_ws/src/turtlebot3/turtlebot3_simulations/turtlebot3_gazebo/models

或者,如果您不需要工作区,您可以使用以下内容:

export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:/opt/ros/foxy/share/turtlebot3_gazebo/models

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。