Skip to content

std::bad_alloc in move_group when launching UR Driver #780

@JoNeckel

Description

@JoNeckel

Description

Overview of your issue here.
I try to start MoveIt with the Universal_Robots_ROS2_Driver, but there is an exception thrown in the move_group node, I tried different Versions of MoveIt and also the Driver and other dependencies. But I am not yet an expert with this and couldn't find a solution.

Your environment

  • ROS Distro: foxy
  • OS Version: e.g. Ubuntu 20.04
  • Source and Binary build (both tested)
  • If binary, which release version? -> what you currently get here: https://moveit.ros.org/install-moveit2/binary/
  • If source, which branch? -> foxy branch

Steps to reproduce

follow the instructions of "Getting Started" and "Using MoveIt" of this Driver for Universal Robots: https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver/tree/foxy

then launching the controllers:
ros2 launch ur_bringup ur_control.launch.py ur_type:=ur5e robot_ip:=yyy.yyy.yyy.yyy use_fake_hardware:=true launch_rviz:=false

and in another Terminal launch MoveIt
ros2 launch ur_bringup ur_moveit.launch.py ur_type:=ur5e robot_ip:="xxx.xxx" use_fake_hardware:=true launch_rviz:=true

Expected behaviour

Rviz should Start with the Universal Robot Arm and you can plan and execute Motions there (without Hardware).
This has been working on Oct 12 but since i rebuilt everything a few days ago, it doesn't work anymore.. even with using an old Version of the Driver, so the Problem has to be somewhere else..

Actual behaviour

Rviz starts, but without a planning library loaded, in the Terminal you get this output:

