- Installation:
- Source your ROS version:
source /opt/ros/kinetic/setup.bash
- Create temporary catkin workspace or if you want to do in existing workspace, then skip this step:
mkdir -p ~/p3dx_ws/src
cd ~/p3dx_ws/ && catkin_make
source devel/setup.bash
- Download p3dx and teleop ros packages:
cd ~/p3dx_ws/src
git clone https://github.com/allenh1/p2os.git
- Source your ROS version:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "cartographer/io/proto_stream.h" | |
#include "cartographer/io/proto_stream_deserializer.h" | |
#include "cartographer/mapping/pose_graph.h" | |
#include "cartographer_ros/msg_conversion.h" | |
#include "cartographer_ros/time_conversion.h" | |
#include "cartographer_ros/split_string.h" | |
#include "geometry_msgs/TransformStamped.h" | |
namespace cartographer_ros { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import rospy | |
from nav_msgs.msg import OccupancyGrid, MapMetaData | |
import tf2_ros | |
import numpy as np | |
def occToNumpy(msg): | |
data = np.asarray(msg.data, dtype=np.int8).reshape(msg.info.height, msg.info.width) | |
return data |
- Below are the manhattan graphs generated on both less noisy and more noisy unoptimized trajectory.
- Both manhattan graphs from less and more noisy trajectories looks same, so we could do loop closure detection using MLP on both.
- Rectified poses with correct thetas
- Manhattan constraints on dense graph less noisy trajectory in g2o format
- Constraints on different sections:
I:del_x = 0.1 m; del_y = 0.5 m; del_theta = 0 degree
II:del_x = 0.1 m; del_y = 0.3 m; del_theta = 0 degree
III:del_x = 0.1 m; del_y = 0.1 m; del_theta = 270 degree
- Performing g2o optimization on the graph is causing trajectory to go haywire.
- Manhattan constraints results on dataset 2.
- Due to smooth robot trajectories, the final manhattan map generated on the whole dataset seems pretty close to ground truth.
- This could be good input for MLP and graph optimization can be done using both Manhattan world constraints and loop closing constraints on dense graph in one shot.
- Nomenclature of
mlp_out_dense.txt
. node 1
andnode 2
are matched nodes fromMLP
.- Coloumn notation( all ids corresponds to dense graph indexes):
1st col:
Starting dense index of node 1.2nd col:
Ending dense index of node 1.3rd col:
Starting dense index of node 2.
4th col:
Ending dense index of node 2.
- ICP's resutls comparison.
- The results with ICP constraints(along with some manhattan constraints) seems to giving close results compared to just optimizing with manhattan constraints.
- Following are the results of dataset 2 optimization just using manhattan constraints.
- Following are the results of noisy star shaped trajectory optimization just using manhattan constraints.
OlderNewer