Robotics StackExchange | Archived questions

Hector Trajectory Path is not smooth

Hi! Quick intro: I am using ROS Melodic on Ubuntu 18.04 with kernel 5.4.0-74-generic.

My goal is to produce a map in RViz using PointCloud2 data from a rosbag file.

<launch>
<param name="/use_sim_time" value="true"/>

<arg name="bagfile" default="/home/cirbeus/bagfiles/scout8_accel.bag"/>

<!-- play bagfile -->
<node pkg="rosbag" type="play" name="rosbag_player" output="screen" 
    args="--clock $(arg bagfile)"/>

<!-- convert -->
<node pkg="pointcloud_to_laserscan" type="pointcloud_to_laserscan_node" 
    name="pointcloud_to_laserscan" output="screen">
    <remap from="cloud_in" to="/iris/front/camera/depth/color/points"/>
    <!-- create laser_scan in this frame's orientation -->
    <rosparam>
        target_frame: orient_frame 
    </rosparam>        
</node>

<!-- transform z-axis of pointcloud -->
<node pkg="tf" type="static_transform_publisher" name="z_axis_tf" 
    args="0 0 0 0 0 -1.65 orient_frame front_color_optical_frame 100"/>

<include file="$(find p2l)/launch/p2l_mapping.launch"/>    
</launch>
<launch>

<node pkg="rviz" type="rviz" name="rviz" 
    args="-d $(find p2l)/launch/config_mapping.rviz"/>

<include file="$(find hector_mapping)/launch/mapping_default.launch">
  <arg name="base_frame" value="orient_frame"/>
  <arg name="odom_frame" value="orient_frame"/>
  <arg name="pub_map_odom_transform" value="true"/>
  <arg name="scan_subscriber_queue_size" value="25"/>
</include>

<include file="$(find hector_geotiff)/launch/geotiff_mapper.launch">
  <arg name="trajectory_source_frame_name" value="orient_frame"/>
</include>

<node pkg="tf" type="static_transform_publisher" name="orient_to_laser_tf" 
    args="0 0 0 0 0 -1.65 orient_frame laser 100"/>

</launch>

If anyone has even a clue as to why the results are so skewed and/or how to solve it, please do not hesitate to respond! Any clarification and/or guidance is greatly appreciated :D

All links mentioned: pointcloud2_z-axis, pointcloud2_x-axis, laserscan, trajectory_path, similar_problem

Asked by cirbeus on 2021-08-18 13:38:42 UTC

Comments

Answers