(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

Set Pointcloud from log

Description: In this tutorial we use a log folder from active scene recognition which contains a pointcloud which has been used during the process.

Tutorial Level: BEGINNER

Description

In this tutorial we use a log folder from active scene recognition which contains a pointcloud which has been used during the process.

Setup

  1. make sure you have a log folder in ~/log/{date} which contains a "PointCloud" folder. To save pointclouds during scene recognition make sure the !SavePointClouds parameter is set to true in asr_state_machine.

  2. Alternatively download PointCloud _0 and Viewports_0 to ~/PointCloud.

  3. run the whole simulation using rosrun asr_resources_for_active_scene_recognition start_modules_sim.sh.
  4. make sure all modules are working, the tmux "control" window should show the python repl prompt ">>>".

Tutorial

  1. now run in the control window getPCAndViewportsFromLog({location to logfolder}, 0), make sure the path is absolute, since "~" is not expanded, the second parameter "0" specifies the pointcloud that should be taken, 0 is the first, 1 the second and so on. Make sure those pointcloud files exist in ~/log/{date}/PointCloud/PointCloud_{idx}, if using another idx value. If you use the downloaded pointcloud, use "/home/{username}/" (absolute path to home directory) as {location to logfolder}.

  2. Now we have a pointcloud including hypotheses and viewports in a 2-tuple from a previous scene recognition, which consists of a lot of poses. To send this stuff to the nbv and to visualize it run setPCAndViewportsFromLog({location to logfolder}, 0) or setPC(*getPCAndViewportsFromLog({location to logfolder}, 0)), which is basically the same as before with a "set" instead of a "get" or we give it expanded to the setPC function.
  3. Now you should see the pointcloud in rviz. To see the frustum in rviz, go to the ptu_mock tmux window and repeat the last command of the lower right terminal (use your arrow-up key to get the command and press enter). After a few seconds you should be able to see the frustum.

Wiki: asr_resources_for_active_scene_recognition/SetPCAndViewportsFromLog (last edited 2019-11-11 08:19:11 by FelixMarek)