danimtb / pioneer3at_ETSIDI

Pioneer 3 AT ROS setup at ETSIDI-UPM
19 stars 16 forks source link

Obstacle avoidance solely based on kinect ? #1

Closed victorkhoo closed 7 years ago

victorkhoo commented 9 years ago

Hi, I am new to ros system and i hope you could help me. I currently using ros hydro in ubuntu 12.04

i am doing a mini project to use kinect for obstacle avoidance and i look though your navigation stack is mainly based on Laser Sick LMS100 right ? since the navigation is based on amcl ? (Correct me if i am wrong)

I not sure which part of the cpp file tell me the kinect data received for obstacle avoidance. Is it possible to do it just by using a kinect for obstacle avoidance ?

I do understand using kinect_to_laser.launch use depthimage_to_laserscan help Converts a 3D Point Cloud into a 2D laser scan. This is useful for making devices like the Kinect appear like a laser scanner for 2D-based algorithms.

So for now, i did the roslaunch pioneer_utils navigation_p3at.launch and get the following error.

[ WARN] [1445956692.807409318]: Waiting on transform from base_link to map to become available before running costmap, tf error: [ WARN] [1445956697.853706464]: Waiting on transform from base_link to map to become available before running costmap, tf error: [ WARN] [1445956702.898947491]: Waiting on transform from base_link to map to become available before running costmap, tf error: [ WARN] [1445956707.945738360]: Waiting on transform from base_link to map to become available before running costmap, tf error: [ WARN] [1445956712.990911754]: Waiting on transform from base_link to map to become available before running costmap, tf error:

Thanks

bailiqun commented 9 years ago

what is your tf tree look like? it seem like your transform failed.it should be map->odom(if you have odom data)->base_link->laser(convert by kinect)

victorkhoo commented 9 years ago

Thanks Bailiqun for reply. I do a rosrun rqt_graph rqt_graph. I quite new to this, glad you could guide me. Should i remove anything that is LMS100 related ? I notice there is nothing from the map server, should i launch the map on rviz ? But my navigation_p3at.launch already have this line :+1:

<node name="map_server" pkg="map_server" type="map_server" args="$(find pioneer_utils)/maps/floor_zero-map.yaml"/>

rosgraph

bailiqun commented 9 years ago

maybe this will help . https://github.com/turtlebot/turtlebot_apps/tree/indigo/turtlebot_navigation turtlebot also use kinect to navigation,all launch files pretty clear.

danimtb commented 9 years ago

Hi @victorkhoo! Thanks a lot for your interest in my work!

As you see my navigation stack configuration is based on kinect and Sick LMS11 laser. Obviously, laser is much better for localization than kinect but you can use just kinect camera to localize and avoid obstacles.

AMCL is used to localize the robot in a map published by map_server. I've just updated navigation files to support navigation without any map, so it's a good point to start in case you don't want to load any map.

You should check local_navigation_p3at.launch and just get rid of _sicklms1xx from observation_sources in both global_costmap_params.yaml and local_costamp_params.yaml.

As you have said, I use depthimage_to_laserscan to split the pointclud2 from kinect into 3 different laserscan data. kinect_to_laser.launch is the main one.

