Gmapping problem
Hello I am trying to get a map of the area with a differential drive mobile robot, for which the following are the steps followed.
- Open the kinect with openini using "roslaunch openni_launch openni.launch".
Change the pointcloud to the laser scan using "rosrun depthimage_to_laserscan depthimage_to_laserscan image:=/camera/depth/image_raw", after step-2 I am able to see the "laser scan" in the RVIz properly.
Running the gmapping with "rosrun gmapping slam_gmapping scan:=/scan tf:=/odom" , I am running the node which publishes the odom (the odometry data from the real robot).
Then open rviz with "rosrun rviz rviz".
But in RVIZ I am unable to see any mapping.
Questions:
The procedure which I follwed is correct or Is there something I am missing..?
For publishing the odo data I am using the example from the following link: http://wiki.ros.org/navigation/Tutori... with the following changes:
- Added a callback, so as to subscribe to the incoming data from the robot.
- Changed the velocities to suit for differential drive robot.
- Small change in calculation of the robot position based on odo.
But the odom published from this has many fields:
nav_msgs::Odometry odom;
odom.header.stamp = current_time;
odom.header.frame_id = "odom";
//set the position
odom.pose.pose.position.x = x;
odom.pose.pose.position.y = y;
odom.pose.pose.position.z = 0.0;
odom.pose.pose.orientation = odom_quat;
//set the velocity
odom.child_frame_id = "base_link";
odom.twist.twist.linear.x = vx;
odom.twist.twist.linear.y = vy;
odom.twist.twist.angular.z = vth;
which one I should give to the gmapping...?
Please find the rqt_graph here
Please find the frames.pdf here
Many thanks in advance
share your rqt_graph here in question
I am unable to attach the rqt_graph here because of lack of points!!
i did upvote, try now if its possible. or use http://imgur.com/
I have modified the question
you can see from image that odom is not published . publish Odom and start gmapping like "rosrun gmapping slam_gmapping scan:=scan _odom_frame:=/odom"
Its getting published, I have reuploaded the rqt_graph. but how to link the odom to the gmapping...?
rosrun gmapping slam_gmapping scan:=scan odom_frame:=/odom
No its not geeting linked, you can check the rqt_graph