DynoRobotics / UnityRos2

77 stars 22 forks source link

sudo docker-compose up doesn't work for me. #6

Closed mhallak closed 4 years ago

mhallak commented 4 years ago

Ubuntu 18.02 - ROS2 dashing installed. docker.io and docker-compose installed.

I am following instructions, I could open unity with the scene. However: [..]/UnityRos2/docker/turtlebot3_navigation$ sudo docker-compose up Didn't work. I would be thrilled for any help. I have no idea how to start solving the problem:

`Finished <<< angles [2.42s] --- stderr: camera_calibration_parsers /opt/dependencies_ws/src/image_common/camera_calibration_parsers/src/parse_ini.cpp: In function ‘bool camera_calibration_parsers::writeCalibrationIni(const string&, const string&, const CameraInfo&)’: /opt/dependencies_ws/src/image_common/camera_calibration_parsers/src/parse_ini.cpp:307:12: error: ‘class rcpputils::fs::path’ has no member named ‘empty’ if (!dir.empty() && !rcpputils::fs::exists(dir) && ^~~~~ /opt/dependencies_ws/src/image_common/camera_calibration_parsers/src/parse_ini.cpp:308:21: error: ‘create_directories’ is not a member of ‘rcpputils::fs’ !rcpputils::fs::create_directories(dir)) ^~~~~~ /opt/dependencies_ws/src/image_common/camera_calibration_parsers/src/parse_yml.cpp: In function ‘bool camera_calibration_parsers::writeCalibrationYml(const string&, const string&, const CameraInfo&)’: /opt/dependencies_ws/src/image_common/camera_calibration_parsers/src/parse_yml.cpp:171:12: error: ‘class rcpputils::fs::path’ has no member named ‘empty’ if (!dir.empty() && !rcpputils::fs::exists(dir) && ^~~~~ /opt/dependencies_ws/src/image_common/camera_calibration_parsers/src/parse_yml.cpp:172:21: error: ‘create_directories’ is not a member of ‘rcpputils::fs’ !rcpputils::fs::create_directories(dir)) ^~~~~~ make[2]: [CMakeFiles/camera_calibration_parsers.dir/src/parse_ini.cpp.o] Error 1 make[2]: Waiting for unfinished jobs.... make[2]: [CMakeFiles/camera_calibration_parsers.dir/src/parse_yml.cpp.o] Error 1 /opt/dependencies_ws/src/image_common/camera_calibration_parsers/src/parse.cpp: In function ‘bool camera_calibration_parsers::writeCalibration(const string&, const string&, const CameraInfo&)’: /opt/dependencies_ws/src/image_common/camera_calibration_parsers/src/parse.cpp:54:9: error: ‘class rcpputils::fs::path’ has no member named ‘extension’ if (p.extension().string() == ".ini") { ^~~~~ /opt/dependencies_ws/src/image_common/camera_calibration_parsers/src/parse.cpp:56:16: error: ‘class rcpputils::fs::path’ has no member named ‘extension’ } else if (p.extension().string() == ".yml" || p.extension().string() == ".yaml") { ^~~~~ /opt/dependencies_ws/src/image_common/camera_calibration_parsers/src/parse.cpp:56:52: error: ‘class rcpputils::fs::path’ has no member named ‘extension’ } else if (p.extension().string() == ".yml" || p.extension().string() == ".yaml") { ^~~~~ In file included from /opt/ros2_ws/install/include/rclcpp/client.hpp:39:0, from /opt/ros2_ws/install/include/rclcpp/callback_group.hpp:23, from /opt/ros2_ws/install/include/rclcpp/any_executable.hpp:20, from /opt/ros2_ws/install/include/rclcpp/memory_strategy.hpp:24, from /opt/ros2_ws/install/include/rclcpp/memory_strategies.hpp:18, from /opt/ros2_ws/install/include/rclcpp/executor.hpp:32, from /opt/ros2_ws/install/include/rclcpp/executors/multi_threaded_executor.hpp:24, from /opt/ros2_ws/install/include/rclcpp/executors.hpp:21, from /opt/ros2_ws/install/include/rclcpp/rclcpp.hpp:144, from /opt/dependencies_ws/src/image_common/camera_calibration_parsers/src/parse.cpp:42: /opt/dependencies_ws/src/image_common/camera_calibration_parsers/src/parse.cpp:62:9: error: ‘class rcpputils::fs::path’ has no member named ‘extension’ p.extension().string().c_str()); ^ /opt/ros2_ws/install/include/rcutils/logging_macros.h:72:64: note: in definition of macro ‘RCUTILS_LOG_COND_NAMED’ rcutils_log(&rcutils_logging_location, severity, name, VA_ARGS); \ ^~~ /opt/ros2_ws/install/include/rclcpp/logging.hpp:494:5: note: in expansion of macro ‘RCUTILS_LOG_ERROR_NAMED’ RCUTILS_LOG_ERROR_NAMED( \ ^~~~~~~ /opt/ros2_ws/install/include/rclcpp/logging.hpp:497:9: note: in expansion of macro ‘RCLCPP_ALL_BUT_FIRST_ARGS’ RCLCPP_ALL_BUT_FIRST_ARGS(VA_ARGS,"")); \ ^~~~~~~~~ /opt/dependencies_ws/src/image_common/camera_calibration_parsers/src/parse.cpp:59:5: note: in expansion of macro ‘RCLCPP_ERROR’ RCLCPP_ERROR( ^~~~ /opt/dependencies_ws/src/image_common/camera_calibration_parsers/src/parse.cpp: In function ‘bool camera_calibration_parsers::readCalibration(const string&, std::cxx11::string&, camera_calibration_parsers::CameraInfo&)’: /opt/dependencies_ws/src/image_common/camera_calibration_parsers/src/parse.cpp:73:9: error: ‘class rcpputils::fs::path’ has no member named ‘extension’ if (p.extension().string() == ".ini") { ^~~~~ /opt/dependencies_ws/src/image_common/camera_calibration_parsers/src/parse.cpp:75:16: error: ‘class rcpputils::fs::path’ has no member named ‘extension’ } else if (p.extension().string() == ".yml" || p.extension().string() == ".yaml") { ^~~~~ /opt/dependencies_ws/src/image_common/camera_calibration_parsers/src/parse.cpp:75:52: error: ‘class rcpputils::fs::path’ has no member named ‘extension’ } else if (p.extension().string() == ".yml" || p.extension().string() == ".yaml") { ^~~~~ In file included from /opt/ros2_ws/install/include/rclcpp/client.hpp:39:0, from /opt/ros2_ws/install/include/rclcpp/callback_group.hpp:23, from /opt/ros2_ws/install/include/rclcpp/any_executable.hpp:20, from /opt/ros2_ws/install/include/rclcpp/memory_strategy.hpp:24, from /opt/ros2_ws/install/include/rclcpp/memory_strategies.hpp:18, from /opt/ros2_ws/install/include/rclcpp/executor.hpp:32, from /opt/ros2_ws/install/include/rclcpp/executors/multi_threaded_executor.hpp:24, from /opt/ros2_ws/install/include/rclcpp/executors.hpp:21, from /opt/ros2_ws/install/include/rclcpp/rclcpp.hpp:144, from /opt/dependencies_ws/src/image_common/camera_calibration_parsers/src/parse.cpp:42: /opt/dependencies_ws/src/image_common/camera_calibration_parsers/src/parse.cpp:81:9: error: ‘class rcpputils::fs::path’ has no member named ‘extension’ p.extension().string().c_str()); ^ /opt/ros2_ws/install/include/rcutils/logging_macros.h:72:64: note: in definition of macro ‘RCUTILS_LOG_COND_NAMED’ rcutils_log(&rcutils_logging_location, severity, name, VA_ARGS); \ ^~~ /opt/ros2_ws/install/include/rclcpp/logging.hpp:494:5: note: in expansion of macro ‘RCUTILS_LOG_ERROR_NAMED’ RCUTILS_LOG_ERROR_NAMED( \ ^~~~~~~ /opt/ros2_ws/install/include/rclcpp/logging.hpp:497:9: note: in expansion of macro ‘RCLCPP_ALL_BUT_FIRST_ARGS’ RCLCPP_ALL_BUT_FIRST_ARGS(VA_ARGS__,"")); \ ^~~~~~~~~ /opt/dependencies_ws/src/image_common/camera_calibration_parsers/src/parse.cpp:78:5: note: in expansion of macro ‘RCLCPP_ERROR’ RCLCPP_ERROR( ^~~~ make[2]: [CMakeFiles/camera_calibration_parsers.dir/src/parse.cpp.o] Error 1 make[1]: [CMakeFiles/camera_calibration_parsers.dir/all] Error 2 make[1]: Waiting for unfinished jobs.... make: *** [all] Error 2

Failed <<< camera_calibration_parsers [ Exited with code 2 ] `

