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

ros2-ified #136

Draft
wants to merge 7 commits into
base: rolling-devel
Choose a base branch
from
Draft

Conversation

130s
Copy link

@130s 130s commented Jun 7, 2023

Issue

CoS

  • ROS2-fied packaging and building rsc (package.xml, CMakeLists.txt)
  • ROS2-fied execution rsc (launch)
  • Dev-test by authors.
    Confirmed on RViz2 planning and execution went as expected.
    ros2 launch panda_moveit_config demo.launch.py
    
  • Dev-test by others.

Impl approach

  • Ended up re-running MSA (2.5.4, Humble) against moveit_resources_panda_description installed from deb, then merge the generated files into this repo.
  • Files generated back in ros1 era are set aside in ros1 folder, for easier access in case of need. IINM, this package is used widely for MoveIt tutorial so such a special setup might be hopefully acceptable.

@130s 130s changed the title WIP: ros2-ified Draft: ros2-ified Jun 7, 2023
@130s 130s marked this pull request as draft June 7, 2023 09:43
@130s 130s mentioned this pull request Jun 7, 2023
@130s 130s force-pushed the feature-ros2-offof-rollingdevel branch from eb41a1e to 541538d Compare June 7, 2023 09:59
@130s
Copy link
Author

130s commented Jun 7, 2023

Hmm. Reading the existing local panda_moveit_config repo (I see .setup_assistant present) fails.
root@130s-p16s:/cws/src/ros-planning/panda_moveit_config# ros2 launch moveit_setup_assistant setup_assistant.launch.py
[INFO] [launch]: All log files can be found below /root/.ros/log/2023-06-07-06-01-05-733463-130s-p16s-10140
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [moveit_setup_assistant-1]: process started with pid [10141]
[moveit_setup_assistant-1] QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
[moveit_setup_assistant-1] terminate called after throwing an instance of 'ament_index_cpp::PackageNotFoundError'
[moveit_setup_assistant-1]   what():  package 'franka_description' not found, searching: [/opt/ros/humble]
[moveit_setup_assistant-1] Stack trace (most recent call last):
[moveit_setup_assistant-1] #31   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f34248b6363, in QApplication::notify(QObject*, QEvent*)
[moveit_setup_assistant-1] #30   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f34248ae712, in QApplicationPrivate::notify_helper(QObject*, QEvent*)
[moveit_setup_assistant-1] #29   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f34248f14ed, in QWidget::event(QEvent*)
[moveit_setup_assistant-1] #28   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f34249a61e6, in QAbstractButton::mouseReleaseEvent(QMouseEvent*)
[moveit_setup_assistant-1] #27   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f34249a5fc3, in 
[moveit_setup_assistant-1] #26   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f34249a439d, in 
[moveit_setup_assistant-1] #25   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f34249a4115, in QAbstractButton::clicked(bool)
[moveit_setup_assistant-1] #24   Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.3", at 0x7f3423df67c7, in 
[moveit_setup_assistant-1] #23   Source "./src/helper_widgets.cpp", line 171, in btnFileDialog [0x7f34251f55cf]
[moveit_setup_assistant-1] #22   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f3424a04a91, in QWidgetLineControl::internalSetText(QString const&, int, bool)
[moveit_setup_assistant-1] #21   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f3424a047ce, in QWidgetLineControl::finishChange(int, bool, bool)
[moveit_setup_assistant-1] #20   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f3424a010f8, in QWidgetLineControl::textChanged(QString const&)
[moveit_setup_assistant-1] #19   Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.3", at 0x7f3423df67c7, in 
[moveit_setup_assistant-1] #18   Object "/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.15.3", at 0x7f34249f9845, in QLineEdit::textChanged(QString const&)
[moveit_setup_assistant-1] #17   Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.3", at 0x7f3423df67c7, in 
[moveit_setup_assistant-1] #16   Source "./.obj-x86_64-linux-gnu/include/moveit_setup_framework/qt/moc_helper_widgets.cpp", line 222, in pathChanged [0x7f342521dbd5]
[moveit_setup_assistant-1] #15   Object "/usr/lib/x86_64-linux-gnu/libQt5Core.so.5.15.3", at 0x7f3423df67c7, in 
[moveit_setup_assistant-1] #14   Source "./src/start_screen_widget.cpp", line 300, in onPackagePathChanged [0x7f3416007939]
[moveit_setup_assistant-1] #13   Source "./src/start_screen_widget.cpp", line 319, in loadPackageSettings [0x7f3416007863]
[moveit_setup_assistant-1] #12   Source "./src/start_screen.cpp", line 73, in loadExisting [0x7f341600733b]
[moveit_setup_assistant-1] #11   Source "./src/package_settings_config.cpp", line 149, in loadExisting [0x7f34252058e2]
[moveit_setup_assistant-1] #10   Source "./src/urdf_config.cpp", line 60, in loadPrevious [0x7f34251fdbbb]
[moveit_setup_assistant-1] #9  | Source "./src/urdf_config.cpp", line 123, in getSharePath
[moveit_setup_assistant-1]       Source "./include/moveit_setup_framework/utilities.hpp", line 52, in loadFromPackage [0x7f34251fcffd]
[moveit_setup_assistant-1] #8    Object "/opt/ros/humble/lib/libament_index_cpp.so", at 0x7f3423affe32, in ament_index_cpp::get_package_share_directory(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
[moveit_setup_assistant-1] #7    Object "/opt/ros/humble/lib/libament_index_cpp.so", at 0x7f3423afdb16, in 
[moveit_setup_assistant-1] #6    Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30", at 0x7f3423925517, in __cxa_throw
[moveit_setup_assistant-1] #5    Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30", at 0x7f34239252b6, in std::terminate()
[moveit_setup_assistant-1] #4    Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30", at 0x7f342392524b, in 
[moveit_setup_assistant-1] #3    Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30", at 0x7f3423919bbd, in 
[moveit_setup_assistant-1] #2    Object "/usr/lib/x86_64-linux-gnu/libc.so.6", at 0x7f34236557f2, in abort
[moveit_setup_assistant-1] #1    Object "/usr/lib/x86_64-linux-gnu/libc.so.6", at 0x7f342366f475, in raise
[moveit_setup_assistant-1] #0    Object "/usr/lib/x86_64-linux-gnu/libc.so.6", at 0x7f34236c3a7c, in pthread_kill
[moveit_setup_assistant-1] Aborted (Signal sent by tkill() 10141 0)
[ERROR] [moveit_setup_assistant-1]: process has died [pid 10141, exit code -6, cmd '/opt/ros/humble/lib/moveit_setup_assistant/moveit_setup_assistant --ros-args'].

