floatlazer / semantic_slam

Real time semantic slam in ROS with a hand held RGB-D camera
GNU General Public License v3.0
647 stars 179 forks source link

questions about the bag file #40

Open wk524629918 opened 3 years ago

wk524629918 commented 3 years ago

I have successfully run demo.bag, I used the Kinect camera to record my own bag file, and the semantic segmentation is normal, but there is no semantic map. What should I pay attention to when making my own demo.bag?

ahmadkh1995 commented 3 years ago

Hi For getting the semantic octomap in Rviz with your own dataset or camera , you have to modify "color_pcl_generator.py" and multiplicate below lines to Depth_Map_Factor , for example to 0.0001 ;

    self.xyd_vect[:,0:2] = self.xy_index * depth_img.reshape(-1,1) / 1000
    self.xyd_vect[:,2:3] = depth_img.reshape(-1,1) / 1000

It's better you check this value and decrease or increase it.

Also check the camera intrinsic matrix parameter in this file "color_pcl_generator.py" and also parameter file (.yaml) corresponds to your camera's intrinsic matrix values , you can check it by;

   $ rostopic echo camera/rgb/camera_info
wk524629918 commented 3 years ago

Hi For getting the semantic octomap in Rviz with your own dataset or camera , you have to modify "color_pcl_generator.py" and multiplicate below lines to Depth_Map_Factor , for example to 0.0001 ;

    self.xyd_vect[:,0:2] = self.xy_index * depth_img.reshape(-1,1) / 1000
    self.xyd_vect[:,2:3] = depth_img.reshape(-1,1) / 1000

It's better you check this value and decrease or increase it.

Also check the camera intrinsic matrix parameter in this file "color_pcl_generator.py" and also parameter file (.yaml) corresponds to your camera's intrinsic matrix values , you can check it by;

   $ rostopic echo camera/rgb/camera_info

Thank you for your reply. How do I get my own Depth_Map_Factor?