导航

    蓝鲸ROS机器人论坛

    • 注册
    • 登录
    • 搜索
    • 版块
    • 话题
    • 热门
    ROS交流群
    ROS Group
    产品服务
    Product Service
    开源代码库
    Github
    官网
    Official website
    技术交流
    Technological exchanges
    激光雷达
    LIDAR
    ROS教程
    ROS Tourials
    深度学习
    Deep Learning
    机器视觉
    Computer Vision

    使用速腾聚创16线雷达用cartographer 3D建图时出现问题

    激光雷达
    2
    4
    2480
    正在加载更多帖子
    • 从旧到新
    • 从新到旧
    • 最多赞同
    回复
    • 在新帖中回复
    登录后回复
    此主题已被删除。只有拥有主题管理权限的用户可以查看。
    • Duke-Allen
      Duke-Allen 最后由 Duke-Allen 编辑

      我使用IMU和一个16线雷达通过cartographer进行建图,但建图结果特别乱,像这样:
      2019-03-03 18-08-43屏幕截图.png
      2019-03-03 18-08-52屏幕截图.png
      这是IMU和雷达的方向:
      2.jpg

      <robot
        name="myrobot_udrf">
         <link
          name="base_link">
          <visual>
            <origin
              xyz="0 0 0"
              rpy="0 0 0" />
            <geometry>
              <box size="0.415 .4284 .15"/>
            </geometry>
            <material
              name="">
              <color
                rgba="0.098039 0.098039 0.098039 1" />
            </material>
          </visual>
        </link>
      
        <link name="base_footprint"/>
        <joint name="base_link_joint" type="fixed">
          <parent link="base_footprint" />
          <child link="base_link" />
          <origin xyz="0 0 0.117635" />
        </joint>
      
        <link
          name="right_front_wheel">
          <visual>
            <origin
              xyz="0 0 0"
              rpy="0 0 0" />
            <geometry>
              <cylinder length=".0356" radius="0.057635"/>
            </geometry>
            <material
              name="">
              <color
                rgba="0.29412 0.29412 0.29412 1" />
            </material>
          </visual>
        </link>
        <joint
          name="right_front_wheel_joint"
          type="fixed">
          <origin
            xyz="0.205 -0.2142 -0.06"
            rpy="1.57075 0 0" />
          <parent
            link="base_link" />
          <child
            link="right_front_wheel" />
          <axis
            xyz="0 0 1" />
        </joint>
      
        <link
          name="left_front_wheel">
          <visual>
            <origin
              xyz="0 0 0"
              rpy="0 0 0" />
            <geometry>
              <cylinder length=".0356" radius="0.057635"/>
            </geometry>
            <material
              name="black">
              <color
                rgba="0.29412 0.29412 0.29412 1" />
            </material>
          </visual>
        </link>
        <joint
          name="left_front_wheel_joint"
          type="fixed">
          <origin
            xyz="0.205 .2142 -0.06"
            rpy="1.57075 0 0" />
          <parent
            link="base_link" />
          <child
            link="left_front_wheel" />
          <axis
            xyz="0 0 1" />
        </joint>
      
        <link
          name="right_back_wheel">
          <visual>
            <origin
              xyz="0 0 0"
              rpy="0 0 0" />
            <geometry>
              <cylinder length=".0356" radius="0.057635"/>
            </geometry>
            <material
              name="black">
              <color
                rgba="0.098039 0.098039 0.098039 1" />
            </material>
          </visual>
        </link>
        <joint
          name="right_back_wheel_joint"
          type="fixed">
          <origin
            xyz="-0.205 -0.2142 -0.06"
            rpy="1.57075 0 0" />
          <parent
            link="base_link" />
          <child
            link="right_back_wheel" />
          <axis
            xyz="0 0 1" />
        </joint>
      
        <link
          name="left_back_wheel">
          <visual>
            <origin
              xyz="0 0 0"
              rpy="0 0 0" />
            <geometry>
              <cylinder length=".0356" radius="0.057635"/>
            </geometry>
            <material
              name="black">
              <color
                rgba="0.098039 0.098039 0.098039 1" />
            </material>
          </visual>
        </link>
        <joint
          name="left_back_wheel_joint"
          type="fixed">
          <origin
            xyz="-0.205 0.2142 -0.06"
            rpy="1.57075 0 0" />
          <parent
            link="base_link" />
          <child
            link="left_back_wheel" />
          <axis
            xyz="0 0 1" />
        </joint>
      
        <link name="rslidar">
          <visual>
            <origin xyz="0 0 0" />
            <geometry>
              <cylinder length="0.0827" radius="0.0545" />
            </geometry>
            <material name="blue">
              <color rgba="0 0 0.8 1"/>
            </material>
          </visual>
        </link>
        <joint name="horizontal_laser_link_joint" type="fixed">
          <parent link="top_link" />
          <child link="rslidar" />
          <origin xyz="-0.07 0 0.04135" rpy="0 0 0" />
        </joint>
      
        <link name="imu">
          <visual>
            <origin xyz="0 0 0" />
            <geometry>
              <box size="0.021 .016 .04"/>
            </geometry>
            <material name="yellow">
              <color rgba="1 1 0 1"/>
            </material>
          </visual>
        </link>
        <joint name="imu_link_joint" type="fixed">
          <parent link="middle_link" />
          <child link="imu" />
          <origin xyz="0 0.023 0.02" rpy="0 0 3.14159" />
        </joint>
      
        <link name="pillar_right_front">
          <visual>
            <origin xyz="0 0 0"/>
            <geometry>
              <cylinder length="0.38" radius="0.02" />
            </geometry>
            <material name="white">
              <color rgba="1 1 1 1"/>
            </material>
          </visual>
        </link>
        <joint name="pillar_right_front_joint" type="fixed">
          <parent link="base_link" />
          <child link="pillar_right_front" />
          <origin xyz="0.15 -0.15 0.19" rpy="0 0 0" />
        </joint>
      
        <link name="pillar_right_back">
          <visual>
            <origin xyz="0 0 0"/>
            <geometry>
              <cylinder length="0.38" radius="0.02" />
            </geometry>
            <material name="white">
              <color rgba="1 1 1 1"/>
            </material>
          </visual>
        </link>
        <joint name="pillar_right_back_joint" type="fixed">
          <parent link="base_link" />
          <child link="pillar_right_back" />
          <origin xyz="-0.15 -0.15 0.19" rpy="0 0 0" />
        </joint>
      
        <link name="pillar_left_front">
          <visual>
            <origin xyz="0 0 0"/>
            <geometry>
              <cylinder length="0.38" radius="0.02" />
            </geometry>
            <material name="white">
              <color rgba="1 1 1 1"/>
            </material>
          </visual>
        </link>
        <joint name="pillar_left_front_joint" type="fixed">
          <parent link="base_link" />
          <child link="pillar_left_front" />
          <origin xyz="0.15 0.15 0.19" rpy="0 0 0" />
        </joint>
      
        <link name="pillar_left_back">
          <visual>
            <origin xyz="0 0 0"/>
            <geometry>
              <cylinder length="0.38" radius="0.02" />
            </geometry>
            <material name="white">
              <color rgba="1 1 1 1"/>
            </material>
          </visual>
        </link>
        <joint name="pillar_left_back_joint" type="fixed">
          <parent link="base_link" />
          <child link="pillar_left_back" />
          <origin xyz="-0.15 0.15 0.19" rpy="0 0 0" />
        </joint>
      
        <link name="middle_link">
         <visual>
           <origin xyz="0 0 0"/>
           <geometry>
             <box size="0.415 .4284 .001"/>
           </geometry>
           <material
             name="">
             <color
               rgba="0.098039 0.098039 0.098039 1" />
           </material>
         </visual>
        </link>
        <joint name="middle_link_joint" type="fixed">
          <parent link="base_link" />
          <child link="middle_link" />
          <origin xyz="0 0 0.38" rpy="0 0 0" />
        </joint>
      
        <link name="top_pillar_right_front">
          <visual>
            <origin xyz="0 0 0"/>
            <geometry>
              <cylinder length="0.04465" radius="0.01" />
            </geometry>
            <material name="white">
              <color rgba="1 1 1 1"/>
            </material>
          </visual>
        </link>
        <joint name="top_pillar_right_front_joint" type="fixed">
          <parent link="middle_link" />
          <child link="top_pillar_right_front" />
          <origin xyz="-0.04 -0.1 0.022" rpy="0 0 0" />
        </joint>
      
        <link name="top_pillar_right_back">
          <visual>
            <origin xyz="0 0 0"/>
            <geometry>
              <cylinder length="0.04465" radius="0.01" />
            </geometry>
            <material name="white">
              <color rgba="1 1 1 1"/>
            </material>
          </visual>
        </link>
        <joint name="top_pillar_right_back_joint" type="fixed">
          <parent link="middle_link" />
          <child link="top_pillar_right_back" />
          <origin xyz="-0.1 -0.1 0.022" rpy="0 0 0" />
        </joint>
      
        <link name="top_pillar_left_front">
          <visual>
            <origin xyz="0 0 0"/>
            <geometry>
              <cylinder length="0.04465" radius="0.01" />
            </geometry>
            <material name="white">
              <color rgba="1 1 1 1"/>
            </material>
          </visual>
        </link>
        <joint name="top_pillar_left_front_joint" type="fixed">
          <parent link="middle_link" />
          <child link="top_pillar_left_front" />
          <origin xyz="-0.04 0.1 0.022" rpy="0 0 0" />
        </joint>
      
        <link name="top_pillar_left_back">
          <visual>
            <origin xyz="0 0 0"/>
            <geometry>
              <cylinder length="0.04465" radius="0.01" />
            </geometry>
            <material name="white">
              <color rgba="1 1 1 1"/>
            </material>
          </visual>
        </link>
        <joint name="top_pillar_left_back_joint" type="fixed">
          <parent link="middle_link" />
          <child link="top_pillar_left_back" />
          <origin xyz="-0.1 0.1 0.022" rpy="0 0 0" />
        </joint>
      
        <link name="top_link">
         <visual>
           <origin xyz="0 0 0"/>
           <geometry>
             <box size="0.2142 .415 .001"/>
           </geometry>
           <material
             name="">
             <color
               rgba="0.098039 0.098039 0.098039 1" />
           </material>
         </visual>
        </link>
        <joint name="top_link_joint" type="fixed">
          <parent link="middle_link" />
          <child link="top_link" />
          <origin xyz="-0.07 0 0.04465" rpy="0 0 0" />
        </joint>
      
      </robot>
      

      这是我的lua文件:

      -- Copyright 2016 The Cartographer Authors
      --
      -- Licensed under the Apache License, Version 2.0 (the "License");
      -- you may not use this file except in compliance with the License.
      -- You may obtain a copy of the License at
      --
      --      http://www.apache.org/licenses/LICENSE-2.0
      --
      -- Unless required by applicable law or agreed to in writing, software
      -- distributed under the License is distributed on an "AS IS" BASIS,
      -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      -- See the License for the specific language governing permissions and
      -- limitations under the License.
      
      include "map_builder.lua"
      include "trajectory_builder.lua"
      options = {
       map_builder = MAP_BUILDER,
       trajectory_builder = TRAJECTORY_BUILDER,
       map_frame = "map",
       tracking_frame = "imu",
       published_frame = "base_footprint",
       odom_frame = "odom",
       provide_odom_frame = false,
       publish_frame_projected_to_2d = false,
       use_odometry = false,
       use_nav_sat = false,
       use_landmarks = false,
       num_laser_scans = 0,
       num_multi_echo_laser_scans = 0,
       num_subdivisions_per_laser_scan = 1,
       num_point_clouds = 1,
       lookup_transform_timeout_sec = 0.2,
       submap_publish_period_sec = 0.3,
       pose_publish_period_sec = 5e-3,
       trajectory_publish_period_sec = 30e-3,
       rangefinder_sampling_ratio = 1.,
       odometry_sampling_ratio = 1.,
       fixed_frame_pose_sampling_ratio = 1.,
       imu_sampling_ratio = 1.,
       landmarks_sampling_ratio = 1.,
      }
      
      TRAJECTORY_BUILDER_3D.num_accumulated_range_data = 1
      TRAJECTORY_BUILDER_3D.min_range = 0.2
      TRAJECTORY_BUILDER_3D.max_range = 150.
      TRAJECTORY_BUILDER_2D.min_z = 0.1
      TRAJECTORY_BUILDER_2D.max_z = 1.0
      TRAJECTORY_BUILDER_3D.use_online_correlative_scan_matching = false
      
      MAP_BUILDER.use_trajectory_builder_3d = true
      MAP_BUILDER.num_background_threads = 7
      POSE_GRAPH.optimization_problem.huber_scale = 5e2
      POSE_GRAPH.optimization_problem.log_solver_summary = true
      POSE_GRAPH.optimize_every_n_nodes = 40
      POSE_GRAPH.optimization_problem.ceres_solver_options.max_num_iterations = 20
      POSE_GRAPH.constraint_builder.sampling_ratio = 0.03
      POSE_GRAPH.constraint_builder.min_score = 0.62
      POSE_GRAPH.constraint_builder.global_localization_min_score = 0.66
      
      
      return options
      

      这个问题我一直不知道什么问题,还请大神指点一下这是什么原因,十分感谢。
      还有一个问题,cartographer进行3D建图的话跟踪帧tracking_frame应该是和IMU的帧名一样吗?

      1 条回复 最后回复 回复 引用 0
      • Duke-Allen
        Duke-Allen 最后由 编辑

        是我IMU的数据有问题,己经解决了。

        Yangoogle 1 条回复 最后回复 回复 引用 0
        • Yangoogle
          Yangoogle @Duke-Allen 最后由 编辑

          @Duke-Allen 好吧

          Duke-Allen 1 条回复 最后回复 回复 引用 0
          • Duke-Allen
            Duke-Allen @Yangoogle 最后由 编辑

            @Yangoogle 最近在学导航有点懵,不知道该怎么下手,请问有没有什么建议?

            1 条回复 最后回复 回复 引用 0
            • 1 / 1
            • First post
              Last post
            Copyright © 2015-2023 BlueWhale community