Code Monkey home page Code Monkey logo

panda_ign_moveit2's Introduction

panda_ign_moveit2

Software packages for Franka Emika Panda that enable manipulation with MoveIt 2 inside Ignition Gazebo. For control, gz_ros2_control is used.

Animation of ex_follow_target

Overview

This branch targets ROS 2 galactic and Gazebo fortress.

Below is an overview of the included packages, with a short description of their purpose. For more information, please see README.md of each individual package.

Instructions

Dependencies

These are the primary dependencies required to use this project.

All additional dependencies are either pulled via vcstool (panda_ign_moveit2.repos) or installed via rosdep during the building process below.

Building

Clone this repository, import dependencies, install dependencies and build with colcon.

# Clone this repository into your favourite ROS 2 workspace
git clone https://github.com/AndrejOrsula/panda_ign_moveit2.git
# Import dependencies
vcs import < panda_ign_moveit2/panda_ign_moveit2.repos
# Install dependencies
IGNITION_VERSION=fortress rosdep install -y -r -i --rosdistro ${ROS_DISTRO} --from-paths .
# Build
colcon build --merge-install --symlink-install --cmake-args "-DCMAKE_BUILD_TYPE=Release"

Sourcing

Before utilising this package, remember to source the ROS 2 workspace.

source install/local_setup.bash

This enables:

  • Execution of binaries, scripts and examples via ros2 run panda_* <executable>
  • Launching of setup scripts via ros2 launch panda_* <launch_script>
  • Discoverability of shared resources

panda_ign_moveit2's People

Contributors