I'm doing this in Docker container via rocker so that GUI can be opened. Hope that doesn't matter.

package 'franka_description' not found

??

Adding franka_description frankaemika/franka_ros#344 and retried. Got:

# export PATH_INSTALL_BASE=/opt/ros/$ROS_DISTRO && source $PATH_INSTALL_BASE/setup.bash && colcon build --parallel-workers 2 --packages-select franka_description panda_moveit_config
[0.326s] WARNING:colcon.colcon_core.package_augmentation.check_dependency_constraint:panda_moveit_config depends on franka_description which has version 0.0.0 but expects it to be greater than or equal to 0.10.0
Starting >>> franka_description
Finished <<< franka_description [0.74s]                  
Starting >>> panda_moveit_config
Finished <<< panda_moveit_config [0.50s]                  

Summary: 2 packages finished [1.40s]

root@130s-p16s:/cws# source install/setup.bash 
root@130s-p16s:/cws# ros2 launch moveit_setup_assistant setup_assistant.launch.py
[INFO] [launch]: All log files can be found below /root/.ros/log/2023-06-07-06-20-49-028319-130s-p16s-703
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [moveit_setup_assistant-1]: process started with pid [704]
[moveit_setup_assistant-1] QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
[moveit_setup_assistant-1] [ERROR] [1686133261.047474865] [moveit_rdf_loader.rdf_loader]: File does not exist
[moveit_setup_assistant-1] [ERROR] [1686133263.965740426] [moveit_rdf_loader.rdf_loader]: File does not exist
:

URDF/COLLADA file not found: /cws/install/franka_description/share/franka_description/robots/panda/panda.urdf.xacro

UPDATE: I ended up running MSA 2.5.4 against franka_description from franka_ros2 frankaemika/franka_ros#344 to work these around.

@130s
Copy link
Author

130s commented Jun 7, 2023

Runtime error while verifying demo.launch.py
# ros2 launch panda_moveit_config demo.launch.py
[INFO] [launch]: All log files can be found below /root/.ros/log/2023-06-07-11-57-12-903618-130s-p16s-1174
[INFO] [launch]: Default logging verbosity is set to INFO
Using load_yaml() directly is deprecated. Use xacro.load_yaml() instead.
WARNING:root:cartesian_limits.yaml is deprecated, please rename to pilz_cartesian_limits.yaml
[ERROR] [launch]: Caught exception in launch (see debug for traceback): Failed to handle type {'class': 'stomp_moveit/NormalDistributionSampling', 'stddev': [0.05, 0.8, 1.0, 0.8, 0.4, 0.4, 0.4]}

UPDATE: Resolved by stashing away the files generated in ros1 era.

