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

fix: demo launch files #509

Merged
merged 3 commits into from
Dec 18, 2023
Merged

Conversation

TipluJacob
Copy link

This PR attempts to get the demos back running for ros2.
However there are still at least two issues left, for which I can't figure out a solution:

  1. Running ros2 launch moveit_task_constructor_demo pickplace.launch.py crashes with
[pick_place_demo-1] [INFO] [1700128364.444205364] [moveit_task_constructor_demo]: Initializing task pipeline
[pick_place_demo-1] terminate called after throwing an instance of 'rclcpp::exceptions::RCLError'
[pick_place_demo-1]   what():  failed to call rcl_logging_rosout_add_sublogger: The entry of logger 'planning_scene_interface_94074067662208' not exist., at ./src/rcl/logging_rosout.c:438
[pick_place_demo-1] Stack trace (most recent call last):
[pick_place_demo-1] #17   Object "", at 0xffffffffffffffff, in 
[pick_place_demo-1] #16   Object "/workspace_moveit2/install/moveit_task_constructor_demo/lib/moveit_task_constructor_demo/pick_place_demo", at 0x558f524b8aa4, in _start
[pick_place_demo-1] #15   Source "../csu/libc-start.c", line 392, in __libc_start_main_impl [0x7fd9a83e5e3f]
[pick_place_demo-1] #14   Source "../sysdeps/nptl/libc_start_call_main.h", line 58, in __libc_start_call_main [0x7fd9a83e5d8f]
[pick_place_demo-1] #13   Object "/workspace_moveit2/install/moveit_task_constructor_demo/lib/moveit_task_constructor_demo/pick_place_demo", at 0x558f524b822b, in main
[pick_place_demo-1] #12   Object "/workspace_moveit2/install/moveit_task_constructor_demo/lib/libmoveit_task_constructor_demo_pick_place_task.so", at 0x7fd9a8acd9ed, in moveit_task_constructor_demo::PickPlaceTask::init(std::shared_ptr<rclcpp::Node> const&, pick_place_task_demo::Params const&)
[pick_place_demo-1] #11   Object "/workspace_moveit2/install/moveit_task_constructor_core/lib/libmoveit_task_constructor_core.so", at 0x7fd9a8237eee, in moveit::task_constructor::Task::loadRobotModel(std::shared_ptr<rclcpp::Node> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
[pick_place_demo-1] #10   Object "/workspace_moveit2/install/moveit_ros_planning/lib/libmoveit_robot_model_loader.so.2.8.0", at 0x7fd9a798f159, in robot_model_loader::RobotModelLoader::RobotModelLoader(std::shared_ptr<rclcpp::Node> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)
[pick_place_demo-1] #9    Object "/workspace_moveit2/install/moveit_core/lib/libmoveit_utils.so.2.8.0", at 0x7fd9a7906aa4, in moveit::makeChildLogger(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
[pick_place_demo-1] #8    Object "/opt/ros/iron/lib/librclcpp.so", at 0x7fd9a89731bf, in rclcpp::Logger::get_child(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
[pick_place_demo-1] #7    Object "/opt/ros/iron/lib/librclcpp.so", at 0x7fd9a894aee8, in rclcpp::exceptions::throw_from_rcl_error(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, rcutils_error_state_s const*, void (*)())
[pick_place_demo-1] #6    Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30", at 0x7fd9a86b21fd, in std::rethrow_exception(std::__exception_ptr::exception_ptr)
[pick_place_demo-1] #5    Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30", at 0x7fd9a86b2276, in std::terminate()
[pick_place_demo-1] #4    Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30", at 0x7fd9a86b220b, in 
[pick_place_demo-1] #3    Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30", at 0x7fd9a86a6b9d, in 
[pick_place_demo-1] #2    Source "./stdlib/abort.c", line 79, in abort [0x7fd9a83e47f2]
[pick_place_demo-1] #1    Source "../sysdeps/posix/raise.c", line 26, in raise [0x7fd9a83fe475]
[pick_place_demo-1] #0  | Source "./nptl/pthread_kill.c", line 89, in __pthread_kill_internal
[pick_place_demo-1]     | Source "./nptl/pthread_kill.c", line 78, in __pthread_kill_implementation
[pick_place_demo-1]       Source "./nptl/pthread_kill.c", line 44, in __pthread_kill [0x7fd9a84529fc]
[pick_place_demo-1] Aborted (Signal sent by tkill() 228047 1000)
  1. Running ros2 launch moveit_task_constructor_demo demo.launch.py won't start properly every once in a while. I can't really figure out why, but sometimes when I try to restart the demo.launch.py, the ros2_control configuration fails with the following log. Nothing else is running in parallel, after shutting down the demo node I checked that no node is left running. Sometimes I can start it 3 times successfully and the 4th time it fails. I can't recognize any pattern and can't tell how to reliably reproduce this error except by restarting the demo.launch.py several times. The log:
