tork-a / roomblock

47 stars 16 forks source link

Can I use this code for non-roomba robot? #5

Closed Guofeng-Tang closed 7 years ago

Guofeng-Tang commented 7 years ago

I'm learning ROS and SLAM, I have a Raspberry Pi 3 and RP lidar A1, but my base robot is Omni-directional using mecanum wheels, can I use this code for my robot? If so, which part of this code should I change? Thanks in advance.

7675t commented 7 years ago

As you can see the code, we use create_node package for the roomba control. If you have basic control node for your robot, you can simply use it instead of the create_node. Your robot base code need to subscribe cmd_vel topic and publish odom topic for navigation. PR2 has also omni-drecitional mechanism, it would helpful to refer the pr2 packages. Good luck.

Guofeng-Tang commented 7 years ago

I see, thanks for the info. But if I use hector slam, it doesn't require odometry right? Because my robot doesn't have encoder or anything that can provide odometry. How do I configure the launch file?

7675t commented 7 years ago

To my knowledge, hector slam and google cartographer are available to make maps without odometry. Please consult each package guide. I think pub_map_odom_transform parameter is the one for hector SLAM.

Guofeng-Tang commented 7 years ago

I got myself a Roomba 600 series and made a map, but this error occurred when I fired up the navigation amcl.launch screenshot from 2017-06-30 17-18-06

7675t commented 7 years ago

Thank you for the report. As the error message says, you need to install ros-indigo-dwa-local-planner.

Did you do rosdep as follow? This should install all depended packages.

$ cd <your workspace>
$ rosdep install --from-paths src --ignore-src -r -y

Or you need to install it manually.

$ sudo apt install ros-indigo-dwa-local-planner
Guofeng-Tang commented 7 years ago

Thanks for the reply, it worked for a while, but then this error occurred, I tried to change the tolerance at first but it stopped working quickly.

screenshot from 2017-07-12 15-51-08

7675t commented 7 years ago

Oh, yes. I'm familiar with these error messages...

The clock of the Raspberry Pi and your PC would be different. Raspberry Pi have no RTC(Real Time Clock), so you should adjust the clock correctly.

Please try it on both of Raspi and your PC.

$ sudo ntpdate ntp.ubuntu.com

You can adjust the clock automatically using ntpd or chrony. You can google to see how to do it.

Guofeng-Tang commented 7 years ago

I see, thank you so much for the prompt reply.

7675t commented 7 years ago

I'm closing this issue. If you have another problem or question, don't hesitate to create new issue with proper title. Thanks.