ros 运行错误ERROR: cannot launch node of type [gmapping/slam_gmapping]: gmapping

问题描述:使用turtlebot时报错(执行一些命令时报错,类似问题都可以参考)

roslaunch turtlebot3_slam turtlebot3_gmapping.launch 

报错信息:

ERROR: cannot launch node of type [gmapping/slam_gmapping]: gmapping
ROS path [0]=/opt/ros/melodic/share/ros
ROS path [1]=/opt/ros/melodic/share

解决:
确实对应的功能包,安装即可,这里ros版本为melodic

sudo apt install ros-melodic-gmapping

success!!!

### OrbSLAM2 with ROS Installation Tutorial and Usage Guide For integrating OrbSLAM2 within the Robot Operating System (ROS), one can follow a structured approach that includes setting up dependencies, cloning repositories, building packages, and running nodes. #### Setting Up Dependencies To ensure compatibility between OrbSLAM2 and ROS, installing necessary Python tools via `pip` is essential[^1]. This step ensures all required libraries for both systems are available on your machine. Additionally, maintaining clean code practices through linters as per guidelines helps prevent issues during development[^2]. #### Cloning Repository The first action involves obtaining the source files of OrbSLAM2 along with its ROS wrapper from GitHub or other hosting services. A common practice would be: ```bash git clone --recursive https://github.com/raulmur/ORB_SLAM2.git ~/catkin_ws/src/ cd ~/catkin_ws/src/ORB_SLAM2 chmod +x build.sh ./build.sh ``` This script prepares the environment by downloading submodules and compiling C++ codes specific to this project. #### Building Packages After acquiring sources, integrate them into an existing Catkin workspace or create a new one specifically designed for handling SLAM algorithms like so: ```bash source /opt/ros/<distro>/setup.bash cd ~/catkin_ws && catkin_make source devel/setup.bash ``` Replace `<distro>` with your current ROS distribution name such as noetic, melodic etc., ensuring proper initialization before proceeding further. #### Running Nodes With everything set up correctly, launching OrbSLAM2 alongside sensor data streams becomes straightforward using predefined launch files provided either directly inside ORB_SLAM2 package directory under `/ros/launch`, or created manually according to personal preferences. Example command line invocation might look something similar to below snippet when utilizing monocular camera input stream over rosbag playback mechanism: ```xml <launch> <!-- Load parameters --> <param name="voc_file" value="$(find orb_slam2_ros)/Vocabulary/ORBvoc.txt"/> <!-- Start nodelet manager & stereo image proc pipeline here --> <!-- Launch orbslam node itself --> <node pkg="orb_slam2_ros" type="mono" name="orbslam_mono"> ... </node> </launch> ``` Ensure paths match actual locations where vocabulary file resides relative to rospackage path; adjust accordingly based upon hardware configuration used at runtime.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

放羊Wa

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值