amalnanavati avatar andrejorsula avatar pre-commit-ci[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

panda_ign_moveit2's Issues

Segmentation fault on launch

Running ros2 launch panda gz.launch.py gives me a segmentation fault. ros2 launch panda fake.launch.py seems to be fine.

I am using ros2 humble, and have set the branch to humble for both panda_ign_moveit2 and gz_ros2_control.

[move_group-6] Segmentation fault (Address not mapped to object [0x7f3ff0c41798])
[INFO] [servo_node_main-7]: process has finished cleanly [pid 10967]
[rviz2-8] [ERROR] [1710588622.962160435] [moveit_ros_visualization.planning_scene_display]: Exception caught executing main loop job: could not create subscription: rcl node's context is invalid, at ./src/rcl/node.c:428
[rviz2-8] [ERROR] [1710588622.962554158] [moveit_background_processing.background_processing]: Exception caught while processing action 'requestPlanningSceneState': could not create client: rcl node's context is invalid, at ./src/rcl/node.c:428
[ERROR] [move_group-6]: process has died [pid 10965, exit code -11, cmd '/opt/ros/humble/lib/moveit_ros_move_group/move_group --ros-args --log-level warn --ros-args --params-file /tmp/launch_params_j5ookczo --params-file /tmp/launch_params_vncpg7pq --params-file /tmp/launch_params_w26pfxyq --params-file /tmp/launch_params_nyluvvk5 --params-file /tmp/launch_params_20caj3fz --params-file /tmp/launch_params_ocahdfw0 --params-file /tmp/launch_params_n3abuk4q --params-file /tmp/launch_params_hl7dkphi --params-file /tmp/launch_params_69ttv7vt'].
[ERROR] [rviz2-8]: process has died [pid 10970, exit code -11, cmd '/opt/ros/humble/lib/rviz2/rviz2 --display-config /home/jiahao/Desktop/franka_sim/install/panda_moveit_config/share/panda_moveit_config/rviz/moveit.rviz --ros-args --log-level warn --ros-args --params-file /tmp/launch_params_nn4zo39b --params-file /tmp/launch_params_l61g9m4y --params-file /tmp/launch_params_gamaysin --params-file /tmp/launch_params_way5077z --params-file /tmp/launch_params_qdsa_40k --params-file /tmp/launch_params_5pcpj5m1'].

Error [parser.cc:701] Error finding file [panda] | Error Code 1: Msg: Unable to read file:panda

Hi,

While launching ignition, simulator can't load the panda robot model.

ros2 launch panda_description view_ign.launch.py

Output:

[ign gazebo-1] Error [parser.cc:701] Error finding file [panda].
[ign gazebo-1] [Err] [UserCommands.cc:998] Error Code 1: Msg: Unable to read file:panda
...
[rviz2-5] [ERROR] [1643904244.369392818] [moveit_ros_visualization.motion_planning_frame]: Action server: /recognize_objects not available
...
[move_group-3] [ERROR] [1643904255.757169280] [moveit.simple_controller_manager.follow_joint_trajectory_controller_handle]: Action client not connected: joint_trajectory_controller/follow_joint_trajectory
[move_group-3] [ERROR] [1643904270.774255338] [moveit.simple_controller_manager.follow_joint_trajectory_controller_handle]: Action client not connected: gripper_trajectory_controller/follow_joint_trajectory

Is there anything else that I need to configure?

panda flops to ground when trying ex_ign_control.launch.py

Hi @AndrejOrsula ,

I am trying out the new ign_moveit2_examples based on ign_ros2_control and have it working partially. The follow example works to a large extent but the throw example simply moves the arm without picking the object. In the latter case, I noticed the panda arm flops to ground initially and then starts the swing action from there without moving to grip the object first. To isolate the problem, I thought I'll try the example launch file included with panda_moveit_config independently and observed the panda arm flops here as well. Panda in gazebo does respond to plan and execute actions from Rviz though and the fake_controller examples works fine too.

I am not sure if the behaviour I am observing is to be expected. The controller nodes are running and active and I thought this should hold the arm in position based on the robot description. Appreciate any pointers for troubleshooting.

My environment is ROS 2 galactic with Ignition Edifice and MoveIt 2 (binary installs). Rest of dependencies are built from source as per your instructions.

Launch example used:

ros2 launch panda_moveit_config ex_ign_control.launch.py

ros2 node list

/controller_manager
/gripper_trajectory_controller
/ignition_ros_control
/interactive_marker_display_94654427760256
/joint_state_broadcaster
/joint_trajectory_controller
/move_group
/move_group_interface_node
/move_group_private_93902434562128
/moveit_simple_controller_manager
/robot_state_publisher
/ros_ign_bridge
/rviz
/rviz_private_139885273182464
/servo_node
/transform_listener_impl_55675d4475b0
/transform_listener_impl_561672ea10b0
/transform_listener_impl_5616737ce9c0
/transform_listener_impl_7f3994049890

ros2 control list_controllers

joint_state_broadcaster[joint_state_broadcaster/JointStateBroadcaster] active    
joint_trajectory_controller[joint_trajectory_controller/JointTrajectoryController] active    
gripper_trajectory_controller[joint_trajectory_controller/JointTrajectoryController] active

Observed the below warning/error snippets in log. Not sure if these are related.

[servo_node_main-4] [WARN] [1641621321.469220564] [moveit_servo.servo_node]: Intra-process communication is disabled, consider enabling it by adding: 
[servo_node_main-4] extra_arguments=[{'use_intra_process_comms' : True}]
[servo_node_main-4] to the Servo composable node in the launch file

[move_group-3] [WARN] [1641621321.544445816] [moveit.ros.occupancy_map_monitor.middleware_handle]: Resolution not specified for Octomap. Assuming resolution = 0.1 instead

[ign gazebo-1] Warning [GenericJoint.hpp:1480] [GenericJoint::setRestPosition] Value of _q0 [0], is out of the limit range [-3.07178, -0.0698132] for index [0] of Joint [Joint].
[ign gazebo-1] [INFO] [1641621323.299285190] [controller_manager]: Loading controller 'joint_trajectory_controller'
[ign gazebo-1] [Wrn] [Component.hh:144] Trying to serialize component with data type [N3sdf3v115ModelE], which doesn't have `operator<<`. Component will not be serialized.
[ign gazebo-1] [Wrn] [Component.hh:144] Trying to serialize component with data type [N3sdf3v115WorldE], which doesn't have `operator<<`. Component will not be serialized.
[ign gazebo-1] [WARN] [1641621323.311442987] [ignition_ros_control]:  Desired controller update period (0.004 s) is slower than the gazebo simulation period (0.001 s).

[rviz2-5] [ERROR] [1641621325.382359723] [moveit_ros_visualization.motion_planning_frame]: Action server: /recognize_objects not available

Use custom joint configuration when spawning robot inside Ignition Gazebo

In the default joint configuration that the robot is spawned in ([0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]), the robot has one of the joints outside of its position limits and there is a self-collision of hand with one of the lower links.

I do not know any good way to spawn model into Ignition Gazebo with a specific non-default configuration. It can be done programatically though (via joint position reset).

For now, I increased the MoveIt 2 joint position tolerances and disabled collision geometry for arm in the examples.

SDF - Remove fixed joint "panda_joint_world" to allow arbitrary joints with panda's base in world SDF scope

Currently, panda is fixated to world within its SDF.

<!-- Fix To World -->
<joint name="panda_joint_world" type="fixed">
    <parent>world</parent>
    <child>panda_link0</child>
</joint>

It is possible to move this fixed joint outside of panda SDF scope if included as submodel, e.g.:

<model name="panda">
    <joint name="panda_joint_world" type="fixed">
        <parent>world</parent>
        <child>panda::panda_link0</child>
    </joint>

    <include>
        <uri>model://panda</uri>
    </include>
</model>

However, this approach renames all links/joints to their scoped alternatives, e.g. panda::panda_link3, which becomes problematic when involving plugins such as JointStatePublisher and using them outside Ignition (e.g. MoveIt2). For this reason, panda.sdf currently requires this fixed joint.


I am not sure how to resolve this without making modifications to the plugins. The obvious and simple workaround is to edit the joint directly in panda.sdf, which might however require a new panda.sdf for each world...

  • Investigate the problem and try to find a solution

Tune PID gains

PID gains require more tuning (for effort command interface). I find that moveit_servo serves as a good verification method to determine how good the gains are.

Servo node

Hi,

Thanks for the awesome repository.

I'm wondering how can I easily use servo_node, I've initialized it, and I'm recieving commands on:

joint_trajectory_controller/joint_trajectory

However, arm remains stationary.

Arm moves when I publish on follow joint trajectory action, however it remains stationary when publishing
servo commands.

Thank you for your help!

Using load_yaml() directly is deprecated.

<xacro:property name="initial_positions" value="${load_yaml(initial_positions_file)['initial_joint_positions']['panda_arm']}"/>

I think it should be change to:

<xacro:property name="initial_positions" value="${xacro.load_yaml(initial_positions_file)['initial_joint_positions']['panda_arm']}"/>

because of warnings:
Using load_yaml() directly is deprecated. Use xacro.load_yaml() instead.

Gazebo closes on launch

Hi there

This repo is exactly what I have been looking for. I want to combine Panda +Gazebo+ Moveit2.

My system config: ROS Galactic, IGN Fortress, Moveit2 Galactic apt package, ros_ign (built from source), ign_ros2_control (built from source)

I installed all the dependencies as stated in the README and launched this launchfile:

ros2 launch panda_moveit_config ex_ign_control.launch.py

This is the output of the terminal:

Toggle to view log

[INFO] [launch]: All log files can be found below /home/marc/.ros/log/2022-05-25-12-41-19-082269-omen-1015818
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [ign gazebo-1]: process started with pid [1015827]
[INFO] [robot_state_publisher-2]: process started with pid [1015830]
[INFO] [move_group-3]: process started with pid [1015832]
[ERROR] [move_group-3]: process has died [pid 1015832, exit code 127, cmd '/opt/ros/galactic/lib/moveit_ros_move_group/move_group --ros-args --log-level warn --ros-args --params-file /tmp/launch_params_nrp5gm69 --params-file /tmp/launch_params_3wd103bv --params-file /tmp/launch_params_lca_jz08 --params-file /tmp/launch_params_l_omi378 --params-file /tmp/launch_params_59vlyy50 --params-file /tmp/launch_params_3iblccsp --params-file /tmp/launch_params_1t_frqlc --params-file /tmp/launch_params__5alfoy3 --params-file /tmp/launch_params__yzmba8m'].
[INFO] [servo_node_main-4]: process started with pid [1015834]
[ERROR] [servo_node_main-4]: process has died [pid 1015834, exit code 127, cmd '/opt/ros/galactic/lib/moveit_servo/servo_node_main --ros-args --log-level warn --ros-args --params-file /tmp/launch_params_o275vo01 --params-file /tmp/launch_params_yvv378a1 --params-file /tmp/launch_params_m3h1zuy7 --params-file /tmp/launch_params_8e_eqqqy --params-file /tmp/launch_params_nff9bw0c --params-file /tmp/launch_params_uo48ou6n --params-file /tmp/launch_params_3wwpcui0 --params-file /tmp/launch_params_12qt7yle --params-file /tmp/launch_params_t832hzs2'].
[INFO] [rviz2-5]: process started with pid [1015836]
[INFO] [spawner-6]: process started with pid [1015838]
[INFO] [spawner-7]: process started with pid [1015840]
[INFO] [spawner-8]: process started with pid [1015842]
[INFO] [create-9]: process started with pid [1015844]
[INFO] [parameter_bridge-10]: process started with pid [1015846]
[move_group-3] /opt/ros/galactic/lib/moveit_ros_move_group/move_group: error while loading shared libraries: libbackward.so: cannot open shared object file: No such file or directory
[servo_node_main-4] /opt/ros/galactic/lib/moveit_servo/servo_node_main: error while loading shared libraries: libbackward.so: cannot open shared object file: No such file or directory
[robot_state_publisher-2] Link panda_link0 had 1 children
[robot_state_publisher-2] Link panda_link1 had 1 children
[robot_state_publisher-2] Link panda_link2 had 1 children
[robot_state_publisher-2] Link panda_link3 had 1 children
[robot_state_publisher-2] Link panda_link4 had 1 children
[robot_state_publisher-2] Link panda_link5 had 1 children
[robot_state_publisher-2] Link panda_link6 had 1 children
[robot_state_publisher-2] Link panda_link7 had 1 children
[robot_state_publisher-2] Link panda_link8 had 1 children
[robot_state_publisher-2] Link panda_hand had 3 children
[robot_state_publisher-2] Link panda_leftfinger had 0 children
[robot_state_publisher-2] Link panda_rightfinger had 0 children
[robot_state_publisher-2] Link panda_hand_tcp had 0 children
[INFO] [create-9]: process has finished cleanly [pid 1015844]
[ign gazebo-1] [GUI] [Wrn] [Application.cc:757] [QT] file::/Gazebo/GazeboDrawer.qml:147:3: QML Dialog: Binding loop detected for property "implicitHeight"
[ign gazebo-1] [GUI] [Wrn] [Application.cc:757] [QT] file::/Gazebo/GazeboDrawer.qml:147:3: QML Dialog: Binding loop detected for property "implicitHeight"
[rviz2-5] Warning: class_loader.impl: SEVERE WARNING!!! A namespace collision has occured with plugin factory for class rviz_default_plugins::displays::InteractiveMarkerDisplay. New factory will OVERWRITE existing one. This situation occurs when libraries containing plugins are directly linked against an executable (the one running right now generating this message). Please separate plugins out into their own library or just don't link against the library and use either class_loader::ClassLoader/MultiLibraryClassLoader to open.
[rviz2-5]          at line 253 in /opt/ros/galactic/include/class_loader/class_loader_core.hpp
[ign gazebo-1] [Msg] Ignition Gazebo GUI    v5.4.0
[ign gazebo-1] [GUI] [Msg] Loading config [/home/marc/.ignition/gazebo/gui.config]
[ign gazebo-1] [GUI] [Msg] Video recorder stats topic advertised on [/gui/record_video/stats]
[ign gazebo-1] [GUI] [Msg] Transform mode service on [/gui/transform_mode]
[ign gazebo-1] [GUI] [Msg] Record video service on [/gui/record_video]
[ign gazebo-1] [GUI] [Msg] Move to service on [/gui/move_to]
[ign gazebo-1] [GUI] [Msg] Follow service on [/gui/follow]
[ign gazebo-1] [GUI] [Msg] Follow offset service on [/gui/follow/offset]
[ign gazebo-1] [GUI] [Msg] View angle service on [/gui/view_angle]
[ign gazebo-1] [GUI] [Msg] Move to pose service on [/gui/move_to/pose]
[ign gazebo-1] [GUI] [Msg] Camera pose topic advertised on [/gui/camera/pose]
[ign gazebo-1] [GUI] [Msg] View collisions service on [/gui/view/collisions]
[ign gazebo-1] [GUI] [Msg] Added plugin [3D View] to main window
[ign gazebo-1] [GUI] [Msg] Loaded plugin [GzScene3D] from path [/usr/lib/x86_64-linux-gnu/ign-gazebo-5/plugins/gui/libGzScene3D.so]
[ign gazebo-1] [GUI] [Msg] Using world control service [/world/default/control]
[ign gazebo-1] [GUI] [Msg] Listening to stats on [/world/default/stats]
[ign gazebo-1] [GUI] [Msg] Added plugin [World control] to main window
[ign gazebo-1] [GUI] [Msg] Loaded plugin [WorldControl] from path [/usr/lib/x86_64-linux-gnu/ign-gui-5/plugins/libWorldControl.so]
[ign gazebo-1] [GUI] [Msg] Listening to stats on [/world/default/stats]
[ign gazebo-1] [GUI] [Msg] Added plugin [World stats] to main window
[ign gazebo-1] [GUI] [Msg] Loaded plugin [WorldStats] from path [/usr/lib/x86_64-linux-gnu/ign-gui-5/plugins/libWorldStats.so]
[ign gazebo-1] [GUI] [Msg] Added plugin [Shapes] to main window
[ign gazebo-1] [GUI] [Msg] Loaded plugin [Shapes] from path [/usr/lib/x86_64-linux-gnu/ign-gazebo-5/plugins/gui/libShapes.so]
[ign gazebo-1] [GUI] [Msg] Added plugin [Lights] to main window
[ign gazebo-1] [GUI] [Msg] Loaded plugin [Lights] from path [/usr/lib/x86_64-linux-gnu/ign-gazebo-5/plugins/gui/libLights.so]
[ign gazebo-1] [GUI] [Msg] Added plugin [Transform control] to main window
[ign gazebo-1] [GUI] [Msg] Loaded plugin [TransformControl] from path [/usr/lib/x86_64-linux-gnu/ign-gazebo-5/plugins/gui/libTransformControl.so]
[ign gazebo-1] [GUI] [Msg] Screenshot service on [/gui/screenshot]
[ign gazebo-1] [GUI] [Msg] Added plugin [Screenshot] to main window
[ign gazebo-1] [GUI] [Msg] Loaded plugin [Screenshot] fr[Msg] Ignition Gazebo Server v5.4.0
[ign gazebo-1] [Msg] Loading SDF world file[/usr/share/ignition/ignition-gazebo5/worlds/default.sdf].
[ign gazebo-1] [Msg] Loaded level [3]
[ign gazebo-1] [Msg] No systems loaded from SDF, loading defaults
[ign gazebo-1] [Msg] Create service on [/world/default/create]
[ign gazebo-1] [Msg] Remove service on [/world/default/remove]
[ign gazebo-1] [Msg] Pose service on [/world/default/set_pose]
[ign gazebo-1] [Msg] Pose service on [/world/default/set_pose_vector]
[ign gazebo-1] [Msg] Light configuration service on [/world/default/light_config]
[ign gazebo-1] [Msg] Physics service on [/world/default/set_physics]
[ign gazebo-1] [Msg] Enable collision service on [/world/default/enable_collision]
[ign gazebo-1] [Msg] Disable collision service on [/world/default/disable_collision]
[ign gazebo-1] [Msg] Material service on [/world/default/visual_config]
[ign gazebo-1] [Msg] Material service on [/world/default/wheel_slip]
[ign gazebo-1] [Msg] Serving world controls on [/world/default/control] and [/world/default/playback/control]
[ign gazebo-1] [Msg] Serving GUI information on [/world/default/gui/info]
[ign gazebo-1] [Msg] World [default] initialized with [1ms] physics profile.
[ign gazebo-1] [Msg] Serving world SDF generation service on [/world/default/generate_world_sdf]
[ign gazebo-1] [Msg] Serving world names on [/gazebo/worlds]
[ign gazebo-1] [Msg] Resource path add service on [/gazebo/resource_paths/add].
[ign gazebo-1] [Msg] Resource path get service on [/gazebo/resource_paths/get].
[ign gazebo-1] [Msg] Resource paths published on [/gazebo/resource_paths].
[ign gazebo-1] [Msg] Server control service on [/server_control].
[ign gazebo-1] [Msg] Found no publishers on /stats, adding root stats topic
[ign gazebo-1] [Msg] Found no publishers on /clock, adding root clock topic
[ign gazebo-1] Error [Converter.cc:156] Unable to convert from SDF version 1.9 to 1.8
[ign gazebo-1] [libprotobuf ERROR google/protobuf/descriptor_database.cc:58] File already exists in database: ignition/msgs/actor.proto
[ign gazebo-1] [libprotobuf FATAL google/protobuf/descriptor.cc:1358] CHECK failed: GeneratedDatabase()->Add(encoded_file_descriptor, size): 
[ign gazebo-1] terminate called after throwing an instance of 'google::protobuf::FatalException'
[ign gazebo-1]   what():  CHECK failed: GeneratedDatabase()->Add(encoded_file_descriptor, size): 
[ign gazebo-1] Stack trace (most recent call last):
[ign gazebo-1] #31   Object "/usr/lib/x86_64-linux-gnu/ign-gazebo-5/plugins/libignition-gazebo-user-commands-system.so", at 0x7f04f30457bd, in ignition::gazebo::v5::systems::CreateCommand::Execute()
[ign gazebo-1] #30   Object "/usr/lib/x86_64-linux-gnu/libignition-gazebo5.so.5", at 0x7f051becfc90, in ignition::gazebo::v5::SdfEntityCreator::CreateEntities(sdf::v11::Model const*)
[ign gazebo-1] #29   Object "/usr/lib/x86_64-linux-gnu/libignition-gazebo5.so.5", at 0x7f051bef9fb6, in void ignition::gazebo::v5::EventManager::Emit<ignition::common::EventT<void (unsigned long, std::shared_ptr<sdf::v11::Element>), ignition::gazebo::v5::events::LoadPluginsTag>, unsigned long const&, std::shared_ptr<sdf::v11::Element> const&>(unsigned long const&, std::shared_ptr<sdf::v11::Element> const&)
[ign gazebo-1] #28   Object "/usr/lib/x86_64-linux-gnu/libignition-gazebo5.so.5", at 0x7f051bf17b86, in ignition::gazebo::v5::SimulationRunner::LoadPlugins(unsigned long, std::shared_ptr<sdf::v11::Element> const&)
[ign gazebo-1] #27   Object "/usr/lib/x86_64-linux-gnu/libignition-gazebo5.so.5", at 0x7f051bf1750e, in ignition::gazebo::v5::SimulationRunner::LoadPlugin(unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::shared_ptr<sdf::v11::Element> const&)
[ign gazebo-1] #26   Object "/usr/lib/x86_64-linux-gnu/libignition-gazebo5.so.5", at 0x7f051bf29408, in ignition::gazebo::v5::SystemLoader::LoadPlugin(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::shared_ptr<sdf::v11::Element> const&)
[ign gazebo-1] #25   Object "/usr/lib/x86_64-linux-gnu/libignition-gazebo5.so.5", at 0x7f051bf29cb5, in 
[ign gazebo-1] #24   Object "/usr/lib/x86_64-linux-gnu/libignition-plugin1-loader.so.1", at 0x7f051ce1b670, in ignition::plugin::Loader::LoadLib(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
[ign gazebo-1] #23   Object "/usr/lib/x86_64-linux-gnu/libignition-plugin1-loader.so.1", at 0x7f051ce1aa7d, in ignition::plugin::Loader::Implementation::LoadLib(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
[ign gazebo-1] #22   Object "/lib/x86_64-linux-gnu/libdl.so.2", at 0x7f0520a9a3d9, in dlopen
[ign gazebo-1] #21   Object "/lib/x86_64-linux-gnu/libdl.so.2", at 0x7f0520a9ab58, in 
[ign gazebo-1] #20   Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7f0520cb09f2, in _dl_catch_error
[ign gazebo-1] #19   Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7f0520cb0927, in _dl_catch_exception
[ign gazebo-1] #18   Object "/lib/x86_64-linux-gnu/libdl.so.2", at 0x7f0520a9a34b, in 
[ign gazebo-1] #17   Object "/lib64/ld-linux-x86-64.so.2", at 0x7f05210f8609, in 
[ign gazebo-1] #16   Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7f0520cb0927, in _dl_catch_exception
[ign gazebo-1] #15   Object "/lib64/ld-linux-x86-64.so.2", at 0x7f05210f90ce, in 
[ign gazebo-1] #14   Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7f0520cb0984, in _dl_catch_exception
[ign gazebo-1] #13   Object "/lib64/ld-linux-x86-64.so.2", at 0x7f05210f4ca0, in 
[ign gazebo-1] #12   Object "/lib64/ld-linux-x86-64.so.2", at 0x7f05210f4b99, in 
[ign gazebo-1] #11   Object "/usr/lib/x86_64-linux-gnu/libignition-msgs8.so.8", at 0x7f04f183c658, in void std::call_once<void (&)()>(std::once_flag&, void (&)())
[ign gazebo-1] #10   Object "/lib/x86_64-linux-gnu/libpthread.so.0", at 0x7f0520b3e4de, in 
[ign gazebo-1] #9    Object "/usr/lib/x86_64-linux-gnu/libignition-msgs8.so.8", at 0x7f04f18372dd, in protobuf_ignition_2fmsgs_2factor_2eproto::AddDescriptorsImpl()
[ign gazebo-1] #8    Object "/usr/lib/x86_64-linux-gnu/libprotobuf.so.17", at 0x7f051b29787d, in 
[ign gazebo-1] #7    Object "/lib/x86_64-linux-gnu/libgcc_s.so.1", at 0x7f051cbef5a9, in _Unwind_Resume
[ign gazebo-1] #6    Object "/lib/x86_64-linux-gnu/libgcc_s.so.1", at 0x7f051cbeebee, in 
[ign gazebo-1] #5    Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x7f051cca2d20, in __gxx_personality_v0
[ign gazebo-1] #4    Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x7f051cca2368, in 
[ign gazebo-1] #3    Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x7f051cca338b, in 
[ign gazebo-1] #2    Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x7f051cc97910, in 
[ign gazebo-1] #1    Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7f0520b72858, in abort
[ign gazebo-1] #0    Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7f0520b9300b, in gsignal
[ign gazebo-1] Aborted (Signal sent by tkill() 1015922 1000)
[ign gazebo-1] [GUI] [Wrn] [Application.cc:757] [QT] file::/Gazebo/GazeboDrawer.qml:147:3: QML Dialog: Binding loop detected for property "implicitHeight"
[ign gazebo-1] om path [/usr/lib/x86_64-linux-gnu/ign-gui-5/plugins/libScreenshot.so]
[ign gazebo-1] [GUI] [Msg] Added plugin [Component inspector] to main window
[ign gazebo-1] [GUI] [Msg] Loaded plugin [ComponentInspector] from path [/usr/lib/x86_64-linux-gnu/ign-gazebo-5/plugins/gui/libComponentInspector.so]
[ign gazebo-1] [GUI] [Msg] Added plugin [Entity tree] to main window
[ign gazebo-1] [GUI] [Msg] Loaded plugin [EntityTree] from path [/usr/lib/x86_64-linux-gnu/ign-gazebo-5/plugins/gui/libEntityTree.so]
[ign gazebo-1] [GUI] [Msg] Using server control service [/server_control]
[ign gazebo-1] [GUI] [Msg] Loading plugin [ignition-rendering-ogre2]
[ign gazebo-1] [GUI] [Msg] Loading plugin [ignition-rendering-ogre2]
[INFO] [ign gazebo-1]: process has finished cleanly [pid 1015827]
[rviz2-5] [ERROR] [1653475284.280795560] [moveit_ros_visualization.motion_planning_frame]: Action server: /recognize_objects not available
[rviz2-5] [WARN] [1653475284.390706923] [moveit_robot_model.robot_model]: Link panda_link0 has visual geometry but no collision geometry. Collision geometry will be left empty. Fix your URDF file by explicitly specifying collision geometry.
[rviz2-5] [WARN] [1653475284.390766756] [moveit_robot_model.robot_model]: Link panda_link1 has visual geometry but no collision geometry. Collision geometry will be left empty. Fix your URDF file by explicitly specifying collision geometry.
[rviz2-5] [WARN] [1653475284.390776135] [moveit_robot_model.robot_model]: Link panda_link2 has visual geometry but no collision geometry. Collision geometry will be left empty. Fix your URDF file by explicitly specifying collision geometry.
[rviz2-5] [WARN] [1653475284.390782438] [moveit_robot_model.robot_model]: Link panda_link3 has visual geometry but no collision geometry. Collision geometry will be left empty. Fix your URDF file by explicitly specifying collision geometry.
[rviz2-5] [WARN] [1653475284.390788563] [moveit_robot_model.robot_model]: Link panda_link4 has visual geometry but no collision geometry. Collision geometry will be left empty. Fix your URDF file by explicitly specifying collision geometry.
[rviz2-5] [WARN] [1653475284.390793805] [moveit_robot_model.robot_model]: Link panda_link5 has visual geometry but no collision geometry. Collision geometry will be left empty. Fix your URDF file by explicitly specifying collision geometry.
[rviz2-5] [WARN] [1653475284.390799005] [moveit_robot_model.robot_model]: Link panda_link6 has visual geometry but no collision geometry. Collision geometry will be left empty. Fix your URDF file by explicitly specifying collision geometry.
[rviz2-5] [WARN] [1653475284.390804576] [moveit_robot_model.robot_model]: Link panda_link7 has visual geometry but no collision geometry. Collision geometry will be left empty. Fix your URDF file by explicitly specifying collision geometry.
[rviz2-5] Link panda_link0 had 1 children
[rviz2-5] Link panda_link1 had 1 children
[rviz2-5] Link panda_link2 had 1 children
[rviz2-5] Link panda_link3 had 1 children
[rviz2-5] Link panda_link4 had 1 children
[rviz2-5] Link panda_link5 had 1 children
[rviz2-5] Link panda_link6 had 1 children
[rviz2-5] Link panda_link7 had 1 children
[rviz2-5] Link panda_link8 had 1 children
[rviz2-5] Link panda_hand had 3 children
[rviz2-5] Link panda_leftfinger had 0 children
[rviz2-5] Link panda_rightfinger had 0 children
[rviz2-5] Link panda_hand_tcp had 0 children
[rviz2-5] Link panda_link0 had 1 children
[rviz2-5] Link panda_link1 had 1 children
[rviz2-5] Link panda_link2 had 1 children
[rviz2-5] Link panda_link3 had 1 children
[rviz2-5] Link panda_link4 had 1 children
[rviz2-5] Link panda_link5 had 1 children
[rviz2-5] Link panda_link6 had 1 children
[rviz2-5] Link panda_link7 had 1 children
[rviz2-5] Link panda_link8 had 1 children
[rviz2-5] Link panda_hand had 3 children
[rviz2-5] Link panda_leftfinger had 0 children
[rviz2-5] Link panda_rightfinger had 0 children
[rviz2-5] Link panda_hand_tcp had 0 children

There is one Error line:

[ign gazebo-1] Error [Converter.cc:156] Unable to convert from SDF version 1.9 to 1.8

I tried to change the version from 1.9 to 1.8 manually in the /panda_ign_moveit2/panda_description/panda/model.sdf file. However, the behavior was the same. RViz + Gazebo launched and gazebo closed after 1 second.

This is the terminal log:

Toggle to view log
[INFO] [launch]: All log files can be found below /home/marc/.ros/log/2022-05-25-12-53-43-541493-omen-1078025
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [ign gazebo-1]: process started with pid [1078034]
[INFO] [robot_state_publisher-2]: process started with pid [1078037]
[INFO] [move_group-3]: process started with pid [1078039]
[ERROR] [move_group-3]: process has died [pid 1078039, exit code 127, cmd '/opt/ros/galactic/lib/moveit_ros_move_group/move_group --ros-args --log-level warn --ros-args --params-file /tmp/launch_params__veyfnxu --params-file /tmp/launch_params_6oq9tnw5 --params-file /tmp/launch_params_3cu2s9pk --params-file /tmp/launch_params_hsh1n8ly --params-file /tmp/launch_params_izpgit2e --params-file /tmp/launch_params_di5u21j4 --params-file /tmp/launch_params_eo71kk20 --params-file /tmp/launch_params_4133t0wo --params-file /tmp/launch_params_e6u7wr6c'].
[INFO] [servo_node_main-4]: process started with pid [1078041]
[ERROR] [servo_node_main-4]: process has died [pid 1078041, exit code 127, cmd '/opt/ros/galactic/lib/moveit_servo/servo_node_main --ros-args --log-level warn --ros-args --params-file /tmp/launch_params_qghjycda --params-file /tmp/launch_params_i80apx0o --params-file /tmp/launch_params_rff6wgd9 --params-file /tmp/launch_params_i7_e5bqk --params-file /tmp/launch_params_8sniqas0 --params-file /tmp/launch_params_4kollyng --params-file /tmp/launch_params_m_e8geke --params-file /tmp/launch_params_librlopa --params-file /tmp/launch_params_9imskzq9'].
[INFO] [rviz2-5]: process started with pid [1078043]
[INFO] [spawner-6]: process started with pid [1078045]
[INFO] [spawner-7]: process started with pid [1078047]
[INFO] [spawner-8]: process started with pid [1078049]
[INFO] [create-9]: process started with pid [1078051]
[INFO] [parameter_bridge-10]: process started with pid [1078054]
[move_group-3] /opt/ros/galactic/lib/moveit_ros_move_group/move_group: error while loading shared libraries: libbackward.so: cannot open shared object file: No such file or directory
[servo_node_main-4] /opt/ros/galactic/lib/moveit_servo/servo_node_main: error while loading shared libraries: libbackward.so: cannot open shared object file: No such file or directory
[robot_state_publisher-2] Link panda_link0 had 1 children
[robot_state_publisher-2] Link panda_link1 had 1 children
[robot_state_publisher-2] Link panda_link2 had 1 children
[robot_state_publisher-2] Link panda_link3 had 1 children
[robot_state_publisher-2] Link panda_link4 had 1 children
[robot_state_publisher-2] Link panda_link5 had 1 children
[robot_state_publisher-2] Link panda_link6 had 1 children
[robot_state_publisher-2] Link panda_link7 had 1 children
[robot_state_publisher-2] Link panda_link8 had 1 children
[robot_state_publisher-2] Link panda_hand had 3 children
[robot_state_publisher-2] Link panda_leftfinger had 0 children
[robot_state_publisher-2] Link panda_rightfinger had 0 children
[robot_state_publisher-2] Link panda_hand_tcp had 0 children
[ign gazebo-1] [GUI] [Wrn] [Application.cc:757] [QT] file::/Gazebo/GazeboDrawer.qml:147:3: QML Dialog: Binding loop detected for property "implicitHeight"
[INFO] [create-9]: process has finished cleanly [pid 1078051]
[ign gazebo-1] [GUI] [Wrn] [Application.cc:757] [QT] file::/Gazebo/GazeboDrawer.qml:147:3: QML Dialog: Binding loop detected for property "implicitHeight"
[rviz2-5] Warning: class_loader.impl: SEVERE WARNING!!! A namespace collision has occured with plugin factory for class rviz_default_plugins::displays::InteractiveMarkerDisplay. New factory will OVERWRITE existing one. This situation occurs when libraries containing plugins are directly linked against an executable (the one running right now generating this message). Please separate plugins out into their own library or just don't link against the library and use either class_loader::ClassLoader/MultiLibraryClassLoader to open.
[rviz2-5]          at line 253 in /opt/ros/galactic/include/class_loader/class_loader_core.hpp
[ign gazebo-1] [Msg] Ignition Gazebo GUI    v5.4.0
[ign gazebo-1] [GUI] [Msg] Loading config [/home/marc/.ignition/gazebo/gui.config]
[ign gazebo-1] [GUI] [Msg] Video recorder stats topic advertised on [/gui/record_video/stats]
[ign gazebo-1] [GUI] [Msg] Transform mode service on [/gui/transform_mode]
[ign gazebo-1] [GUI] [Msg] Record video service on [/gui/record_video]
[ign gazebo-1] [GUI] [Msg] Move to service on [/gui/move_to]
[ign gazebo-1] [GUI] [Msg] Follow service on [/gui/follow]
[ign gazebo-1] [GUI] [Msg] Follow offset service on [/gui/follow/offset]
[ign gazebo-1] [GUI] [Msg] View angle service on [/gui/view_angle]
[ign gazebo-1] [GUI] [Msg] Move to pose service on [/gui/move_to/pose]
[ign gazebo-1] [GUI] [Msg] Camera pose topic advertised on [/gui/camera/pose]
[ign gazebo-1] [GUI] [Msg] View collisions service on [/gui/view/collisions]
[ign gazebo-1] [GUI] [Msg] Added plugin [3D View] to main window
[ign gazebo-1] [GUI] [Msg] Loaded plugin [GzScene3D] from path [/usr/lib/x86_64-linux-gnu/ign-gazebo-5/plugins/gui/libGzScene3D.so]
[ign gazebo-1] [GUI] [Msg] Using world control service [/world/default/control]
[ign gazebo-1] [GUI] [Msg] Listening to stats on [/world/default/stats]
[ign gazebo-1] [GUI] [Msg] Added plugin [World control] to main window
[ign gazebo-1] [GUI] [Msg] Loaded plugin [WorldControl] from path [/usr/lib/x86_64-linux-gnu/ign-gui-5/plugins/libWorldControl.so]
[ign gazebo-1] [GUI] [Msg] Listening to stats on [/world/default/stats]
[ign gazebo-1] [GUI] [Msg] Added plugin [World stats] to main window
[ign gazebo-1] [GUI] [Msg] Loaded plugin [WorldStats] from path [/usr/lib/x86_64-linux-gnu/ign-gui-5/plugins/libWorldStats.so]
[ign gazebo-1] [GUI] [Msg] Added plugin [Shapes] to main window
[ign gazebo-1] [GUI] [Msg] Loaded plugin [Shapes] from path [/usr/lib/x86_64-linux-gnu/ign-gazebo-5/plugins/gui/libShapes.so]
[ign gazebo-1] [GUI] [Msg] Added plugin [Lights] to main window
[ign gazebo-1] [GUI] [Msg] Loaded plugin [Lights] from path [/usr/lib/x86_64-linux-gnu/ign-gazebo-5/plugins/gui/libLights.so]
[ign gazebo-1] [GUI] [Msg] Added plugin [Transform control] to main window
[ign gazebo-1] [GUI] [Msg] Loaded plugin [TransformControl] from path [/usr/lib/x86_64-linux-gnu/ign-gazebo-5/plugins/gui/libTransformControl.so]
[ign gazebo-1] [GUI] [Msg] Screenshot service on [/gui/screenshot]
[ign gazebo-1] [GUI] [Msg] Added plugin [Screenshot] to main window
[ign gazebo-1] [GUI] [Wrn] [Application.cc:757] [QT] file::/Gazebo/GazeboDrawer.qml:147:3: QML Dialog: Binding loop detected for property "implicitHeight"
[ign gazebo-1] [libprotobuf ERROR google/protobuf/descriptor_database.cc:58] File already exists in database: ignition/msgs/actor.proto
[ign gazebo-1] [libprotobuf FATAL google/protobuf/descriptor.cc:1358] CHECK failed: GeneratedDatabase()->Add(encoded_file_descriptor, size): 
[ign gazebo-1] terminate called after throwing an instance of 'google::protobuf::FatalException'
[ign gazebo-1]   what():  CHECK failed: GeneratedDatabase()->Add(encoded_file_descriptor, size): 
[ign gazebo-1] Stack trace (most recent call last):
[ign gazebo-1] #31   Object "/usr/lib/x86_64-linux-gnu/ign-gazebo-5/plugins/libignition-gazebo-user-commands-system.so", at 0x7fa79017a7bd, in ignition::gazebo::v5::systems::CreateCommand::Execute()
[ign gazebo-1] #30   Object "/usr/lib/x86_64-linux-gnu/libignition-gazebo5.so.5", at 0x7fa7b3205c90, in ignition::gazebo::v5::SdfEntityCreator::CreateEntities(sdf::v11::Model const*)
[ign gazebo-1] #29   Object "/usr/lib/x86_64-linux-gnu/libignition-gazebo5.so.5", at 0x7fa7b322ffb6, in void ignition::gazebo::v5::EventManager::Emit<ignition::common::EventT<void (unsigned long, std::shared_ptr<sdf::v11::Element>), ignition::gazebo::v5::events::LoadPluginsTag>, unsigned long const&, std::shared_ptr<sdf::v11::Element> const&>(unsigned long const&, std::shared_ptr<sdf::v11::Element> const&)
[ign gazebo-1] #28   Object "/usr/lib/x86_64-linux-gnu/libignition-gazebo5.so.5", at 0x7fa7b324db86, in ignition::gazebo::v5::SimulationRunner::LoadPlugins(unsigned long, std::shared_ptr<sdf::v11::Element> const&)
[ign gazebo-1] #27   Object "/usr/lib/x86_64-linux-gnu/libignition-gazebo5.so.5", at 0x7fa7b324d50e, in ignition::gazebo::v5::SimulationRunner::LoadPlugin(unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::shared_ptr<sdf::v11::Element> const&)
[ign gazebo-1] #26   Object "/usr/lib/x86_64-linux-gnu/libignition-gazebo5.so.5", at 0x7fa7b325f408, in ignition::gazebo::v5::SystemLoader::LoadPlugin(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::shared_ptr<sdf::v11::Element> const&)
[ign gazebo-1] #25   Object "/usr/lib/x86_64-linux-gnu/libignition-gazebo5.so.5", at 0x7fa7b325fcb5, in 
[ign gazebo-1] #24   Object "/usr/lib/x86_64-linux-gnu/libignition-plugin1-loader.so.1", at 0x7fa7b4151670, in ignition::plugin::Loader::LoadLib(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
[ign gazebo-1] #23   Object "/usr/lib/x86_64-linux-gnu/libignition-plugin1-loader.so.1", at 0x7fa7b4150a7d, in ignition::plugin::Loader::Implementation::LoadLib(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
[ign gazebo-1] #22   Object "/lib/x86_64-linux-gnu/libdl.so.2", at 0x7fa7b7dd03d9, in dlopen
[ign gazebo-1] #21   Object "/lib/x86_64-linux-gnu/libdl.so.2", at 0x7fa7b7dd0b58, in 
[ign gazebo-1] #20   Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7fa7b7fe69f2, in _dl_catch_error
[ign gazebo-1] #19   Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7fa7b7fe6927, in _dl_catch_exception
[ign gazebo-1] #18   Object "/lib/x86_64-linux-gnu/libdl.so.2", at 0x7fa7b7dd034b, in 
[ign gazebo-1] #17   Object "/lib64/ld-linux-x86-64.so.2", at 0x7fa7b842e609, in 
[ign gazebo-1] #16   Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7fa7b7fe6927, in _dl_catch_exception
[ign gazebo-1] #15   Object "/lib64/ld-linux-x86-64.so.2", at 0x7fa7b842f0ce, in 
[ign gazebo-1] #14   Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7fa7b7fe6984, in _dl_catch_exception
[ign gazebo-1] #13   Object "/lib64/ld-linux-x86-64.so.2", at 0x7fa7b842aca0, in 
[ign gazebo-1] #12   Object "/lib64/ld-linux-x86-64.so.2", at 0x7fa7b842ab99, in 
[ign gazebo-1] #11   Object "/usr/lib/x86_64-linux-gnu/libignition-msgs8.so.8", at 0x7fa788b70658, in void std::call_once<void (&)()>(std::once_flag&, void (&)())
[ign gazebo-1] #10   Object "/lib/x86_64-linux-gnu/libpthread.so.0", at 0x7fa7b7e744de, in 
[ign gazebo-1] #9    Object "/usr/lib/x86_64-linux-gnu/libignition-msgs8.so.8", at 0x7fa788b6b2dd, in protobuf_ignition_2fmsgs_2factor_2eproto::AddDescriptorsImpl()
[ign gazebo-1] #8    Object "/usr/lib/x86_64-linux-gnu/libprotobuf.so.17", at 0x7fa7b25cd87d, in 
[ign gazebo-1] #7    Object "/lib/x86_64-linux-gnu/libgcc_s.so.1", at 0x7fa7b3f255a9, in _Unwind_Resume
[ign gazebo-1] #6    Object "/lib/x86_64-linux-gnu/libgcc_s.so.1", at 0x7fa7b3f24bee, in 
[ign gazebo-1] #5    Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x7fa7b3fd8d20, in __gxx_personality_v0
[ign gazebo-1] #4    Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x7fa7b3fd8368, in 
[ign gazebo-1] #3    Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x7fa7b3fd938b, in 
[ign gazebo-1] #2    Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6", at 0x7fa7b3fcd910, in 
[ign gazebo-1] #1    Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7fa7b7ea8858, in abort
[ign gazebo-1] #0    Object "/lib/x86_64-linux-gnu/libc.so.6", at 0x7fa7b7ec900b, in gsignal
[ign gazebo-1] Aborted (Signal sent by tkill() 1078129 1000)
[ign gazebo-1] [GUI] [Msg] Loaded plugin [Screenshot] from path [/usr/lib/x86_64-linux-gnu/ign-gui-5/plugins/libScreenshot.so]
[ign gazebo-1] [GUI] [Msg] Added plugin [Component inspector] to main window
[ign gazebo-1] [GUI] [Msg] Loaded plugin [ComponentInspector] from path [/usr/lib/x86_64-linux-gnu/ign-gazebo-5/plugins/gui/libComponentInspector.so]
[ign gazebo-1] [GUI] [Msg] Added plugin [Entity tree] to main window
[ign gazebo-1] [GUI] [Msg] Loaded plugin [EntityTree] from path [/usr/lib/x86_64-linux-gnu/ign-gazebo-5/plugins/gui/libEntityTree.so]
[ign gazebo-1] [GUI] [Msg] Using server control service [/server_control]
[ign gazebo-1] [GUI] [Msg] Loading plugin [ignition-rendering-ogre2]
[ign gazebo-1] [GUI] [Msg] Loading plugin [ignition-rendering-ogre2]
[INFO] [ign gazebo-1]: process has finished cleanly [pid 1078034]
[rviz2-5] [ERROR] [1653476028.607350206] [moveit_ros_visualization.motion_planning_frame]: Action server: /recognize_objects not available
[rviz2-5] [WARN] [1653476028.677483506] [moveit_robot_model.robot_model]: Link panda_link0 has visual geometry but no collision geometry. Collision geometry will be left empty. Fix your URDF file by explicitly specifying collision geometry.
[rviz2-5] [WARN] [1653476028.677533919] [moveit_robot_model.robot_model]: Link panda_link1 has visual geometry but no collision geometry. Collision geometry will be left empty. Fix your URDF file by explicitly specifying collision geometry.
[rviz2-5] [WARN] [1653476028.677541287] [moveit_robot_model.robot_model]: Link panda_link2 has visual geometry but no collision geometry. Collision geometry will be left empty. Fix your URDF file by explicitly specifying collision geometry.
[rviz2-5] [WARN] [1653476028.677546502] [moveit_robot_model.robot_model]: Link panda_link3 has visual geometry but no collision geometry. Collision geometry will be left empty. Fix your URDF file by explicitly specifying collision geometry.
[rviz2-5] [WARN] [1653476028.677551462] [moveit_robot_model.robot_model]: Link panda_link4 has visual geometry but no collision geometry. Collision geometry will be left empty. Fix your URDF file by explicitly specifying collision geometry.
[rviz2-5] [WARN] [1653476028.677555489] [moveit_robot_model.robot_model]: Link panda_link5 has visual geometry but no collision geometry. Collision geometry will be left empty. Fix your URDF file by explicitly specifying collision geometry.
[rviz2-5] [WARN] [1653476028.677559480] [moveit_robot_model.robot_model]: Link panda_link6 has visual geometry but no collision geometry. Collision geometry will be left empty. Fix your URDF file by explicitly specifying collision geometry.
[rviz2-5] [WARN] [1653476028.677563721] [moveit_robot_model.robot_model]: Link panda_link7 has visual geometry but no collision geometry. Collision geometry will be left empty. Fix your URDF file by explicitly specifying collision geometry.
[rviz2-5] Link panda_link0 had 1 children
[rviz2-5] Link panda_link1 had 1 children
[rviz2-5] Link panda_link2 had 1 children
[rviz2-5] Link panda_link3 had 1 children
[rviz2-5] Link panda_link4 had 1 children
[rviz2-5] Link panda_link5 had 1 children
[rviz2-5] Link panda_link6 had 1 children
[rviz2-5] Link panda_link7 had 1 children
[rviz2-5] Link panda_link8 had 1 children
[rviz2-5] Link panda_hand had 3 children
[rviz2-5] Link panda_leftfinger had 0 children
[rviz2-5] Link panda_rightfinger had 0 children
[rviz2-5] Link panda_hand_tcp had 0 children
[rviz2-5] Link panda_link0 had 1 children
[rviz2-5] Link panda_link1 had 1 children
[rviz2-5] Link panda_link2 had 1 children
[rviz2-5] Link panda_link3 had 1 children
[rviz2-5] Link panda_link4 had 1 children
[rviz2-5] Link panda_link5 had 1 children
[rviz2-5] Link panda_link6 had 1 children
[rviz2-5] Link panda_link7 had 1 children
[rviz2-5] Link panda_link8 had 1 children
[rviz2-5] Link panda_hand had 3 children
[rviz2-5] Link panda_leftfinger had 0 children
[rviz2-5] Link panda_rightfinger had 0 children
[rviz2-5] Link panda_hand_tcp had 0 children

Do I need to start the move_group launch file first in a seperate terminal?

Thanks in advance for a hint on how to get gazebo to not crash.

gazebo Fortress vs gazebo 11

Just a few question

My setup is with gazebo 11. Would the package work with it ?

If not, Can i have both gazebo 11 and gazebo 11 without using a docker or a virtual environment ?

Question: how to properly install ign_ros2_control

Hi @AndrejOrsula, thanks for the repository. I'm trying to check how description works with ignition and faces dependencies issue.
Following your readme we need to build "ign_ros2_control":

Build a version based on the selected combination of ROS 2 release and Ignition version

I'm using ROS2 Galactic and ignition fortress, I was checking out https://github.com/ignitionrobotics/ign_ros2_control/tree/ahcorde/galactic/ign_ros2_control branch and could build the workspace with ign_ros2_control and panda_ign_moveit2
However sourcing install/setup.bash, I see not found: "/ws/ros2_ws/install/share/ignition_ros2_control/local_setup.bash" and executing:

ros2 launch panda_description view_ign.launch.py
Captured stderr output: error: package not found: "package 'panda_moveit_config' not found, searching: ['/ws/ros2_ws/install', '/opt/ros/galactic', ]"
when processing file: /ws/ros2_ws/install/share/panda_description/urdf/panda.urdf.xacro

Looks like missing ignition_ros2_control/local_setup.bash failed to source panda_ign_moveit2.

Any advices on how to make everything work, please ? Thank

EDIT:

without installing at all ign-ros2-control and executing view_ign.launch.py, I see [Err] [SystemLoader.cc:66] Failed to load system plugin [ignition_ros2_control-system] : couldn't find shared library. and gazebo shows the arm.

Dockerfile?

Thank you for the wonderful work!

I had a bit of trouble installing everything with Galactic+Fortress to the point where I could run

ros2 launch panda_moveit_config ex_ign_control.launch.py

and successfully plan in a MoveIt + Gazebo scene. The two things that held me up were remembering to set my IGN_GAZEBO_RESOURCE_PATH and navigating the scattered support for effort control that required me to install specific branches and forks for some of the ROS2 control dependencies.

I have a Dockerfile that may not be perfectly idiomatic, but it works. Would this be helpful to folks as a PR?

Dockerfile

ARG PARENT_IMAGE=ubuntu:20.04
FROM ${PARENT_IMAGE}

### Use bash by default
SHELL ["/bin/bash", "-c"]

### Set non-interactive installation
ARG DEBIAN_FRONTEND=noninteractive

### Set working directory
ARG WORK_DIR=/root/work_dir
ENV WORK_DIR=${WORK_DIR}
WORKDIR ${WORK_DIR}

### Install essentials, toolchain, python, ...
ARG PYTHON_VERSION=3
RUN apt update && \
    apt install -yq --no-install-recommends \
        apt-utils \
        locales \
        locales-all \
        tzdata \
        software-properties-common \
        git \
        wget \
        curl \
        gnupg \
        lsb-release \
        build-essential \
        make \
        cmake \
        g++ \
        autoconf \
        automake \
        clang \
        ninja-build \
        python${PYTHON_VERSION} \
        tmux \
        vim && \
    rm -rf /var/lib/apt/lists/*

### Install ROS 2
ARG ROS2_DISTRO=galactic
ENV ROS2_DISTRO=${ROS2_DISTRO}
RUN curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg && \
    echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/ros2.list >/dev/null && \
    apt update && \
    apt install -yq --no-install-recommends \
        ros-${ROS2_DISTRO}-desktop \
        python${PYTHON_VERSION}-colcon-common-extensions \
        python${PYTHON_VERSION}-vcstool \
        python${PYTHON_VERSION}-argcomplete \
        python${PYTHON_VERSION}-rosdep && \
    rosdep init && rosdep update && \
    source /opt/ros/${ROS2_DISTRO}/setup.bash && \
    rm -rf /var/lib/apt/lists/*

### Install MoveIt 2
RUN apt update && \
    apt install -yq --no-install-recommends \
        ros-${ROS2_DISTRO}-moveit-common \
        ros-${ROS2_DISTRO}-moveit-core \
        ros-${ROS2_DISTRO}-moveit-kinematics \
        ros-${ROS2_DISTRO}-moveit-msgs \
        ros-${ROS2_DISTRO}-moveit-planners \
        ros-${ROS2_DISTRO}-moveit-planners-ompl \
        ros-${ROS2_DISTRO}-moveit-plugins \
        ros-${ROS2_DISTRO}-moveit-resources \
        ros-${ROS2_DISTRO}-moveit-ros \
        ros-${ROS2_DISTRO}-moveit-ros-occupancy-map-monitor \
        ros-${ROS2_DISTRO}-moveit-ros-perception \
        ros-${ROS2_DISTRO}-moveit-ros-planning \
        ros-${ROS2_DISTRO}-moveit-ros-planning-interface \
        ros-${ROS2_DISTRO}-moveit-runtime \
        ros-${ROS2_DISTRO}-moveit-servo \
        ros-${ROS2_DISTRO}-moveit-simple-controller-manager && \
    rm -rf /var/lib/apt/lists/*

### Install Ignition
ARG IGNITION_VERSION=fortress
ENV IGNITION_VERSION=${IGNITION_VERSION}
RUN wget https://packages.osrfoundation.org/gazebo.gpg -O /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg && \
    echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/pkgs-osrf-archive-keyring.gpg] http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/gazebo-stable.list > /dev/null && \
    apt update && \
    apt install -yq --no-install-recommends \
    ignition-${IGNITION_VERSION} && \
    rm -rf /var/lib/apt/lists/*

### build ros_ign dependencies
# ROS 2 <-> IGN from ignitionrobotics (got branch from support matrix)
# ign_ros2_control from ignitionrobotics
# ros2_controllers from Andrej Orsula with patch for effort control
# see effort issue https://github.com/AndrejOrsula/panda_ign_moveit2/issues/12
RUN mkdir -p ros_ign/src && \
    cd ros_ign && \
    git clone https://github.com/ignitionrobotics/ros_ign.git --depth 1 -b ros2 src && \
    cd src && \
    git clone https://github.com/ignitionrobotics/ign_ros2_control && \
    git clone https://github.com/AndrejOrsula/ros2_controllers.git -b jtc_effort && \
    cd .. && \
    apt update && \
    rosdep update && \
    rosdep install -r --from-paths . -yi --rosdistro ${ROS2_DISTRO} && \
    rm -rf /var/lib/apt/lists/* && \
    source /opt/ros/${ROS2_DISTRO}/setup.bash && \
    colcon build --merge-install --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release

## Install panda arm config
RUN mkdir -p panda_ws/src && cd panda_ws && \
    git clone https://github.com/AndrejOrsula/panda_ign_moveit2.git src/panda_ign_moveit2 && \
    apt update && \
    rosdep update && \
    rosdep install -r --from-paths src -yi --rosdistro ${ROS2_DISTRO} && \
    rm -rf /var/lib/apt/lists/* && \
    source /opt/ros/${ROS2_DISTRO}/setup.bash && \
    colcon build --merge-install --symlink-install --cmake-args "-DCMAKE_BUILD_TYPE=Release"

# Create SDF for ignition so it can find the arm
ENV REPO_DIR=${WORK_DIR}/panda_ws/src/panda_ign_moveit2
RUN source /opt/ros/${ROS2_DISTRO}/setup.bash && \
    source ${WORK_DIR}/panda_ws/install/local_setup.bash && \
    cd ${REPO_DIR}/panda_description/scripts && \
    bash xacro2sdf.bash ../urdf/panda.urdf.xacro

ENV IGN_GAZEBO_RESOURCE_PATH=${REPO_DIR}/panda_description${IGN_GAZEBO_RESOURCE_PATH:+:${IGN_GAZEBO_RESOURCE_PATH}}

### Communicate within localhost only
ENV ROS_LOCALHOST_ONLY=1
### Set domain ID for ROS2 in order to not interfere with host
ENV ROS_DOMAIN_ID=69

ENV IGN_IP=127.0.0.1

### Add entrypoint sourcing the environment
COPY docker/entrypoint.bash ./entrypoint.bash

### Set entrypoint and default command
ENTRYPOINT ["/bin/bash", "-c", "source ${WORK_DIR}/entrypoint.bash && \"$@\"", "-s"]
CMD ["/bin/bash"]

How to properly install the package in ROS2 humble

Dear Sir, I noticed that your packages are in ROS2 Galactic, But now I use humble, and I couldn't properly install. Since you have a humble version in pymoveit2, I think it should be okay with humble.

I tried to use: git clone https://github.com/AndrejOrsula/panda_ign_moveit2.git -b humble
but it turned out with: fatal: Remote branch humble not found in upstream origin

the errors are listed under.Thank you for your time.

CMake Error at CMakeLists.txt:32 (find_package):
By not providing "Findignition-transport10.cmake" in CMAKE_MODULE_PATH this
project has asked CMake to find a package configuration file provided by
"ignition-transport10", but CMake did not find one.

Could not find a package configuration file provided by
"ignition-transport10" with any of the following names:

ignition-transport10Config.cmake
ignition-transport10-config.cmake

Add the installation prefix of "ignition-transport10" to CMAKE_PREFIX_PATH
or set "ignition-transport10_DIR" to a directory containing one of the
above files. If "ignition-transport10" provides a separate development
package or SDK, be sure it has been installed.


Failed <<< ros_ign_gazebo [5.94s, exited with code 1]
Aborted <<< ros_ign_interfaces [7.30s]

Summary: 0 packages finished [8.35s]
1 package failed: ros_ign_gazebo
1 package aborted: ros_ign_interfaces
1 package had stderr output: ros_ign_gazebo
20 packages not processed

Support for hybrid planning - Robot only plans but is not executing

I tried to add the hybrid planning capability in the launchfile ex_py_follow_target.launch.py.
However, the robot successfully plans but does not execute.

The hybrid planner nodes seem to spawn correctly. Afterwards I send a hybrid planning request to the ROS hybrid planner action server.

Toggle for launch file
#!/usr/bin/env -S ros2 launch
"""Configure and setup move group for planning with MoveIt 2"""

from os import path
from typing import List

import yaml
from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument
from launch.conditions import IfCondition
from launch.substitutions import (
    Command,
    FindExecutable,
    LaunchConfiguration,
    PathJoinSubstitution,
    PythonExpression,
)
from launch_ros.actions import Node
from launch_ros.substitutions import FindPackageShare

from launch_ros.descriptions import ComposableNode
from launch_ros.actions import ComposableNodeContainer


def generate_launch_description():

    # Declare all launch arguments
    declared_arguments = generate_declared_arguments()

    # Get substitution for all arguments
    description_package = LaunchConfiguration("description_package")
    description_filepath = LaunchConfiguration("description_filepath")
    moveit_config_package = "panda_moveit_config"
    name = LaunchConfiguration("name")
    prefix = LaunchConfiguration("prefix")
    gripper = LaunchConfiguration("gripper")
    collision_arm = LaunchConfiguration("collision_arm")
    collision_gripper = LaunchConfiguration("collision_gripper")
    safety_limits = LaunchConfiguration("safety_limits")
    safety_position_margin = LaunchConfiguration("safety_position_margin")
    safety_k_position = LaunchConfiguration("safety_k_position")
    safety_k_velocity = LaunchConfiguration("safety_k_velocity")
    ros2_control = LaunchConfiguration("ros2_control")
    ros2_control_plugin = LaunchConfiguration("ros2_control_plugin")
    ros2_control_command_interface = LaunchConfiguration(
        "ros2_control_command_interface"
    )
    gazebo_preserve_fixed_joint = LaunchConfiguration(
        "gazebo_preserve_fixed_joint")
    enable_servo = LaunchConfiguration("enable_servo")
    enable_rviz = LaunchConfiguration("enable_rviz")
    rviz_config = LaunchConfiguration("rviz_config")
    use_sim_time = LaunchConfiguration("use_sim_time")
    log_level = LaunchConfiguration("log_level")

    # URDF
    _robot_description_xml = Command(
        [
            PathJoinSubstitution([FindExecutable(name="xacro")]),
            " ",
            PathJoinSubstitution(
                [FindPackageShare(description_package), description_filepath]
            ),
            " ",
            "name:=",
            name,
            " ",
            "prefix:=",
            prefix,
            " ",
            "gripper:=",
            gripper,
            " ",
            "collision_arm:=",
            collision_arm,
            " ",
            "collision_gripper:=",
            collision_gripper,
            " ",
            "safety_limits:=",
            safety_limits,
            " ",
            "safety_position_margin:=",
            safety_position_margin,
            " ",
            "safety_k_position:=",
            safety_k_position,
            " ",
            "safety_k_velocity:=",
            safety_k_velocity,
            " ",
            "ros2_control:=",
            ros2_control,
            " ",
            "ros2_control_plugin:=",
            ros2_control_plugin,
            " ",
            "ros2_control_command_interface:=",
            ros2_control_command_interface,
            " ",
            "gazebo_preserve_fixed_joint:=",
            gazebo_preserve_fixed_joint,
        ]
    )
    robot_description = {"robot_description": _robot_description_xml}

    # SRDF
    _robot_description_semantic_xml = Command(
        [
            PathJoinSubstitution([FindExecutable(name="xacro")]),
            " ",
            PathJoinSubstitution(
                [
                    FindPackageShare(moveit_config_package),
                    "srdf",
                    "panda.srdf.xacro",
                ]
            ),
            " ",
            "name:=",
            name,
            " ",
            "prefix:=",
            prefix,
        ]
    )
    robot_description_semantic = {
        "robot_description_semantic": _robot_description_semantic_xml
    }

    # Kinematics
    kinematics = load_yaml(
        moveit_config_package, path.join("config", "kinematics.yaml")
    )

    # Joint limits
    joint_limits = {
        "robot_description_planning": load_yaml(
            moveit_config_package, path.join("config", "joint_limits.yaml")
        )
    }

    # Servo
    servo_params = {
        "moveit_servo": load_yaml(
            moveit_config_package, path.join("config", "servo.yaml")
        )
    }
    servo_params["moveit_servo"].update({"use_gazebo": use_sim_time})

    # Planning pipeline
    planning_pipeline = {
        "planning_pipelines": ["ompl"],
        "default_planning_pipeline": "ompl",
        "ompl": {
            "planning_plugin": "ompl_interface/OMPLPlanner",
            # TODO: Re-enable `default_planner_request_adapters/AddRuckigTrajectorySmoothing` once its issues are resolved
            # "request_adapters": "default_planner_request_adapters/AddTimeOptimalParameterization default_planner_request_adapters/ResolveConstraintFrames default_planner_request_adapters/FixWorkspaceBounds default_planner_request_adapters/FixStartStateBounds default_planner_request_adapters/FixStartStateCollision default_planner_request_adapters/FixStartStatePathConstraints",
            "request_adapters": "default_planner_request_adapters/AddTimeOptimalParameterization default_planner_request_adapters/ResolveConstraintFrames default_planner_request_adapters/FixWorkspaceBounds default_planner_request_adapters/FixStartStateBounds default_planner_request_adapters/FixStartStateCollision default_planner_request_adapters/FixStartStatePathConstraints default_planner_request_adapters/SetMaxCartesianEndEffectorSpeed",
            # TODO: Reduce start_state_max_bounds_error once spawning with specific joint configuration is enabled
            "start_state_max_bounds_error": 0.31416,
        },
    }
    _ompl_yaml = load_yaml(
        moveit_config_package, path.join("config", "ompl_planning.yaml")
    )
    planning_pipeline["ompl"].update(_ompl_yaml)

    # Planning scene
    planning_scene_monitor_parameters = {
        "publish_planning_scene": True,
        "publish_geometry_updates": True,
        "publish_state_updates": True,
        "publish_transforms_updates": True,
    }

    # MoveIt controller manager
    moveit_controller_manager_yaml = load_yaml(
        moveit_config_package, path.join(
            "config", "moveit_controller_manager.yaml")
    )
    moveit_controller_manager = {
        "moveit_controller_manager": "moveit_simple_controller_manager/MoveItSimpleControllerManager",
        "moveit_simple_controller_manager": moveit_controller_manager_yaml,
    }

    # Trajectory execution
    trajectory_execution = {
        "allow_trajectory_execution": True,
        "moveit_manage_controllers": False,
        "trajectory_execution.allowed_execution_duration_scaling": 1.2,
        "trajectory_execution.allowed_goal_duration_margin": 0.5,
        "trajectory_execution.allowed_start_tolerance": 0.01,
    }

    # Controller parameters
    declared_arguments.append(
        DeclareLaunchArgument(
            "__controller_parameters_basename",
            default_value=["controllers_",
                           ros2_control_command_interface, ".yaml"],
        )
    )
    controller_parameters = PathJoinSubstitution(
        [
            FindPackageShare(moveit_config_package),
            "config",
            LaunchConfiguration("__controller_parameters_basename"),
        ]
    )

    # List of nodes to be launched
    nodes = [
        # robot_state_publisher
        Node(
            package="robot_state_publisher",
            executable="robot_state_publisher",
            output="log",
            arguments=["--ros-args", "--log-level", log_level],
            parameters=[
                robot_description,
                {
                    "publish_frequency": 50.0,
                    "frame_prefix": "",
                    "use_sim_time": use_sim_time,
                },
            ],
        ),
        # ros2_control_node (only for fake controller)
        Node(
            package="controller_manager",
            executable="ros2_control_node",
            output="log",
            arguments=["--ros-args", "--log-level", log_level],
            parameters=[
                robot_description,
                controller_parameters,
                {"use_sim_time": use_sim_time},
            ],
            condition=(
                IfCondition(
                    PythonExpression(
                        [
                            "'",
                            ros2_control_plugin,
                            "'",
                            " == ",
                            "'fake'",
                        ]
                    )
                )
            ),
        ),
        # move_group (with execution)
        Node(
            package="moveit_ros_move_group",
            executable="move_group",
            output="log",
            # arguments=["--ros-args", "--log-level", log_level],
            arguments=["--ros-args", "--log-level", 'info'],
            parameters=[
                robot_description,
                robot_description_semantic,
                kinematics,
                joint_limits,
                planning_pipeline,
                trajectory_execution,
                planning_scene_monitor_parameters,
                moveit_controller_manager,
                {"use_sim_time": use_sim_time},
            ],
        ),
        # move_servo
        Node(
            package="moveit_servo",
            executable="servo_node_main",
            output="log",
            arguments=["--ros-args", "--log-level", log_level],
            parameters=[
                robot_description,
                robot_description_semantic,
                kinematics,
                joint_limits,
                planning_pipeline,
                trajectory_execution,
                planning_scene_monitor_parameters,
                servo_params,
                {"use_sim_time": use_sim_time},
            ],
            condition=IfCondition(enable_servo),
        ),
        # rviz2
        Node(
            package="rviz2",
            executable="rviz2",
            output="log",
            arguments=[
                "--display-config",
                rviz_config,
                "--ros-args",
                "--log-level",
                log_level,
            ],
            parameters=[
                robot_description,
                robot_description_semantic,
                kinematics,
                planning_pipeline,
                joint_limits,
                {"use_sim_time": use_sim_time},
            ],
            condition=IfCondition(enable_rviz),
        ),
    ]

    # Add nodes for loading controllers
    for controller in moveit_controller_manager_yaml["controller_names"] + [
        "joint_state_broadcaster"
    ]:
        nodes.append(
            # controller_manager_spawner
            Node(
                package="controller_manager",
                executable="spawner",
                output="log",
                arguments=[controller, "--ros-args", "--log-level", log_level],
                parameters=[{"use_sim_time": use_sim_time}],
            ),
        )

    # Any parameters that are unique to your plugins go here
    common_hybrid_planning_param = load_yaml(
        moveit_config_package, path.join("config", "common_hybrid_planning_params.yaml")
    )

    global_planner_param = load_yaml(
        moveit_config_package, path.join("config", "global_planner.yaml")
    )
    local_planner_param = load_yaml(
        moveit_config_package, path.join("config", "local_planner.yaml")
    )
    hybrid_planning_manager_param = load_yaml(
        moveit_config_package, path.join("config", "hybrid_planning_manager.yaml")
    )

        # The global planner uses the typical OMPL parameters
    planning_pipelines_config = {
        "ompl": {
            "planning_plugin": "ompl_interface/OMPLPlanner",
            "request_adapters": """default_planner_request_adapters/AddTimeOptimalParameterization default_planner_request_adapters/FixWorkspaceBounds default_planner_request_adapters/FixStartStateBounds default_planner_request_adapters/FixStartStateCollision default_planner_request_adapters/FixStartStatePathConstraints""",
            "start_state_max_bounds_error": 0.1,
        }
    }
    ompl_planning_yaml = load_yaml(
        moveit_config_package, path.join("config", "ompl_planning_hybrid.yaml")
    )
    planning_pipelines_config["ompl"].update(ompl_planning_yaml)

    moveit_simple_controllers_yaml = load_yaml(
        moveit_config_package, path.join("config", "moveit_controller_hybrid.yaml")
    )
    moveit_controllers = {
        "moveit_simple_controller_manager": moveit_simple_controllers_yaml,
        "moveit_controller_manager": "moveit_simple_controller_manager/MoveItSimpleControllerManager",
    }

    # Generate launch description with multiple components
    container = ComposableNodeContainer(
        name="hybrid_planning_container",
        namespace="/",
        package="rclcpp_components",
        executable="component_container",
        composable_node_descriptions=[
            ComposableNode(
                package="moveit_hybrid_planning",
                # plugin="moveit_hybrid_planning::GlobalPlannerComponent",
                plugin="moveit::hybrid_planning::GlobalPlannerComponent",
                name="global_planner",
                parameters=[
                    common_hybrid_planning_param,
                    global_planner_param,
                    robot_description,
                    robot_description_semantic,
                    kinematics,
                    # planning_pipeline,
                    planning_pipelines_config,
                    # moveit_controller_manager,
                    # moveit_controllers,
                    {"use_sim_time": use_sim_time},
                ],
            ),
            ComposableNode(
                package="moveit_hybrid_planning",
                # plugin="moveit_hybrid_planning::LocalPlannerComponent",
                plugin="moveit::hybrid_planning::LocalPlannerComponent",

                name="local_planner",
                parameters=[
                    common_hybrid_planning_param,
                    local_planner_param,
                    robot_description,
                    robot_description_semantic,
                    kinematics,
                    {"use_sim_time": use_sim_time},
                ],
            ),
            ComposableNode(
                package="moveit_hybrid_planning",
                # plugin="moveit_hybrid_planning::HybridPlanningManager",
                plugin="moveit::hybrid_planning::HybridPlanningManager",
                
                name="hybrid_planning_manager",
                parameters=[
                    common_hybrid_planning_param,
                    hybrid_planning_manager_param,
                    {"use_sim_time": use_sim_time},
                ],
            ),
        ],
        output="screen",
    )

    return LaunchDescription(declared_arguments +[container]+ nodes)


def load_yaml(package_name: str, file_path: str):
    """
    Load yaml configuration based on package name and file path relative to its share.
    """

    package_path = get_package_share_directory(package_name)
    absolute_file_path = path.join(package_path, file_path)
    return parse_yaml(absolute_file_path)


def parse_yaml(absolute_file_path: str):
    """
    Parse yaml from file, given its absolute file path.
    """

    try:
        with open(absolute_file_path, "r") as file:
            return yaml.safe_load(file)
    except EnvironmentError:
        return None


def generate_declared_arguments() -> List[DeclareLaunchArgument]:
    """
    Generate list of all launch arguments that are declared for this launch script.
    """

    return [
        # Locations of robot resources
        DeclareLaunchArgument(
            "description_package",
            default_value="panda_description",
            description="Custom package with robot description.",
        ),
        DeclareLaunchArgument(
            "description_filepath",
            default_value=path.join("urdf", "panda.urdf.xacro"),
            description="Path to xacro or URDF description of the robot, relative to share of `description_package`.",
        ),
        # Naming of the robot
        DeclareLaunchArgument(
            "name",
            default_value="panda",
            description="Name of the robot.",
        ),
        DeclareLaunchArgument(
            "prefix",
            default_value="panda_",
            description="Prefix for all robot entities. If modified, then joint names in the configuration of controllers must also be updated.",
        ),
        # Gripper
        DeclareLaunchArgument(
            "gripper",
            default_value="true",
            description="Flag to enable default gripper.",
        ),
        # Collision geometry
        DeclareLaunchArgument(
            "collision_arm",
            default_value="true",
            description="Flag to enable collision geometry for manipulator's arm.",
        ),
        DeclareLaunchArgument(
            "collision_gripper",
            default_value="true",
            description="Flag to enable collision geometry for manipulator's gripper (hand and fingers).",
        ),
        # Safety controller
        DeclareLaunchArgument(
            "safety_limits",
            default_value="true",
            description="Flag to enable safety limits controllers on manipulator joints.",
        ),
        DeclareLaunchArgument(
            "safety_position_margin",
            default_value="0.15",
            description="Lower and upper margin for position limits of all safety controllers.",
        ),
        DeclareLaunchArgument(
            "safety_k_position",
            default_value="100.0",
            description="Parametric k-position factor of all safety controllers.",
        ),
        DeclareLaunchArgument(
            "safety_k_velocity",
            default_value="40.0",
            description="Parametric k-velocity factor of all safety controllers.",
        ),
        # ROS 2 control
        DeclareLaunchArgument(
            "ros2_control",
            default_value="true",
            description="Flag to enable ros2 controllers for manipulator.",
        ),
        DeclareLaunchArgument(
            "ros2_control_plugin",
            default_value="ign",
            description="The ros2_control plugin that should be loaded for the manipulator ('fake', 'ign', 'real' or custom).",
        ),
        DeclareLaunchArgument(
            "ros2_control_command_interface",
            default_value="effort",
            description="The output control command interface provided by ros2_control ('position', 'velocity', 'effort' or certain combinations 'position,velocity').",
        ),
        # Gazebo
        DeclareLaunchArgument(
            "gazebo_preserve_fixed_joint",
            default_value="false",
            description="Flag to preserve fixed joints and prevent lumping when generating SDF for Gazebo.",
        ),
        # Servo
        DeclareLaunchArgument(
            "enable_servo",
            default_value="true",
            description="Flag to enable MoveIt2 Servo for manipulator.",
        ),
        # Miscellaneous
        DeclareLaunchArgument(
            "enable_rviz", default_value="true", description="Flag to enable RViz2."
        ),
        DeclareLaunchArgument(
            "rviz_config",
            default_value=path.join(
                get_package_share_directory("panda_moveit_config"),
                "rviz",
                "moveit.rviz",
            ),
            description="Path to configuration for RViz2.",
        ),
        DeclareLaunchArgument(
            "use_sim_time",
            default_value="false",
            description="If true, use simulated clock.",
        ),
        DeclareLaunchArgument(
            "log_level",
            default_value="warn",
            description="The level of logging that is applied to all ROS 2 nodes launched by this script.",
        ),
    ]


Toggle for message publisher script
import rclpy
from rclpy.action import ActionClient
from rclpy.node import Node

from std_msgs.msg import String
from rclpy.callback_groups import ReentrantCallbackGroup

from global_state_msgs.msg import CollisionPlane as CollisionPlaneMessage
from geometry_msgs.msg import Pose, PoseStamped, Quaternion, Point, Vector3
from moveit_msgs.msg import MotionPlanRequest, MotionSequenceItem, MotionSequenceRequest, PlanningOptions, \
    PositionConstraint, OrientationConstraint, Constraints
from moveit_msgs.action import HybridPlanner
from shape_msgs.msg import SolidPrimitive

from rclpy.qos import (
    QoSDurabilityPolicy,
    QoSHistoryPolicy,
    QoSProfile,
    QoSReliabilityPolicy,
)

from pymoveit2 import MoveIt2, MoveIt2Gripper
from pymoveit2.robots import panda


class MinimalPublisher(Node):

    def __init__(self):
        super().__init__('minimal_publisher')
        topic = "/collision_plane"
        # self.publisher_ = self.create_publisher(String, topic, 10)
        self.publisher_ = self.create_publisher(CollisionPlaneMessage, topic, 10)
        timer_period = 4  # seconds

        self._callback_group = ReentrantCallbackGroup()

        self._moveit2 = MoveIt2(
            node=self,
            joint_names=panda.joint_names(),
            base_link_name=panda.base_link_name(),
            end_effector_name=panda.end_effector_name(),
            group_name=panda.MOVE_GROUP_ARM,
            execute_via_moveit=True,
            callback_group=self._callback_group,
        )

        # hybrid_planning/run_hybrid_planning
        hybrid_planner_action = "run_hybrid_planning"
        self.__hybrid_planner_action_client = ActionClient(
            node=self,
            action_type=HybridPlanner,
            action_name=hybrid_planner_action,
            goal_service_qos_profile=QoSProfile(
                durability=QoSDurabilityPolicy.VOLATILE,
                reliability=QoSReliabilityPolicy.RELIABLE,
                history=QoSHistoryPolicy.KEEP_LAST,
                depth=1,
            ),
            result_service_qos_profile=QoSProfile(
                durability=QoSDurabilityPolicy.VOLATILE,
                reliability=QoSReliabilityPolicy.RELIABLE,
                history=QoSHistoryPolicy.KEEP_LAST,
                depth=5,
            ),
            cancel_service_qos_profile=QoSProfile(
                durability=QoSDurabilityPolicy.VOLATILE,
                reliability=QoSReliabilityPolicy.RELIABLE,
                history=QoSHistoryPolicy.KEEP_LAST,
                depth=5,
            ),
            feedback_sub_qos_profile=QoSProfile(
                durability=QoSDurabilityPolicy.VOLATILE,
                reliability=QoSReliabilityPolicy.BEST_EFFORT,
                history=QoSHistoryPolicy.KEEP_LAST,
                depth=1,
            ),
            status_sub_qos_profile=QoSProfile(
                durability=QoSDurabilityPolicy.VOLATILE,
                reliability=QoSReliabilityPolicy.BEST_EFFORT,
                history=QoSHistoryPolicy.KEEP_LAST,
                depth=1,
            ),
            callback_group=self._callback_group,
        )

        self.timer = self.create_timer(timer_period, self.timer_callback)
        self.i = 0

    def timer_callback(self):
        publish_messages_limit = 2
        if (publish_messages_limit - 1 < self.i):
            exit(0)

        msg = HybridPlanner.Goal()

        goal_motion_request = MotionPlanRequest()

        goal_motion_request.goal_constraints = [Constraints()]
        # goal_motion_request.group_name = 'panda_arm'  # 'arm'
        goal_motion_request.group_name = 'arm'  # 'arm'
        goal_motion_request.num_planning_attempts = 10
        goal_motion_request.allowed_planning_time = 0.5

        goal_motion_request.workspace_parameters.header.frame_id = 'world'
        goal_motion_request.workspace_parameters.header.stamp = self.get_clock().now().to_msg()
        goal_motion_request.workspace_parameters.min_corner.x = -2.0
        goal_motion_request.workspace_parameters.min_corner.y = -2.0
        goal_motion_request.workspace_parameters.min_corner.z = -2.0
        goal_motion_request.workspace_parameters.max_corner.x = 2.0
        goal_motion_request.workspace_parameters.max_corner.y = 2.0
        goal_motion_request.workspace_parameters.max_corner.z = 2.0

        goal_motion_request.planner_id = "ompl"
        goal_motion_request.pipeline_id = "ompl"

        goal_motion_request.start_state.joint_state = self._moveit2.joint_state

        #
        # goal_motion_request.request.max_velocity_scaling_factor = 0.6
        # goal_motion_request.request.max_acceleration_scaling_factor = 0.6
        #
        # goal_motion_request.planning_options = PlanningOptions()
        # goal_motion_request.planning_options.replan = True
        # goal_motion_request.planning_options.replan_attempts = 50
        #
        # # # The amount of time to wait in between replanning attempts (in seconds)
        # # TODO: Check if this can be zero
        # goal_motion_request.planning_options.replan_delay = 0.0
        #
        # # TODO:  How to get the latest configuration?
        # # move_action_goal.request.start_state.joint_state = self._moveit2.joint_state
        #
        # # set goal constraints
        goal_constraint = PositionConstraint()
        goal_constraint.header.frame_id = 'world'
        # goal_constraint.link_name = 'panda_link8'
        # goal_constraint.link_name = 'panda_hand_tcp'
        goal_constraint.link_name = 'panda_hand'

        # Define target position
        goal_constraint.constraint_region.primitive_poses.append(Pose())

        pointA = Point(x=0.3 * (self.i / 2 + 1), y=0.3, z=0.3)
        goal_constraint.constraint_region.primitive_poses[0].position = pointA

        # Define goal region as a sphere with radius equal to the tolerance
        goal_constraint.constraint_region.primitives.append(SolidPrimitive())
        goal_constraint.constraint_region.primitives[0].type = 2  # Sphere
        goal_constraint.constraint_region.primitives[0].dimensions = [0.001]

        # Set weight of the constraint
        goal_constraint.weight = 1.0
        #
        goal_motion_request.goal_constraints[-1].position_constraints.append(
            goal_constraint)

        # # Add goal orientation
        goal_orientation = OrientationConstraint()
        quat = Quaternion()

        quat.x = -1.0
        quat.y = 0.0
        quat.z = 0.0
        quat.w = 0.0
        #
        goal_orientation.orientation = quat
        goal_orientation.link_name = 'panda_hand'
        # goal_orientation.link_name = 'panda_hand_tcp'
        goal_orientation.header.frame_id = 'world'
        goal_orientation.weight = 1.0


        goal_orientation.absolute_x_axis_tolerance = 0.109
        goal_orientation.absolute_y_axis_tolerance = 0.109
        goal_orientation.absolute_z_axis_tolerance = 0.109
        #
        goal_motion_request.goal_constraints[-1].orientation_constraints.append(
            goal_orientation)

        motion_sequence = MotionSequenceItem()
        motion_sequence.req = goal_motion_request
        motion_sequence.blend_radius = 0.0

        motion_sequence_request = MotionSequenceRequest()
        motion_sequence_request.items = [motion_sequence]

        msg.motion_sequence = motion_sequence_request
        msg.planning_group = 'arm'  # 'panda_arm'

        result = self.__hybrid_planner_action_client.send_goal(msg)
        print(result)

        self.i += 1


def main(args=None):
    rclpy.init(args=args)

    minimal_publisher = MinimalPublisher()

    rclpy.spin(minimal_publisher)

    # Destroy the node explicitly
    # (optional - otherwise it will be done automatically
    # when the garbage collector destroys the node object)
    minimal_publisher.destroy_node()
    rclpy.shutdown()


if __name__ == '__main__':
    main()

Do you have an idea why the robot is only planning and not moving?
Is the topic for joint_trajectory commands wrongly set?

For more logs see my other post: moveit/moveit2#1536

fail to build

Hi, I'm a beginner and I'm having some problems with the build. Much appreciated.
`colcon build --merge-install --symlink-install --cmake-args "-DCMAKE_BUILD_TYPE=Release"
[1.951s] WARNING:colcon.colcon_core.package_selection:Some selected packages are already built in one or more underlay workspaces:
'gripper_controllers' is in: /opt/ros/humble
'effort_controllers' is in: /opt/ros/humble
'velocity_controllers' is in: /opt/ros/humble
'joint_state_broadcaster' is in: /opt/ros/humble
'diff_drive_controller' is in: /opt/ros/humble
'ros2_controllers' is in: /opt/ros/humble
'joint_trajectory_controller' is in: /opt/ros/humble
'position_controllers' is in: /opt/ros/humble
If a package in a merged underlay workspace is overridden and it installs headers, then all packages in the overlay must sort their include directories by workspace order. Failure to do so may result in build failures or undefined behavior at run time.
If the overridden package is used by another package in any underlay, then the overriding package in the overlay must be API and ABI compatible or undefined behavior at run time may occur.

If you understand the risks and want to override a package anyways, add the following to the command line:
--allow-overriding diff_drive_controller effort_controllers gripper_controllers joint_state_broadcaster joint_trajectory_controller position_controllers ros2_controllers velocity_controllers

This may be promoted to an error in a future release of colcon-override-check.
Starting >>> ros_ign_gazebo
Starting >>> ros_ign_interfaces
--- stderr: ros_ign_gazebo
CMake Error at CMakeLists.txt:32 (find_package):
By not providing "Findignition-transport10.cmake" in CMAKE_MODULE_PATH this
project has asked CMake to find a package configuration file provided by
"ignition-transport10", but CMake did not find one.

Could not find a package configuration file provided by
"ignition-transport10" with any of the following names:

ignition-transport10Config.cmake
ignition-transport10-config.cmake

Add the installation prefix of "ignition-transport10" to CMAKE_PREFIX_PATH
or set "ignition-transport10_DIR" to a directory containing one of the
above files. If "ignition-transport10" provides a separate development
package or SDK, be sure it has been installed.


Failed <<< ros_ign_gazebo [2.47s, exited with code 1]
Aborted <<< ros_ign_interfaces [3.17s]

Summary: 0 packages finished [5.16s]
1 package failed: ros_ign_gazebo
1 package aborted: ros_ign_interfaces
1 package had stderr output: ros_ign_gazebo
20 packages not processed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.