usnistgov / ARIAC

Repository for ARIAC (Agile Robotics for Industrial Automation Competition), consisting of kit building and assembly in a simulated warehouse
https://pages.nist.gov/ARIAC_docs/en/latest/index.html
Other
110 stars 61 forks source link

unable to get moveit working in docker #324

Closed dan9thsense closed 5 months ago

dan9thsense commented 5 months ago

Trying to set up for the automated evaluation. I tried installing moveit in the pre-build script with apt install ros-iron-moveit and the package installed but the docker container does not find it for importing. I tried using source /opt/ros/iron/setup.bash but to no avail. I also tried installing from source, but the build for that fails.

"ModuleNotFoundError: No module named 'moveit'

jaybrecht commented 5 months ago

All ros packages will automatically be installed through rosdep if they are added to the package.xml

Try adding these lines to your manifest:

<depend>moveit_py</depend>
<depend>moveit_core</depend>
<exec_depend>moveit</exec_depend>
dan9thsense commented 5 months ago

That helped but now there was an error in run trial-- it does not launch the sim environment.

./run_trial.sh sirius kitting

My launch file starts ok but gazebo does not show up.

An instance of Gazebo is not running.
Gazebo not running
Traceback (most recent call last):
  File "/container_scripts/run_trial.py", line 106, in <module>
    main()
  File "/container_scripts/run_trial.py", line 90, in main
    shutil.copy(
  File "/usr/lib/python3.10/shutil.py", line 417, in copy
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/usr/lib/python3.10/shutil.py", line 254, in copyfile
    with open(src, 'rb') as fsrc:
NotADirectoryError: [Errno 20] Not a directory: '/workspace/src/ARIAC/ariac_log/README.md/sensor_cost.txt'
==== Copying logs to
Successfully copied 2.05kB to /home/dbarry/ariac_ws/src/ARIAC_evaluation/automated_evaluation/logs/sirius/kitting_6/trial_log.txt
Error response from daemon: Could not find the file /tmp/sensor_cost.txt in container sirius
Error response from daemon: Could not find the file /tmp/state.log in container sirius
Successfully copied 6.66kB to /home/dbarry/ariac_ws/src/ARIAC_evaluation/automated_evaluation/logs/sirius/kitting_6/ros_log/

from trial_log.txt: Gazebo Crashed score not recorded

dan9thsense commented 5 months ago

just for grins, I tried launching it from inside the container:

root@db:/workspace/src# source /opt/ros/iron/setup.bash
root@db:/workspace/src# ros2 launch ariac_gazebo ariac.launch.py competitor_pkg:=my_ariac_2024 sensor_config:=barebones trial_name:=kitting dev_mode:=false
Package 'ariac_gazebo' not found: "package 'ariac_gazebo' not found, searching: ['/opt/ros/iron']"
dan9thsense commented 5 months ago

I was able to get it to run inside the container by sourcing both ros iron and the workspace. I don't know why those are already sourced for nist_competitor but not for when I run my container.

jaybrecht commented 5 months ago

Couple of things. For the first issues does your launch file follow the steps listed here? The environment launch should be included in your launch file.

For the second issue the run_trial.sh script adds the ROS and workspace source commands in order for everything to run properly. If you open a terminal to the container you will need to add the source commands before launching anything.

dan9thsense commented 5 months ago

Ah, missed that launch file setup step. Thanks for the fast response!