My turtlebot cannot avoid obstacles with Xbox One Kinect
I use Turtlebot(Kobuki) and Xbox One Kinect(Kinect v2) on Ubuntu16.04 and ROS Kinetic. I succeeded to SLAM and AMCL with turtlebot_navigation package. On the other hand, when turtlebot moved autonomously, it didn't avoid obstacles like walking human. I checked my costmap_common_params.yaml, but I couldn't find any mistakes. If you have some idea, could you please tell me?
When I attached and launch Kinect, I referred to this page. To start SLAM and AMCL, I type following commands. When I launched minimal.launch, 3 nodes(rocon_master, rocon_app_manager, interactions) failed to start. I understand rocon is just a interface to communicate with user, so 3 nodes wake up error don't relate not to avoid obstacles issue.
- roslaunch turtlebot_bringup minimal.launch
- roslaunch kinect2_bridge kinect2_bridge.launch publish_tf:=true
- rosrun depthimage_to_laserscan depthimage_to_laserscan image:=/kinect2/sd/image_depth_rect _output_frame_id:=/base_kinectv2_link
- roslaunch turtlebot_navigation gmapping_demo.launch / amcl_demo.launch
To succeed SLAM and AMCL, I mainly changed following files. I didn't change my local_costmap_params.yaml.
3dsensor.launch
I commented out from line 43 to the end of file.turtlebot_library.urdf.xacro
I added Kinect v2 model. I checked out Kinect v2 one from here and named turtlebot_kinect2_rgb_optical_frame. Furthermore, I defined base_kinect2_link originally. This is because when I used turtlebot_kinect2_rgb_optical_frame, scan data is projected on Y-Z plane, not X-Y plane. I found the reason of this problem is that attitude of turtlebot_kinect2_rgb_optical_frame is not rotated for base_link and base_footprint. So I resolve the problem, I defined base_kinect2_link which attitude is same as base_link and the pose is same as turtlebot_kinect2_rgb_optical_frame.costmap_common_params.yaml(1), costmap_common_params.yaml(2) I added "sensor_frame" in scan section. The name of the topic publishing Kinect v2 data is "scan".
[CHANGE] I uploaded my configuration files and other ones to GitHub. URL is https://github.com/graziegrazie/my_tu... . If you have a time, please check my files and comment to my problem.
There are other ways to show your configuration files. Upload them to GitHub, put them in as a GIST or use any other of the codes snippet hosters out there...
Hi, mig. Thank you for your comment. I uploaded my code and configuration files to GitHub and added URL to content. If you check it and comment to me, it's a very glad for me.