ErikOrjehag commented 4 years ago

Try without sudo and report back what happens. In not sure if it solves the problem but you are not suppose to use sudo :)

samiamlabs commented 4 years ago

It could be a very recent change in https://github.com/ros-perception/image_common/tree/ros2 that broke something. Building this worked just fine a couple of days ago.

Will try to rebuild and/or push the latest working docker image with the navigation2 stack to dockerhub so that docker-compose up does need to build from source on your local computer.

samiamlabs commented 4 years ago

The problem was what I thought it was and should be fixed in 718297bdc5465b03d4816dcce3bb1308a3da29ef

I would appreciate if you can test that it works now so we can close the issue @mhallak

mhallak commented 4 years ago

Thank you so much! I will check on Sunday... 🌞

On Thu, Oct 24, 2019, 9:06 PM Samuel Lindgren notifications@github.com wrote:

The problem was what I thought it was and should be fixed in 718297b https://github.com/DynoRobotics/UnityRos2/commit/718297bdc5465b03d4816dcce3bb1308a3da29ef

I would appreciate if you can test that it works now so we can close the issue @mhallak https://github.com/mhallak

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/DynoRobotics/UnityRos2/issues/6?email_source=notifications&email_token=AATP54LTAZBGMGFCW42GQU3QQHPZJA5CNFSM4JEVKQU2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECF5PWI#issuecomment-546035673, or unsubscribe https://github.com/notifications/unsubscribe-auth/AATP54I5SQTMUTFPKIMKTDLQQHPZJANCNFSM4JEVKQUQ .

ErikOrjehag commented 4 years ago

If you think something was unclear in the readme you can create a pull request with clarifications. We appriciate the feedback, this is a fairly new project 😊

mhallak commented 4 years ago

Try without sudo and report back what happens. In not sure if it solves the problem but you are not suppose to use sudo :)

The instructions specifies not to use sudo for the script python that runs Unity (python3 start_editor.py ) and indeed, I didn't use sudo for it. However, with docker-compose, the script doesn't find the daemon without sudo: ERROR: Couldn't connect to Docker daemon at http+docker://localhost - is it running?

mhallak commented 4 years ago

The new version solved the problem. Thanks a lot.

samiamlabs commented 4 years ago

Try without sudo and report back what happens. In not sure if it solves the problem but you are not suppose to use sudo :)

The instructions specifies not to use sudo for the script python that runs Unity (python3 start_editor.py ) and indeed, I didn't use sudo for it. However, with docker-compose, the script doesn't find the daemon without sudo: ERROR: Couldn't connect to Docker daemon at http+docker://localhost - is it running?

You can find instructions for setting up docker to run without sudo here: https://dyno-system-config.readthedocs.io/en/latest/docker.html