Kinect node is launched from [pioneer3at-rosaria.launch(https://github.com/danimtb/pioneer3at_ETSIDI/blob/master/pioneer_utils/sensors/pioneer3at-rosaria.launch)

<!-- start sensor-->
<include file="$(find freenect_launch)/launch/freenect.launch"/>

and sensor frame _cameralink is "linked" with a static_transform:

<node pkg="tf" type="static_transform_publisher" name="base_to_camera_broadcaster" args="-0.020 0 0.360 0 0 0 base_link camera_link 1" />

Those are configurations related to my robot hardware position, so you should proceed in the same way but with your own config.

If you follow ROS navigation tutorial you'll find this information much more understandable.

Hope it helps!!

victorkhoo commented 9 years ago

Hi @danimtb , Thanks for your detailed guidance and i understand your detailed instruction.
After trying for few days, I still can't troubleshoot the problem. I still got this warning when i roslaunch local_navigation_p3at.launch [ WARN] [1445956692.807409318]: Waiting on transform from base_link to map to become available before running costmap, tf error:

I try to follow ur instruction get rid of sick_lms1xx from observation_sources in both global_costmap_params.yaml and local_costamp_params.yaml. I even remove the following in pioneer3at-rosaria.launch and it still don't work. I Removed : LMS1xx_node, scan_filtered node, base_to_laser_broadcaster.

In local_navigation_p3at.launch, i tried playing with it and remove anything related to global_map, But one thing for sure is that the map_server node is not launch =) Hope you could continue to help me. Once again thank you !

danimtb commented 9 years ago

Hi @victorkhoo,

Local navigation is under revision right now to fix problem you report. You are right, something is missing there. I'll figure out as soon as possible. Meanwhile you could try with global_navigation.launch to try if everything is working.

victorkhoo commented 8 years ago

Hi, any solution to the local navigation ? I still stuck with my project. Tried global navigation but it has the same error. Thank you very much

victorkhoo commented 8 years ago

Hi @danimtb

any idea why my result still the same ? i still get the following error when i launch the various navigation launch files.

[ WARN] [1445956692.807409318]: Waiting on transform from base_link to map to become available before running costmap, tf error:

Did i forgot to launch something else ? I did the following :

  1. roscore
  2. roslaunch pioneer_utils pioneer3at-rosaria.launch
  3. roslaunch pioneer_utils gazebo-global_navigation_p3at.launch
danimtb commented 8 years ago

Hi @victorkhoo

I've done some checks with mi P3AT robot and local nav is working now. I haven't pushed changes yet, will do it this evening so you can check them.

I'll try to help you with your setup asap! El 22/1/2016 11:36 a. m., "victorkhoo" notifications@github.com escribió:

Hi @danimtb https://github.com/danimtb

any idea why result still the same ?

— Reply to this email directly or view it on GitHub https://github.com/danimtb/pioneer3at_ETSIDI/issues/1#issuecomment-173873800 .

victorkhoo commented 8 years ago

Thank you very much for your patience and guidance. I feeling desperate because I am solo and clueless about this project. I try local navigation. same result too. [ WARN] [1445956692.807409318]: Waiting on transform from base_link to map to become available before running costmap, tf error:

not sure why is it different from your result.

danimtb commented 8 years ago

@victorkhoo give some details about your setup so I have a clear idea

are u using a Pioneer 3 AT robot? do u have more sensors apart from Kinect? are u running ros in an embedded computer? which version of ros do u have?

victorkhoo commented 8 years ago

Yes, I am using P3AT only using Kinect I running ros in my laptop, usb to serial comm work. i using ros hydro

victorkhoo commented 8 years ago

My guess is some issue with the TF. Probably because your TF setting is set to publish and subscribe laser, kinect, map information. That why the error is shown to be related to "map". By right in local navigation, there should not be map in it. I not too sure where to edit the TF part. Correct me if i am wrong. Thanks

danimtb commented 8 years ago

Hi @victorkhoo, Local navigation (without map) is now working. The main launchfiles to run local navigation are pioneer3at-rosaria.launch and local_navigation_p3at.launch.

Remember you should get rid of everything related to laser node LMS1xx and configure your static transformation between base_link and camera_link. Edit this line with the position of the Kinect in your robot: node pkg="tf" type="static_transform_publisher" name="base_to_camera_broadcaster" args="-0.020 0 0.360 0 0 0 base_link camera_link 1" />

You'll have to edit both local and global costmaps to delete configs related to LMS1xx laser node.

I encourage to fork this repository, create your own branch, commit changes with your own modification and push them to your repository so I can have a look and try to help you.

victorkhoo commented 8 years ago

Thanks daniel. I will fork ur repository again and update you again. Thank for your help bro.

victorkhoo commented 8 years ago

Thanks so much for your help. I rewrote the nav-waypoints.cpp again and it able to obstacle avoid. Thanks for your help. The minor problem is sometime the local navigation show that "it failed to get a plan".

I will update in my repo soon