@130s 130s marked this pull request as ready for review June 7, 2023 16:42
@130s 130s changed the title Draft: ros2-ified ros2-ified Jun 7, 2023
@130s 130s requested a review from rhaschke June 7, 2023 16:42
@130s 130s force-pushed the feature-ros2-offof-rollingdevel branch from a496a64 to 838613a Compare June 7, 2023 17:43
130s added a commit to 130s/moveit2_tutorials that referenced this pull request Jun 9, 2023
130s added a commit to 130s/moveit2_tutorials that referenced this pull request Jun 9, 2023
Copy link
Contributor

@rhaschke rhaschke left a comment

Choose a reason for hiding this comment

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

Please stick to franka_description for the URDF! Only this one has the coarse collision models, which are also considered by the real robot's controller.

CMakeLists.txt Outdated Show resolved Hide resolved
config/panda.srdf Show resolved Hide resolved
<xacro:arg name="initial_positions_file" default="initial_positions.yaml" />

<!-- Import panda urdf file -->
<xacro:include filename="$(find moveit_resources_panda_description)/urdf/panda.urdf" />
Copy link
Contributor

Choose a reason for hiding this comment

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

panda_moveit_config should rely on franka_description, not on moveit_resources_panda_description.

Copy link
Author

Choose a reason for hiding this comment

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

Pending decision in moveit/moveit2_tutorials#704

Comment on lines -3 to -5
package: franka_description
relative_path: robots/panda/panda.urdf.xacro
xacro_args: hand:=true
Copy link
Contributor

Choose a reason for hiding this comment

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

panda_moveit_config should rely on franka_description, not on moveit_resources_panda_description.

Copy link
Author

Choose a reason for hiding this comment

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

Makes sense especially having seen your comment moveit/moveit2_tutorials#61 (comment), which tells me the switch from panda_moveit_config to moveit_resources_panda_moveit_config in moveit2_tutorial might be unlikely a widely agreed move. Then, the entire PR will have to be re-done because the PR at the time of writing is made referencing to the model files in moveit_resources_panda_description package. Made the PR back to draft state.

<name>panda_moveit_config</name>
<version>0.8.1</version>
<version>0.3.0</version>
Copy link
Contributor

Choose a reason for hiding this comment

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

I suggest switching to version 2.x

Copy link
Author

Choose a reason for hiding this comment

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

Why not 1.x, when the current version is 0.x?

I admit I do not remember why I was downgrading to 0.3.

package.xml Outdated Show resolved Hide resolved
@130s 130s marked this pull request as draft June 14, 2023 15:57
@130s 130s force-pushed the feature-ros2-offof-rollingdevel branch from 8980ecd to f7efe7f Compare June 14, 2023 16:49
Copy link
Author

@130s 130s left a comment

Choose a reason for hiding this comment

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

This PR should still remain as draft before moveit/moveit2_tutorials#704 is closed. I updated other irrelevant review feedbacks.

<xacro:arg name="initial_positions_file" default="initial_positions.yaml" />

<!-- Import panda urdf file -->
<xacro:include filename="$(find moveit_resources_panda_description)/urdf/panda.urdf" />
Copy link
Author

Choose a reason for hiding this comment

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

Pending decision in moveit/moveit2_tutorials#704

<name>panda_moveit_config</name>
<version>0.8.1</version>
<version>0.3.0</version>
Copy link
Author

Choose a reason for hiding this comment

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

Why not 1.x, when the current version is 0.x?

I admit I do not remember why I was downgrading to 0.3.

CMakeLists.txt Outdated Show resolved Hide resolved
@130s 130s force-pushed the feature-ros2-offof-rollingdevel branch from f7efe7f to 17561bf Compare September 27, 2023 15:56
@rhaschke
Copy link
Contributor

Dear Isaac,
I want to emphasize again that a panda_moveit_config should not rely on the URDF from moveit_resources, because that's terribly outdated and only used for internal MoveIt testing.
Looking for ros2 packages from Franka, I found that they already provide a ros2 MoveIt config, called franka_moveit_config: https://support.franka.de/docs/franka_ros2.html#moveit
However, they haven't yet released anything.

@130s
Copy link
Author

130s commented Sep 28, 2023

@rhaschke Sorry, (aside from the decision moveit/moveit2_tutorials#704 (comment)) I fully agree to keep this package away from moveit_resource. The push I made yesterday was just a sync, didn't mean to request re-review. I'll update this PR accordingly.

@rhaschke
Copy link
Contributor

Aside from the franka_description stuff, I primarily wanted to point out that there is already a moveit_config package.
Maybe you can just use that or at least derive from it. (Unfortunately, they renamed the package.)

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.

None yet

2 participants