.. _tutorial_indoor_loco_zh: 室内DASA系统定位进程启动 ============================= **注意:此教程适用于DASA室内配置** DASA 室内配置利用 UWB(超宽带)定位进行机器定位,为求达到令用户满意的性能,专门研发了传感器融合中的复杂算法。在常规的室内环境下, 水平和垂直通道的定位精度分别可以达到0.1m和0.05m。本教程展示了如何启动室内 DASA 系统定位进程,用户请参阅官方 DASA 用户手册以获取完整说明。 1.场景设置 ------------ DASA 室内系统的设置非常简单。对于普通用户,建议最小场地面积为5m*5m,集群应用则需要更大面积。因为 UWB 信号可能不稳定,为避免电磁干扰,在现场设置时要注意与可疑干扰源保持距离。 .. figure:: ../img/indoor_loco/scenario.png :height: 400 px :width: 750 px :scale: 100 % :align: center DASA室内的全局坐标系,简称DASA坐标系,如下图所示,遵循右手定则。DASA 坐标系的原点位于地面锚点 A0 的正下方。所有 DASA 机器人在本地网络中使用统一坐标系。请注意,UWB anchor 必须在第一次设置期间进行校准,以确保定位精度。 .. figure:: ../img/indoor_loco/loco_uwb_setup.jpg :height: 400 px :width: 750 px :scale: 75 % :align: center 2. 定位程序工作区 --------------------- 定位程序工作区位于每个 DASA 机器人的 ~/DASA_space/catkinws_dasa 目录中,它由多个包组成,包括 uwb 设备驱动程序、mavros 网关、ros 集群通信、定位融合和可视化包。 使用前应正确配置工作区。首先,我们应将工作区中的代码与地面站中的最新版本进行同步更新,只需直接运行脚本并输入远程机器人 ID即可: :: # on behalf of the ground control computer cd ~/DASA_space/catkinws_dasa bash scripts/sync/sync_workspace_remote.sh 其次,所有机器人都必须设置好正确的机器人类型和机器人 ID。 用户可以使用 ssh 命令登录到远程机器人,并执行以下命令并输入正确的机器人类型和 ID: :: ssh ubuntu@ubuntu cd ~/DASA_space/catkinws_dasa bash scripts/production/config_vehicle.sh 第三步,用户使用提供的 GUI 软件校准 UWB anchor,并使用 DASA 机器人测量 x 轴的偏航方向。然后如下图所示使用正确的数值编辑 uwb_localization 包中的 dasa_config.yaml。 最后使用~/DASA_space/catkinws_dasa/scripts/sync 目录下的 sync_dasa_config.sh 脚本,一次性将配置文件同步到所有 DASA 机器人。 :: # param: value # initial yaw angle of DASA x axis in the ENU frame, should be measured with DASA agent, unit: rad, [-Pi, Pi] yaw_dasa_x_axis_enu: 2.2 anchor_position: # numbers must in x.x format(i.e: 5.0), indexed by order, anchor0-3 # loaded only for nl setup, RFU frame by default - [ 0.0, 0.0, 0.0] - [-0.433, 5.117, 0.0] - [ 3.193, 5.222, 0.0] - [ 2.904, 0.0, 0.0] 最后,用户需要在ros通讯包中编辑所需的话题,使这些话题可以在本地网络同步。下面列举了 8 辆 DASA 机器人的常规话题列表: :: '/dasa/local_position/pose',/uav1/dasa/local_position/pose', '/uav1/dasa/local_position/velocity', '/uav2/dasa/local_position/pose', '/uav2/dasa/local_position/velocity', '/flyingrover3/dasa/local_position/pose', '/flyingrover3/dasa/local_position/velocity', '/flyingrover4/dasa/local_position/pose', '/flyingrover4/dasa/local_position/velocity', '/flyingrover5/dasa/local_position/pose', '/flyingrover5/dasa/local_position/velocity', '/flyingrover6/dasa/local_position/pose', '/flyingrover6/dasa/local_position/velocity', '/rover7/dasa/local_position/pose', '/rover7/dasa/local_position/velocity', '/rover8/dasa/local_position/pose', '/rover8/dasa/local_position/velocity' 3. 如何使用 --------------- 可以直接使用脚本轻松启动本地化过程,提供的脚本同时支持单机和集群。 单机情况: :: # In remote vehicle terminal ssh ubuntu@ubuntu cd ~/DASA_space/catkinws_dasa # uav case bash scripts/single_case/run_uav_default.sh # rover case bash scripts/single_case/run_rover_default.sh # flying rover case bash scripts/single_case/run_flyingrover_default.sh 集群情况: :: # In remote vehicle terminal ssh ubuntu@ubuntu cd ~/DASA_space/catkinws_dasa # uav case bash scripts/swarm_case/run_uav_default.sh # rover case bash scripts/swarm_case/run_rover_default.sh # flying rover case bash scripts/swarm_case/run_flyingrover_default.sh 借助 dasa_visualization 包,DASA 机器人的定位也可以在地面站中实现可视化。 :: cd ~/DASA_space/catkinws_dasa bash scripts/run_gcs_visualization.sh 多辆 DASA 机器人的定位可视化效果图如下图所示,其中 base_link 表示第 i 台机器人在 DASA 坐标系中的 baselink。 .. figure:: ../img/indoor_loco/baselink_gcs_view.png :height: 400 px :width: 750 px :scale: 100 % :align: center