ros2 launch ur_bringup ur_moveit.launch.py ur_type:=ur5e robot_ip:="xxx.xxx" use_fake_hardware:=true launch_rviz:=true
[INFO] [launch]: All log files can be found below /home/jo/.ros/log/2021-10-28-18-57-00-505520-myubuntu-38988
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [move_group-1]: process started with pid [38995]
[INFO] [mongo_wrapper_ros.py-2]: process started with pid [38997]
[INFO] [rviz2-3]: process started with pid [38999]
[INFO] [static_transform_publisher-4]: process started with pid [39001]
[static_transform_publisher-4] [INFO] [1635440221.371882197] [static_transform_publisher]: Spinning until killed publishing transform from 'world' to 'base_link'
[move_group-1] [WARN] [1635440221.799056047] [move_group.move_group]: MoveGroup launched without ~default_planning_pipeline specifying the namespace for the default planning pipeline configuration
[move_group-1] [WARN] [1635440221.799131393] [move_group.move_group]: Falling back to using the the move_group node namespace (deprecated behavior).
[move_group-1] Parsing robot urdf xml string.
[move_group-1] [INFO] [1635440221.806328362] [moveit_rdf_loader.rdf_loader]: Loaded robot model in 0.00255315 seconds
[move_group-1] [INFO] [1635440221.806395974] [moveit_robot_model.robot_model]: Loading robot model 'ur'...
[move_group-1] terminate called after throwing an instance of 'std::bad_alloc'
[move_group-1]   what():  std::bad_alloc
[mongo_wrapper_ros.py-2] [INFO] [1635440221.848078191] [mongodb]: /tmp/db does not exist; creating it.
[mongo_wrapper_ros.py-2] [INFO] [1635440221.848985167] [mongodb]: Starting mongodb with db location /tmp/db listening on localhost:33829
[mongo_wrapper_ros.py-2] 2021-10-28T18:57:01.895+0200 I CONTROL  [initandlisten] MongoDB starting : pid=39049 port=33829 dbpath=/tmp/db 64-bit host=myubuntu
[mongo_wrapper_ros.py-2] 2021-10-28T18:57:01.895+0200 I CONTROL  [initandlisten] db version v3.6.8
[mongo_wrapper_ros.py-2] 2021-10-28T18:57:01.895+0200 I CONTROL  [initandlisten] git version: 8e540c0b6db93ce994cc548f000900bdc740f80a
[mongo_wrapper_ros.py-2] 2021-10-28T18:57:01.895+0200 I CONTROL  [initandlisten] OpenSSL version: OpenSSL 1.1.1f  31 Mar 2020
[mongo_wrapper_ros.py-2] 2021-10-28T18:57:01.895+0200 I CONTROL  [initandlisten] allocator: tcmalloc
[mongo_wrapper_ros.py-2] 2021-10-28T18:57:01.895+0200 I CONTROL  [initandlisten] modules: none
[mongo_wrapper_ros.py-2] 2021-10-28T18:57:01.895+0200 I CONTROL  [initandlisten] build environment:
[mongo_wrapper_ros.py-2] 2021-10-28T18:57:01.895+0200 I CONTROL  [initandlisten]     distarch: x86_64
[mongo_wrapper_ros.py-2] 2021-10-28T18:57:01.895+0200 I CONTROL  [initandlisten]     target_arch: x86_64
[mongo_wrapper_ros.py-2] 2021-10-28T18:57:01.895+0200 I CONTROL  [initandlisten] options: { net: { port: 33829 }, storage: { dbPath: "/tmp/db" } }
[mongo_wrapper_ros.py-2] 2021-10-28T18:57:01.895+0200 I STORAGE  [initandlisten] 
[mongo_wrapper_ros.py-2] 2021-10-28T18:57:01.895+0200 I STORAGE  [initandlisten] ** WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine
[mongo_wrapper_ros.py-2] 2021-10-28T18:57:01.895+0200 I STORAGE  [initandlisten] **          See http://dochub.mongodb.org/core/prodnotes-filesystem
[mongo_wrapper_ros.py-2] 2021-10-28T18:57:01.895+0200 I STORAGE  [initandlisten] wiredtiger_open config: create,cache_size=7438M,session_max=20000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),cache_cursors=false,compatibility=(release="3.0",require_max="3.0"),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),statistics_log=(wait=0),verbose=(recovery_progress),
[ERROR] [move_group-1]: process has died [pid 38995, exit code -6, cmd '/home/jo/workspace2/ros_ur_driver/install/moveit_ros_move_group/lib/moveit_ros_move_group/move_group --ros-args --params-file /tmp/launch_params_cp1516ff --params-file /tmp/launch_params_5n71vdhp --params-file /tmp/launch_params_n22nlzd8 --params-file /tmp/launch_params_a9tldbh3 --params-file /tmp/launch_params_eu70qffg --params-file /tmp/launch_params_a33px69o --params-file /tmp/launch_params_sl6mfogw'].
[rviz2-3] [INFO] [1635440222.469861788] [rviz2]: Stereo is NOT SUPPORTED
[rviz2-3] [INFO] [1635440222.469966764] [rviz2]: OpenGl version: 4.6 (GLSL 4.6)
[rviz2-3] [INFO] [1635440222.510429606] [rviz2]: Stereo is NOT SUPPORTED
[mongo_wrapper_ros.py-2] 2021-10-28T18:57:02.542+0200 I STORAGE  [initandlisten] WiredTiger message [1635440222:542889][39049:0x7f287f99ff40], txn-recover: Set global recovery timestamp: 0
[mongo_wrapper_ros.py-2] 2021-10-28T18:57:02.606+0200 I CONTROL  [initandlisten] 
[mongo_wrapper_ros.py-2] 2021-10-28T18:57:02.606+0200 I CONTROL  [initandlisten] ** WARNING: Access control is not enabled for the database.
[mongo_wrapper_ros.py-2] 2021-10-28T18:57:02.606+0200 I CONTROL  [initandlisten] **          Read and write access to data and configuration is unrestricted.
[mongo_wrapper_ros.py-2] 2021-10-28T18:57:02.606+0200 I CONTROL  [initandlisten] 
[mongo_wrapper_ros.py-2] 2021-10-28T18:57:02.606+0200 I CONTROL  [initandlisten] ** WARNING: This server is bound to localhost.
[mongo_wrapper_ros.py-2] 2021-10-28T18:57:02.606+0200 I CONTROL  [initandlisten] **          Remote systems will be unable to connect to this server. 
[mongo_wrapper_ros.py-2] 2021-10-28T18:57:02.606+0200 I CONTROL  [initandlisten] **          Start the server with --bind_ip <address> to specify which IP 
[mongo_wrapper_ros.py-2] 2021-10-28T18:57:02.606+0200 I CONTROL  [initandlisten] **          addresses it should serve responses from, or with --bind_ip_all to
[mongo_wrapper_ros.py-2] 2021-10-28T18:57:02.606+0200 I CONTROL  [initandlisten] **          bind to all interfaces. If this behavior is desired, start the
[mongo_wrapper_ros.py-2] 2021-10-28T18:57:02.606+0200 I CONTROL  [initandlisten] **          server with --bind_ip 127.0.0.1 to disable this warning.
[mongo_wrapper_ros.py-2] 2021-10-28T18:57:02.606+0200 I CONTROL  [initandlisten] 
[mongo_wrapper_ros.py-2] 2021-10-28T18:57:02.606+0200 I STORAGE  [initandlisten] createCollection: admin.system.version with provided UUID: 4552777f-823e-4136-b2bb-1aacd8d2735e
[mongo_wrapper_ros.py-2] 2021-10-28T18:57:02.639+0200 I COMMAND  [initandlisten] setting featureCompatibilityVersion to 3.6
[mongo_wrapper_ros.py-2] 2021-10-28T18:57:02.642+0200 I STORAGE  [initandlisten] createCollection: local.startup_log with generated UUID: 3c72c821-80da-4b20-9bba-e83e4e6e8e19
[mongo_wrapper_ros.py-2] 2021-10-28T18:57:02.665+0200 I FTDC     [initandlisten] Initializing full-time diagnostic data capture with directory '/tmp/db/diagnostic.data'
[mongo_wrapper_ros.py-2] 2021-10-28T18:57:02.666+0200 I NETWORK  [initandlisten] waiting for connections on port 33829
[mongo_wrapper_ros.py-2] 2021-10-28T18:57:02.666+0200 I STORAGE  [LogicalSessionCacheRefresh] createCollection: config.system.sessions with generated UUID: 19005eee-9f20-4b16-bbed-95382f026565
[mongo_wrapper_ros.py-2] 2021-10-28T18:57:02.695+0200 I INDEX    [LogicalSessionCacheRefresh] build index on: config.system.sessions properties: { v: 2, key: { lastUse: 1 }, name: "lsidTTLIndex", ns: "config.system.sessions", expireAfterSeconds: 1800 }
[mongo_wrapper_ros.py-2] 2021-10-28T18:57:02.695+0200 I INDEX    [LogicalSessionCacheRefresh] 	 building index using bulk method; build may temporarily use up to 500 megabytes of RAM
[mongo_wrapper_ros.py-2] 2021-10-28T18:57:02.696+0200 I INDEX    [LogicalSessionCacheRefresh] build index done.  scanned 0 total records. 0 secs
[rviz2-3] 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-3]          at line 253 in /opt/ros/foxy/include/class_loader/class_loader_core.hpp
[rviz2-3] [ERROR] [1635440225.780069617] [moveit_ros_visualization.motion_planning_frame]: Action server: /recognize_objects not available
[rviz2-3] Parsing robot urdf xml string.
[rviz2-3] [INFO] [1635440225.891697207] [moveit_rdf_loader.rdf_loader]: Loaded robot model in 0.00228706 seconds
[rviz2-3] [INFO] [1635440225.892683553] [moveit_robot_model.robot_model]: Loading robot model 'ur'...
[rviz2-3] [ERROR] [1635440225.912147061] [moveit_background_processing.background_processing]: Exception caught while processing action 'loadRobotModel': std::bad_alloc

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions