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:
- run
set List the name and value of each shell variable.
- find the differences using text-compare.com or smiliar sites
- add the differences to the new terminal opened by exec.
- run
source .bashrc to restart the shell for the changes to take effecton 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
Although this fixed the problem but it seems that this is not the correct workaround of this problem. Does anybody have a better solution?
Thank you!