Giter Site home page Giter Site logo

m5823779 / pose-estimation Goto Github PK

View Code? Open in Web Editor NEW
13.0 2.0 1.0 56.79 MB

A Convolutional Neural Network for Real Time robot pose estimation by RGB Image

Python 97.88% Shell 2.12%
cnn convolutional-neural-networks neural-network pytorch pose-estimation posenet mapnet ros-kinetic

pose-estimation's Introduction

A Convolutional Neural Network for Real Time robot pose estimation by RGB Image

In this project we use slam(gmapping) to collect training dataset(image & robot pose), then using the convolutional neural network(Posenet & Mapnet) to regress the robot pose only by RGB image. (Without depth map)

Introduce

Localization is an important issue for navigation. SLAM has a good performance in indoor localization. Commonly used sensors are mainly divided into lasers or cameras. The advantage of laser SLAM is its high localization accuracy. However, the lack of image information leads to restrictions on some applications. Visual SLAM relies on RGB image and depth map. The disadvantage is that a large number of features extracting and matching, cause a large amount of computation. Therefore, this research will focus on the pose estimation only by RGB image, without features extracting and matching.

Installation Dependencies:

Python2.7

Pytorch

ROS Kinetic

visdom

http://wiki.ros.org/kinetic/Installation/Ubuntu

How to Run?

  1. Using slam to collect data by yourself

    or Download dataset which creat by ourself: Uploading...

  2. Connect the datasets live in the data/deepslam_data directory. Let us call your training dataset directory. Make the link by following command:

cd data/deepslam_data
ln -s /"Absolute path of training dataset" Env

Extract image and robot pose from rosbag save it as png file and txt file

cd ../../rosbag2file
./sync_position_with_image.sh -m mode(train or val) -f from_frame_id  -t to_frame_id  -i image_topic -b rosbag_path  -o output_dir -s sequence_name

Calculate robot pose and image mean and std value

cd ../scripts
python dataset_mean.py  --dataset dataset_name --scene scene_name

Training network Posenet:

python train.py --dataset dataset_name --scene scene_name --config_file configs/posenet.ini --model posenet

Reduce version (Reduce the amount of training data by 2 times to train)

python train.py --dataset dataset_name --scene scene_name --config_file configs/posenet.ini --model posenet --reduce 2

After Posenet training 100epoch, enter following command continue traing neural network by Mapnet

Mapnet:

python train.py --dataset dataset_name --scene scene_name --config_file configs/step3_skip10.ini --model mapnet --checkpoint logs/"pre_trained_model_by_posenet"

Reduce version (If you choose reduce version to train posenet)

python train.py --dataset dataset_name --scene scene_name --config_file configs/step3_skip10.ini --model mapnet --checkpoint logs/dataset_name_scene_name_posenet_posenet/epoch_100.pth.tar --reduce 2

Test:

Posenet:

python eval.py --dataset dataset_name --scene scene_name --model posenet --weights logs/dataset_name_scene_name_posenet_posenet/epoch_100.pth.tar --config_file configs/posenet.ini --val

Mapnet:

python eval.py --dataset dataset_name --scene scene_name --model mapnet --weights logs/dataset_name_scene_name_mapnet_step3_skip10/epoch_300.pth.tar --config_file configs/step3_skip10.ini --val

image

Real Time on turtlebot3:

roscore
python -m visdom.server
python pose_estimator.py --dataset dataset_name --scene scene_name --model mapnet --weights logs/dataset_name_scene_name_mapnet_step3_skip10/epoch_300.pth.tar --config_file configs/step3_skip10.ini --plot

image Demo video (Speed up 3 times )

Or run rosbag

$rosbag play -d 3 rosbag

Reference:

https://github.com/NVlabs/geomapnet

pose-estimation's People

Contributors

m5823779 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

yjinyyzyq

pose-estimation's Issues

about dataset

Hello, I'm using Ubuntu 16.04 with ROS Kinetic.

You mentioned dataset from gmapping, then is the dataset 'map'data?

Which kind of data I should save for this package?

Thanks in advance :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.