Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: RAI dockerfiles #377

Merged
merged 9 commits into from
Jan 21, 2025
Merged

feat: RAI dockerfiles #377

merged 9 commits into from
Jan 21, 2025

Conversation

maciejmajek
Copy link
Member

Purpose

As discussed in #345, integrating RAI into other environments can be challenging, especially when working with pre-established local setups (e.g., conda installations, custom Python wrappers, etc.). Providing Docker images and Dockerfiles accessible to developers could significantly simplify the process of setting up and using RAI.

Proposed Changes

Introduce experimental Docker images to facilitate easier RAI setup.

Issues

Closing #376

Testing

  • Build and run Docker images.
  • Execute tests using pytest.

@maciejmajek maciejmajek linked an issue Jan 19, 2025 that may be closed by this pull request
This was referenced Jan 19, 2025
Copy link
Contributor

@rachwalk rachwalk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the rationale for having two dockerfiles? I think that a better solution would be to use ARG ROS_DISTRO=jazzy (for default value). That would halve the need for maintanence of the docker (change one file instead of to) and allow for building with a single parametrized command: docker build --build-arg ROS_DISTRO=humble .

Also I believe it would be a good practice to verify in the CI that the docker images do in fact build, as means of testing. It is a decently common occurance for a docker image to break unexpectedly, so it's good to have that test.

docker/Dockerfile.humble Outdated Show resolved Hide resolved
docker/Dockerfile.jazzy Outdated Show resolved Hide resolved
@maciejmajek
Copy link
Member Author

@rachwalk thank you for the feedback. I've refactored dockerfiles into single file and used osrf base image.

@boczekbartek boczekbartek self-requested a review January 20, 2025 16:21
Copy link
Member

@boczekbartek boczekbartek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maciejmajek Thank you! Good initiative to add docker support.
For clean repo docker seem to work fine with suggested changes, but I failed to build a repo with O3DE examples (I tried with manipulation demo - it lacks moveit dependencies). I'll report back with a proposal to improve current setup.

docker/Dockerfile Show resolved Hide resolved
docs/setup_docker.md Show resolved Hide resolved
@maciejmajek
Copy link
Member Author

@boczekbartek I think the demos define theirs additional deps?

@boczekbartek
Copy link
Member

boczekbartek commented Jan 20, 2025

@maciejmajek Yes, they do. Do you plan to handle them in this PR or should it be implemented in demos?

@maciejmajek
Copy link
Member Author

maciejmajek commented Jan 20, 2025

@boczekbartek For now, I think that it should be developer's responsibility to install additional dependencies. I'm open to discussing it in the future. I will create an issue regarding docker difficulties in rai

docker/Dockerfile Outdated Show resolved Hide resolved
@boczekbartek
Copy link
Member

boczekbartek commented Jan 21, 2025

For now, I think that it should be developer's responsibility to install additional dependencies. I'm open to discussing it in the future. I will create an issue regarding docker difficulties in rai

@maciejmajek Fine by me! I think submitting an issue is a good idea, because demos might need some work to be available through docker. I had some success, but also some problems.

Success:

  • when I downloaded manipulation_demo binary from manipulation_demo and ran it locally, I was able to run debugging_assistant in docker and see it's ros2 interfaces (topics/services etc). I used cyclone-dds.

Problems:
I followed the instructions of the demo and successfully installed additional packages with rosdep. However I noticed 2 problems. For the sake of running o3de outside of docker (not to overcomplicate the setup with opening a windowed app in docker) I simplified the manipulation-demo.launch.py only to run vision and moveit nodes

  • container should be run with --runtime=nvidia, rai_openset_vision requires it (easily solvable with nvidia-container-runtime and docs adaptation)
  • for some reason moveit fails:
