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

Add 2D slam Cartographer for turtlebot navigation #236

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

tongtybj
Copy link
Collaborator

@tongtybj tongtybj commented Jul 1, 2018

Better 2D slam than gmapping or karto_slam:

  1. add cartographer_ros as default run_depned
  2. add repository cartographer_turtlebot in .rosinstall
  3. modify the README.md for 2

1. add cartographer_ros as default run_depned
2. add repository cartographer_turtlebot in .rosinstall
3. modify the README.md for 2
README.md Outdated
$ wstool set robot-programming https://github.com/jsk-enshu/robot-programming --git -t src
$ wstool set dynamixel_urdf https://github.com/jsk-enshu/dynamixel_urdf --git -t src
$ wstool set robot-programming https://github.com/jsk-enshu/robot-programming --git -u -t src
$ wstool merge -t src src/robot-programming/enshu.rosinstall
Copy link
Member

Choose a reason for hiding this comment

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

if you use .rosinstall file, you will not need 'set robot-programming'

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thank you for review. Modification: ee7f13e

Copy link
Member

@k-okada k-okada left a comment

Choose a reason for hiding this comment

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

forget to add launch file using cartographer?
when you add launch file, please try to add roslaunch-check, understanding test mechanism will be a part of NEDO project
https://github.com/jsk-enshu/robot-programming/blob/master/dxl_armed_turtlebot/CMakeLists.txt#L9-L14

@tongtybj
Copy link
Collaborator Author

tongtybj commented Jul 2, 2018

@k-okada

I thought to use the original launch file in cartographer_turtlebot.
e.g: roslaunch cartographer_turtlebot turtlebot_depth_camera_2d.launch

Should I create the similar launch file under this repository?

@k-okada
Copy link
Member

k-okada commented Jul 2, 2018

I'm expected to update https://github.com/jsk-enshu/robot-programming/blob/master/dxl_armed_turtlebot/launch/dxl_armed_turtlebot_navigation.launch to add 'arg' to switch localization/mapping method.

…tlebot_navigation.launch.

 - intorduce arg 'do_slam' to switch between slam and acml (only localization), along with arg 'slam_mode' to choice between karto_slam and cartographer.
 - modified the configuration for cartographer, based on the 0.2.0 version.
@tongtybj
Copy link
Collaborator Author

tongtybj commented Jul 2, 2018

Modified dxl_armed_turtlebot_navigation.launch with following points.

  1. introduce 'arg' do_slam to separate mapping task and only localization task. Because I observed the localization(i.e. tf) is quite stable, if both node (slam and acml) runs at same time.
  2. introduce 'arg' slam_mode to choose slam methods between karto_slam and cartographer.
  3. the preparation of cartographer. I found the cartographer (version 0.2.0) is quite old, and no any version of cartographer_turtlebot is compatible with it. So I create another config file cartographer.lua
    , based on backpack_2d.lua. But the performance of this old cartographer is very bad (check the GIF), compared with the latest version. I think I lost some critical parameters.

old_cartographer_without_acml

@k-okada
Copy link
Member

k-okada commented Jul 3, 2018

@7675t
Copy link

7675t commented Jul 3, 2018

@tongtybj
Hi, it looks just your IMU is oscillative. Why don't you try TRAJECTORY_BUILDER_2D.use_imu_data = false?

But it may be possible ver.0.2 is worse than 0.3. I haven't compared those intently.

@tongtybj
Copy link
Collaborator Author

tongtybj commented Jul 3, 2018

@7675t Than you for your advice, tajima san!

I tried with TRAJECTORY_BUILDER_2D.use_imu_data = false, and the localization becomes much better as shown in the following GIF.
old_cartographer_without_imu

But, what makes me confused is this flag is set to true in the laster version of cartographer for turtlebot: https://github.com/googlecartographer/cartographer_turtlebot/blob/master/cartographer_turtlebot/configuration_files/turtlebot_depth_camera_2d.lua#L50.

The possible reason is that the latest cartographer might omit the horizontal angular velocity if MAP_BUILDER.use_trajectory_builder_2d (I have to check the code).

Then I tried to set the horizontal angular velocity to zero since I think the yaw velocity from imu should not be omitted, and get same good result as shown in the following GIF.
old_cartographer_without_xy_gyro

The send RP about this commit: https://github.com/googlecartographer/cartographer_turtlebot/pull/94/files. Hope they can merge this PR.

@7675t
Copy link

7675t commented Jul 4, 2018

Yes, difference between 0.2 and the latest is annoying, not back-compatible. In kinetic we cant release the latest, but can use it by building by ourselves.

We may be safe to supply both version config files for a while, like turtlebot_v020.lua or something,expecting eventually migrated to newer release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants