RobotLocomotion/LabelFusion

How to record data?

TrinhNC opened this issue · 8 comments

What should I do after running lcm-logger? My log file is unchanged and always 0 KB.

@TrinhTUHH If you managed to get a log file that is not empty, can you please clarify how you did it? I don't get any error after running openni2-camera-lcm and lcm-logger so i have no clue so far what might be the reason behind this issue.
Thanks!

Maybe try installing this package rgbd_ros_to_lcm. Run it before lcm-logger
I am using Realsense camera and follow this fork:
https://github.com/ianre657/LabelFusion

@TrinhTUHH Thank you for your reply. It didn't work because of a small gaffe from my part and the issue was fixed by running openni2-camera-lcm from another terminal that is also executing the container that is already running using docker exec.

@TrinhTUHH Thank you for your reply. It didn't work because of a small gaffe from my part and the issue was fixed by running openni2-camera-lcm from another terminal that is also executing the container that is already running using docker exec.

I use the prime sense sensor. My log file is unchanged and always 0 KB. Could you give me some advice on how to solve it.

@TrinhTUHH Thank you for your reply. It didn't work because of a small gaffe from my part and the issue was fixed by running openni2-camera-lcm from another terminal that is also executing the container that is already running using docker exec.

How did you use the exec command? I cannot use the LabelFusion specific bash scripts after opening it in a new terminal with exec command.
Thank you!

  1. In a terminal run: ./docker_run.sh $path_to_folder
  2. Open another terminal and run: docker ps, then check the name of the current running container
  3. run: docker exec -it $container_name
  4. run: openni2-camera-lcm

@tiexuedanxin @danikhani

1. In a terminal run:  ./docker_run.sh  $path_to_folder

2. Open another terminal and run: docker ps, then check the name of the current running container

3. run: docker exec -it $container_name

4. run: openni2-camera-lcm

@tiexuedanxin @danikhani

Thanks for your reply! The exec command needs two agruments: docker exec [OPTIONS] CONTAINER COMMAND.
So we should give it bash as argument and if so then still the problem of not being able to run the bash scripts is there.

I get bash: openni2-camera-lcm: command not found after trying to run openni2-camera-lcm in the second terminal. The first terminal works fine.

Ok i solved this problem. Thank you @khmariem for guiding me into the correct direction.

Problem: After running docker exec -it CONTAINER bash the envoirment variables in .bashcr wont be the same as the main terminal. Thats why none of the bash commands like run_alignment_tool & openni2-camera-lcm were not working in the new terminal.

Solution:

  1. run set List the name and value of each shell variable.
  2. find the differences using text-compare.com or smiliar sites
  3. add the differences to the new terminal opened by exec.
  4. run source .bashrc to restart the shell for the changes to take effect or source on the new terminal opened by exec.
    I tried run_alignment_tool & openni2-camera-lcm and both are working in the new terminal.

In my case I added to following to the new terminal:

  • export PATH=$PATH:/root/labelfusion/scripts/bin:/root/labelfusion/automation/scripts/bin:/root/install/bin
  • export DIRECTOR_INSTALL_DIR=/root/install
  • export ELASTIC_FUSION_EXECUTABLE=/root/install/bin/ElasticFusion
  • export FGR_BASE_DIR=/root/software_tools/FastGlobalRegistration
  • export GOICP_BASE_DIR=/root/software_tools/GoICP_V1.3
  • export LABELFUSION_SOURCE_DIR=/root/labelfusion
  • export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/root/install/lib
  • export PYTHONPATH=:/root/labelfusion/modules
  • export SUPER4PCS_BASE_DIR=/root/software_tools/nmellado-Super4PCS-c77cc4a