ROS下使用UST

编程入门 行业动态 更新时间:2024-10-11 13:24:34

<a href=https://www.elefans.com/category/jswz/34/1768665.html style=ROS下使用UST"/>

ROS下使用UST

安装系统环境:

ubuntu-14.04.5-amd64

ROS-indigo


1 安装cartographer

参考网址:.html

总共需要安装3个软件包:ceres solver、cartographer和cartographer_ros

1.1 安装所有依赖项

sudo apt-get install -y google-mock libboost-all-dev libeigen3-dev libgflags-dev libgoogle-glog-dev liblua5.2-dev libprotobuf-dev  libsuitesparse-dev libwebp-dev ninja-build protobuf-compiler python-sphinx  ros-indigo-tf2-eigen libatlas-base-dev libsuitesparse-dev liblapack-dev

1.2 安装ceres solver软件包

1. git clone .11.0.git

2. cd ceres-solver-1.11.0

3. cmake .

4. make

5. sudo make install

1.3 安装 cartographer软件包

1. git clone .git

2. cd cartographer

3. cmake . -G Ninja

4. ninja

5. ninja test

6. sudo ninja install

上述第3步执行错误的可以忽略3-6步,改用下面的方法。

7. cmake  .

8. make

9. sudo make install

1.4 安装cartographer_ros软件包

下载到catkin_ws下面的src文件夹下面

1.  cd catkin_ws/src

2.  git clone .git 

3.  cd ..

4.  catkin_make

为了使节点生效,运行:

1. source catkin_ws/devel/setup.bash

2. rospack profile



2 运行demo测试

2.1 下载数据

2D数据下载网址,大概500M:

.bag

2.2 运行

后面的路径为数据包所在路径。

roslaunch cartographer_ros demo_backpack_2d.launch bag_filename:=${HOME}/Downloads

/cartographer_paper_deutsches_museum.bag


3 使用UST-10LX运行cartographer

3.1 修改demo_revo_lds.launch

路径:cartographer_ros/cartographer_ros/launch/demo_revo_lds.launch

修改后:

<launch><param name="/use_sim_time" value="true" /><node name="cartographer_node" pkg="cartographer_ros"type="cartographer_node" args="-configuration_directory $(find cartographer_ros)/configuration_files-configuration_basename revo_lds.lua"output="screen"><remap from="scan" to="scan" /></node><node name="rviz" pkg="rviz" type="rviz" required="true"args="-d $(find cartographer_ros)/configuration_files/demo_2d.rviz" /></launch>

3.2 修改参数配置文件revo_lds.lua

路径:cartographer_ros/cartographer_ros/configuration_files/revo_lds.lua

修改后:

include "map_builder.lua"options = {map_builder = MAP_BUILDER,sensor_bridge = {  horizontal_laser_min_range = 0.3,  horizontal_laser_max_range = 10.,  horizontal_laser_missing_echo_ray_length = 1,  constant_odometry_translational_variance = 0.,  constant_odometry_rotational_variance = 0.,  }, map_frame = "map",tracking_frame = "laser",published_frame = "laser",odom_frame = "odom",provide_odom_frame = true,use_odometry_data = false,use_constant_odometry_variance = true,constant_odometry_translational_variance = 0.,constant_odometry_rotational_variance = 0.,use_horizontal_laser = true,use_horizontal_multi_echo_laser = false,horizontal_laser_min_range = 0.3,horizontal_laser_max_range = 10.,horizontal_laser_missing_echo_ray_length = 1.,num_lasers_3d = 0,lookup_transform_timeout_sec = 0.2,submap_publish_period_sec = 0.3,pose_publish_period_sec = 5e-3,
}MAP_BUILDER.use_trajectory_builder_2d = true
TRAJECTORY_BUILDER_2D.use_imu_data = false
TRAJECTORY_BUILDER_2D.use_online_correlative_scan_matching = true
SPARSE_POSE_GRAPH.optimization_problem.huber_scale = 1e2return options

3.3 重新编译

1. cd catkin_ws

2. catkin_make

3. source catkin_ws/devel/setup.bash

4. rospack profile


3.4 安装urg_node节点包

在ROS中安装urg_node节点包,可参考妹子教你在ROS中使用Hokuyo激光雷达UST-10LX和UST-30LX

3.5 运行脚本进行实时构图定位

1. roscore

2. rosrun urg_node urg_node _ip_address:=192.168.0.10

3. roslaunch cartographer_ros demo_revo_lds.launch 

更多推荐

ROS下使用UST

本文发布于:2024-02-27 09:28:42,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1706040.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:ROS   UST

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!