Not able to see 3d map in rviz
Hi, i want to make 3d map using UTM-30LX. I created 2d map. Then I write tf_broadcaster to provide transform between /world and /laser frame when hokuyo is moving in upward direction. Not able to see 3d map in rviz. The tf_broadcaster.cpp is given below.
#include <ros/ros.h>
#include <tf/transform_broadcaster.h>
int main(int argc, char** argv){
ros::init(argc, argv, "my_tf_broadcaster");
ros::NodeHandle node;
ros::Rate rate(30.0);
static tf::TransformBroadcaster br;
tf::Transform transform;
while(ros::ok()) {
transform.setOrigin( tf::Vector3(0.0, 0.0, 0.0) );
tf::Quaternion q;
q.setRPY(0, 0, 0);
transform.setRotation(q);
br.sendTransform(tf::StampedTransform(transform, ros::Time::now(), "world", "laser"));
rate.sleep();
ros::spinOnce();
}
return 0;
};
In rviz "no /world frame exist" error is coming. Can anybody tell me where i am wrong?
Just a guess: what are you using to create the map? Can you see the Scan? Maybe the frame_id of whatever you use to create the map expects the
/
in front ofworld
which you are not publishing. It should be removed then.i am using hector_mapping to create a map with that i am able to see 2d map in rviz.
alright, so you have a 2D map. But what about 3D? This is what is not working... Check the
frame_id
s there.According to me frame id should be world. Do you think this is the right way to create a 3d map?
Are you using any program that actually provides some 3D mapping algorithm? If yes, which one? If no, there will be no 3D map...
Actually i don't know any algorithm for generating 3d map. I thought by providing transform between world and laser will create 3d map. Do you know any algorithm?