error
[move_group-3] [FATAL] [1737418587.903365475] [move_group.moveit.moveit.ros.planning_pipeline]: Exception while loading planner 'chomp_interface/CHOMPPlanner': According to the loaded plugin descriptions the class chomp_interface/CHOMPPlanner with base class type planning_interface::PlannerManager does not exist. Declared types are  ompl_interface/OMPLPlanner pilz_industrial_motion_planner/CommandPlanner stomp_moveit/StompPlannerAvailable plugins: ompl_interface/OMPLPlanner, pilz_industrial_motion_planner/CommandPlanner, stomp_moveit/StompPlanner
[move_group-3] terminate called after throwing an instance of 'pluginlib::LibraryLoadException'
[move_group-3]   what():  According to the loaded plugin descriptions the class chomp_interface/CHOMPPlanner with base class type planning_interface::PlannerManager does not exist. Declared types are  ompl_interface/OMPLPlanner pilz_industrial_motion_planner/CommandPlanner stomp_moveit/StompPlanner
[move_group-3] Stack trace (most recent call last):
[move_group-3] #16   Object "", at 0xffffffffffffffff, in 
[move_group-3] #15   Object "/opt/ros/jazzy/lib/moveit_ros_move_group/move_group", at 0x5585d090fa44, in _start
[move_group-3] #14   Object "/usr/lib/x86_64-linux-gnu/libc.so.6", at 0x7476cf9fb28a, in __libc_start_main
[move_group-3] #13   Object "/usr/lib/x86_64-linux-gnu/libc.so.6", at 0x7476cf9fb1c9, in 
[move_group-3] #12   Object "/opt/ros/jazzy/lib/moveit_ros_move_group/move_group", at 0x5585d090e162, in main
[move_group-3] #11   Object "/opt/ros/jazzy/lib/libmoveit_cpp.so.2.12.1", at 0x7476d035882f, in moveit_cpp::MoveItCpp::MoveItCpp(std::shared_ptr<rclcpp::Node> const&, moveit_cpp::MoveItCpp::Options const&)
[move_group-3] #10   Object "/opt/ros/jazzy/lib/libmoveit_cpp.so.2.12.1", at 0x7476d0353f90, in moveit_cpp::MoveItCpp::loadPlanningPipelines(moveit_cpp::MoveItCpp::PlanningPipelineOptions const&)
[move_group-3] #9    Object "/opt/ros/jazzy/lib/libmoveit_planning_pipeline_interfaces.so.2.12.1", at 0x7476cf77e86e, in moveit::planning_pipeline_interfaces::createPlanningPipelineMap(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::shared_ptr<moveit::core::RobotModel const> const&, std::shared_ptr<rclcpp::Node> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
[move_group-3] #8    Object "/opt/ros/jazzy/lib/libmoveit_planning_pipeline.so.2.12.1", at 0x7476cf65017c, in planning_pipeline::PlanningPipeline::PlanningPipeline(std::shared_ptr<moveit::core::RobotModel const> const&, std::shared_ptr<rclcpp::Node> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
[move_group-3] #7    Object "/opt/ros/jazzy/lib/libmoveit_planning_pipeline.so.2.12.1", at 0x7476cf63ad70, in 
[move_group-3] #6    Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.33", at 0x7476cfcb5a61, in 
[move_group-3] #5    Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.33", at 0x7476cfcb5a48, in std::terminate()
[move_group-3] #4    Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.33", at 0x7476cfccae9b, in 
[move_group-3] #3    Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.33", at 0x7476cfcb5ffd, in 
[move_group-3] #2    Object "/usr/lib/x86_64-linux-gnu/libc.so.6", at 0x7476cf9f98fe, in abort
[move_group-3] #1    Object "/usr/lib/x86_64-linux-gnu/libc.so.6", at 0x7476cfa1626d, in raise
[move_group-3] #0    Object "/usr/lib/x86_64-linux-gnu/libc.so.6", at 0x7476cfa6fb1c, in pthread_kill
[move_group-3] Aborted (Signal sent by tkill() 2986497 0)

@maciejmajek maciejmajek merged commit 9322016 into development Jan 21, 2025
5 checks passed
@maciejmajek maciejmajek deleted the feat/dockerfiles branch January 21, 2025 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docker image for RAI
3 participants