[rviz2-1] [INFO] [1700128472.600949651] [rviz2]: Stereo is NOT SUPPORTED
[rviz2-1] [INFO] [1700128472.601087990] [rviz2]: OpenGl version: 4.6 (GLSL 4.6)
[rviz2-1] [INFO] [1700128472.622318177] [rviz2]: Stereo is NOT SUPPORTED
[ros2_control_node-5] [INFO] [1700128472.685067268] [controller_manager]: Loading controller 'panda_hand_controller'
[ros2_control_node-5] [INFO] [1700128472.709730747] [controller_manager]: Loading controller 'joint_state_broadcaster'
[ros2_control_node-5] [INFO] [1700128472.718603311] [controller_manager]: Loading controller 'panda_arm_controller'
[ros2 run controller_manager spawner panda_hand_controller-7] [INFO] [1700128472.731522334] [spawner_panda_hand_controller]: Loaded panda_hand_controller
[ros2_control_node-5] [WARN] [1700128472.733172380] [panda_arm_controller]: [Deprecated]: "allow_nonzero_velocity_at_trajectory_end" is set to true. The default behavior will change to false.
[ros2_control_node-5] [INFO] [1700128472.738693797] [controller_manager]: Configuring controller 'panda_hand_controller'
[ros2_control_node-5] [INFO] [1700128472.738947431] [panda_hand_controller]: Action status changes will be monitored at 20Hz.
[ros2_control_node-5] During ros2_control interface configuration, degrees of freedom is not valid; it should be positive. Actual DOF is 0
[ros2_control_node-5] Warning: class_loader.ClassLoader: SEVERE WARNING!!! Attempting to unload library while objects created by this loader exist in the heap! You should delete your objects before attempting to unload the library or destroying the ClassLoader. The library will NOT be unloaded.
[ros2_control_node-5]          at line 127 in ./src/class_loader.cpp
[ros2_control_node-5] Warning: class_loader.ClassLoader: SEVERE WARNING!!! Attempting to unload library while objects created by this loader exist in the heap! You should delete your objects before attempting to unload the library or destroying the ClassLoader. The library will NOT be unloaded.
[ros2_control_node-5]          at line 127 in ./src/class_loader.cpp
[ros2_control_node-5] Warning: class_loader.ClassLoader: SEVERE WARNING!!! Attempting to unload library while objects created by this loader exist in the heap! You should delete your objects before attempting to unload the library or destroying the ClassLoader. The library will NOT be unloaded.
[ros2_control_node-5]          at line 127 in ./src/class_loader.cpp
[ros2 run controller_manager spawner joint_state_broadcaster-8] [INFO] [1700128472.743998699] [spawner_joint_state_broadcaster]: Loaded joint_state_broadcaster
[ERROR] [ros2_control_node-5]: process has died [pid 228585, exit code 1, cmd '/workspace_ros_control/install/controller_manager/lib/controller_manager/ros2_control_node --ros-args --params-file /tmp/launch_params_h9vvq_lg --params-file /workspace_moveit2/install/moveit_resources_panda_moveit_config/share/moveit_resources_panda_moveit_config/config/ros2_controllers.yaml'].
[ros2 run controller_manager spawner panda_arm_controller-6] [INFO] [1700128472.762117397] [spawner_panda_arm_controller]: Loaded panda_arm_controller
[rviz2-1] [WARN] [1700128472.796616701] [rcl.logging_rosout]: Publisher already registered for provided node name. If this is due to multiple nodes with the same name then all logs for that logger name will go out over the existing publisher. As soon as any node with that name is destructed it will unregister the publisher, preventing any further logs for that name from being published on the rosout topic.
[rviz2-1] [INFO] [1700128472.833812489] [rviz2.rdf_loader]: Loaded robot model in 0.0307409 seconds
[rviz2-1] [INFO] [1700128472.833888031] [moveit_robot_model.robot_model]: Loading robot model 'panda'...
[rviz2-1] [INFO] [1700128475.202645853] [rviz2.rdf_loader]: Loaded robot model in 0.00696977 seconds
[rviz2-1] [INFO] [1700128475.202734660] [moveit_robot_model.robot_model]: Loading robot model 'panda'...
[rviz2-1] [WARN] [1700128475.221905987] [kdl_parser]: The root link panda_link0 has an inertia specified in the URDF, but KDL does not support a root link with an inertia.  As a workaround, you can add an extra dummy link to your URDF.
[rviz2-1] [INFO] [1700128475.222057801] [moveit_kinematics_base.kinematics_base]: Joint weights for group 'panda_arm': 1 1 1 1 1 1 1
[rviz2-1] [INFO] [1700128475.249241935] [rviz2.planning_scene_monitor]: Starting planning scene monitor
[rviz2-1] [INFO] [1700128475.250804648] [rviz2.planning_scene_monitor]: Listening to '/monitored_planning_scene'

@henningkayser
Copy link
Member

Thank you for these fixes! Issue 1 is probably related to the recent logging refactoring, and is being discussed here as well.

Does 2 always produce the deprecation warning about "allow_nonzero_velocity_at_trajectory_end"? That one is really weird, I'm not sure where it is coming from at first sight.

@henningkayser henningkayser self-assigned this Dec 14, 2023
Copy link
Member

@henningkayser henningkayser left a comment

Choose a reason for hiding this comment

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

I'm pretty sure that the CI failures are unrelated to your changes. I'll see if I can get them resolved quickly. Otherwise, I'll test this locally and get it merged

@henningkayser henningkayser merged commit 32604ad into moveit:ros2 Dec 18, 2023
1 of 4 checks passed
rhaschke pushed a commit to ubi-agni/moveit_task_constructor that referenced this pull request Mar 9, 2024
rhaschke pushed a commit to ubi-agni/moveit_task_constructor that referenced this pull request Mar 10, 2024
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.

2 participants