Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[jsk_pcl_ros] ICP Registration on 2D plane #1991

Merged
merged 8 commits into from
Feb 5, 2018

Conversation

furushchev
Copy link
Member

@furushchev furushchev commented Jan 23, 2017

Sorry for delay.
I implemented from scratch but there is totally same algorithm in pcl to achieve 2d transform estimation.
Cleaned up codes, updated docs with images.

plane is constrained from header frame coordinates of point cloud.
e.g. to fitting to objects on a table, you will need:

  1. assumed that point cloud is published from sensor tf frame.
  2. extract plane of table and broadcast a normal point of table surface as tf. (let it be table_frame)
  3. use TfPointCloud to change frame id from sensor frame to table_frame
  4. apply icp with setting param transform_3dof to true.

@furushchev furushchev changed the title Icp 2d [jsk_pcl_ros] ICP Registration on 2D plane Jan 23, 2017
@k-okada
Copy link
Member

k-okada commented Jan 23, 2017

can we add launch file for this? and if we can add test code, that more better.

@k-okada
Copy link
Member

k-okada commented Mar 21, 2017

@furushchev : can we add launch file for this? and if we can add test code, that more better.

Copy link
Member

@mmurooka mmurooka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Source code diff LGTM.

Please do:

@furushchev : can we add launch file for this? and if we can add test code, that more better.

@YoheiKakiuchi
Copy link
Member

ping @furushchev

@furushchev
Copy link
Member Author

furushchev commented Mar 25, 2017

@YoheiKakiuchi Sorry for delay. I'm working on this now. Please wait a moment...

@furushchev
Copy link
Member Author

furushchev commented Mar 26, 2017

added sample launch file for ICP 2D

icp_2d_result

roslaunch openni2_launch openni2.launch
roseus cylinder_cloud_publisher.l # publish cylinder cloud to topic /reference_cloud
roslaunch jsk_pcl_ros sample_icp_registration_2d.launch

To execute this launch file, #2038, #2039 will be needed.

To publish cylinder reference as pointcloud, the node will be like below code:
(note that to execute this lisp code, euslisp/jskeus#425 is necessary)

;; cylinder_cloud_publisher.l
;; Author: Yuki Furuta <furushchev@jsk.imi.i.u-tokyo.ac.jp>


(ros::roseus "cylinder_cloud_publisher")

(ros::advertise "/reference_cloud" sensor_msgs::PointCloud2 1 t) ;; latched
(unix:sleep 1)

(setq *cylinder* (make-cylinder 55 300))
(setq *cloud* (object->pointcloud *cylinder* :step 30 :with-normal t :with-color t))
(setq *msg* (make-ros-msg-from-eus-pointcloud *cloud* :frame "camera_link"))

(ros::rate 1)
(while (ros::ok)
  (send *msg* :header :stamp (ros::time-now))
  (ros::publish "/reference_cloud" *msg*)
  (ros::spin-once)
  (ros::sleep))

@furushchev
Copy link
Member Author

I have a rosbag of picture attached above. If anyone give an advice to upload, I will write a test code.

@k-okada
Copy link
Member

k-okada commented Apr 4, 2017

I have a rosbag of picture attached above. If anyone give an advice to upload,

@wkentaro wiill give you an advice to upload

@wkentaro
Copy link
Member

wkentaro commented Apr 4, 2017

$ tar zcvf sample_icp_registration_2d.bag.tgz sample_icp_registration_2d.bag
$ jsk_data put --public sample_icp_registration_2d.bag.tgz
$ jsk_data pubinfo sample_icp_registration_2d.bag.tgz
# it shows download url
$ md5sum sample_icp_registration_2d.bag.tgz
# copy this to md5 in download_data

# edit scripts/install_sample_data.py
...
    download_data(
        pkg_name=PKG,
        path='sample/data/sample_icp_registration_2d.bag.tgz',
        url='https://drive.google.com/uc?id=XXXXXXXXXXXXXXXx',
        md5='xxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
        extract=True,
    )

@furushchev furushchev changed the title [jsk_pcl_ros] ICP Registration on 2D plane [WIP] [jsk_pcl_ros] ICP Registration on 2D plane Jan 14, 2018
@furushchev furushchev changed the title [WIP] [jsk_pcl_ros] ICP Registration on 2D plane [jsk_pcl_ros] ICP Registration on 2D plane Jan 15, 2018
@furushchev
Copy link
Member Author

@k-okada I'm now back.

@furushchev : can we add launch file for this? and if we can add test code, that more better.

Added sample launch file and test code.

@k-okada k-okada merged commit 84d8f2e into jsk-ros-pkg:master Feb 5, 2018
@furushchev furushchev deleted the icp-2d branch February 5, 2018 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants