Ask Your Question

Not able to see 3d map in rviz

asked 2016-01-24 13:19:56 -0500

ARCHANA gravatar image

updated 2016-01-25 10:47:19 -0500

lucasw gravatar image

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);
  br.sendTransform(tf::StampedTransform(transform, ros::Time::now(), "world", "laser"));

  return 0;

In rviz "no /world frame exist" error is coming. Can anybody tell me where i am wrong?

edit retag flag offensive close merge delete


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 of world which you are not publishing. It should be removed then.

mgruhler gravatar image mgruhler  ( 2016-01-26 02:14:49 -0500 )edit

i am using hector_mapping to create a map with that i am able to see 2d map in rviz.

ARCHANA gravatar image ARCHANA  ( 2016-01-27 11:59:27 -0500 )edit

alright, so you have a 2D map. But what about 3D? This is what is not working... Check the frame_ids there.

mgruhler gravatar image mgruhler  ( 2016-01-28 01:14:39 -0500 )edit

According to me frame id should be world. Do you think this is the right way to create a 3d map?

ARCHANA gravatar image ARCHANA  ( 2016-01-31 04:28:23 -0500 )edit

Are you using any program that actually provides some 3D mapping algorithm? If yes, which one? If no, there will be no 3D map...

mgruhler gravatar image mgruhler  ( 2016-02-01 01:30:45 -0500 )edit

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?

ARCHANA gravatar image ARCHANA  ( 2016-02-01 08:04:17 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2016-02-02 02:33:30 -0500

mgruhler gravatar image

You need a 3D mapping algorithm to build and see a 3D map. There are several available, e.g. octomap_mapping (which relies on another localization source, i.e. this is not a SLAM algorithm).

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2016-01-24 13:19:56 -0500

Seen: 264 times

Last updated: Feb 02 '16