小鱼 ROS 2 新书上线!点击链接查看, 新书配套视频点击链接查看。
提问前必看的发帖注意事项—— 提问前必看!不符合要求的问题拒绝回答!!
社区使用指南—如何添加标签修改密码
运行自己编写的代码时出现Could not find parameter robot_description_semantic and did……问题
-
@空白
robot_description
包你运行了吗?我研究的不深,一般机械臂的模型参数都是那个包发布的 -
@Lorry 包都是可以正常运行的,效果就是启动了RViz,然后可以使用界面进行控制,查看参数的时候也可以找到robot_description和robot_description_semantic的对应描述,参数文件在launch里面有描述,如abb_moveit.launch.py
robot_description_content = Command( [ PathJoinSubstitution([FindExecutable(name="xacro")]), " ", PathJoinSubstitution( [FindPackageShare(support_package), "urdf", robot_xacro_file] ), ] ) robot_description = {"robot_description": robot_description_content} robot_description_semantic_content = Command( [ PathJoinSubstitution([FindExecutable(name="xacro")]), " ", PathJoinSubstitution( [FindPackageShare(moveit_config_package), "config", moveit_config_file] ), ] )
具体的细节我也不是特别了解,所以也不确定哪里出问题了
-
@空白 感觉有两个解决思路,一个就是在代码部分加上参数声明,一个就是改launch文件配置,但是两个都不是特别会
-
@Lorry 我刚刚在chatgpt上面找到了一个可能的思路,就是我moveit提供的机器人描述信息是通过运行节点时输入参数获得的,然后我在启动自己的节点包时可能这种方法会找不到描述信息
-
@空白 我之前看一个moveit2的包,他其中的机械臂描述文件通过robot_description包发布出去
-
@空白 用rviz2中的moveit插件手动拖拉规划是正常的吗,如果有robot_description可以尝试做一个重映射
将move_group_interface_tutorial节点robot_description_semantic重映射为robot_description
-
@小鱼 小鱼你好,手动拖拉是可以的,也能正常规划,我在param get 里面发现move_group的publish_robot_description的值是无not set,会不会是因为move_group没有发布robot_description的相关内容?
-
@空白 因为我发现其他能用move_group控制的这个参数是bool值true
-
@空白 有这个可能,没理解错这个值设成true的意思才是发布robot__description,你可以到配置文件找找这个参数,改改看
-
@小鱼 将semantic重映射的原理是什么呢,我在设置里面semantic对应的是srdf模型,对应的是动作组机械臂,而robot_description是用的urdf,对应的是机械臂模型
-
@小鱼 因为我重新改了launch文件,urdf文件都还是报一样的错误,只有觉得是参数的问题了
-
@空白 从你的参数这块入手,重映射方法要先确保robot_description是正常的才行,你可以通过ros2 topic echo /robot_description看看
-
@小鱼 我用ros2 param get robot_description得到的内容是正确的,同理robot_description_semantic内容也是正确的
-
@小鱼 这个重映射是为什么呢?因为在我的理解范围内两者并不是同一个内容
-
@空白 这应该都是机械臂的描述文件吧,看具体的错误是没有订阅到数据,不是通过参数传递的,而是话题,所以你应该检查话题
@空白 在 运行自己编写的代码时出现Could not find parameter robot_description_semantic and did……问题 中说:
did not receive robot_description_semantic via std_msgs::msg::String subscription within 10.000000 seconds.
-
@小鱼 我好像没有发布和订阅相关的话题 在后面用panda机械臂对比的时候也是,我理解中应该是调用move_group给节点的时候自动发布和订阅了这个话题吧?
-
@空白 有可能,这两天比较忙,抽空看看moveit源码这个话题到底用来干啥的
-
@小鱼 嗯嗯,辛苦小鱼了,我明天再尝试下反馈结果
-
@空白 好的,保持沟通,应该不是大问题
-
@小鱼 小鱼,我改了publish_robot_description后问题更大了,连节点启动move_group都出问题了
[robot_state_publisher-4] Error: No name given for the robot. [robot_state_publisher-4] at line 118 in ./urdf_parser/src/model.cpp [robot_state_publisher-4] Failed to parse robot description using: urdf_xml_parser/URDFXMLParser [robot_state_publisher-4] terminate called after throwing an instance of 'std::runtime_error' [robot_state_publisher-4] what(): Unable to initialize urdf::model from robot description [rviz2-2] Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway. [move_group-1] [WARN] [1670671365.891849812] [move_group.move_group]: Falling back to using the the move_group node namespace (deprecated behavior). [move_group-1] Error: No name given for the robot. [move_group-1] at line 118 in ./urdf_parser/src/model.cpp [move_group-1] Failed to parse robot description using: urdf_xml_parser/URDFXMLParser [move_group-1] [INFO] [1670671365.916302193] [moveit_rdf_loader.rdf_loader]: Unable to parse URDF [move_group-1] [ERROR] [1670671365.927268512] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: Robot model not loaded [move_group-1] [ERROR] [1670671365.927441140] [moveit.ros_planning_interface.moveit_cpp]: Planning scene not configured [move_group-1] [FATAL] [1670671365.927454969] [moveit.ros_planning_interface.moveit_cpp]: Unable to configure planning scene monitor [move_group-1] terminate called after throwing an instance of 'std::runtime_error' [move_group-1] what(): Unable to configure planning scene monitor [move_group-1] Stack trace (most recent call last): [move_group-1] #12 Object "", at 0xffffffffffffffff, in [move_group-1] #11 Object "/home/pan/moveit2_ws/install/moveit_ros_move_group/lib/moveit_ros_move_group/move_group", at 0x5637b9e6aea4, in _start [move_group-1] #10 Source "../csu/libc-start.c", line 392, in __libc_start_main_impl [0x7f67aac07e3f] [move_group-1] #9 Source "../sysdeps/nptl/libc_start_call_main.h", line 58, in __libc_start_call_main [0x7f67aac07d8f] [move_group-1] #8 Object "/home/pan/moveit2_ws/install/moveit_ros_move_group/lib/moveit_ros_move_group/move_group", at 0x5637b9e6a1e3, in main [move_group-1] #7 Object "/home/pan/moveit2_ws/install/moveit_ros_planning/lib/libmoveit_cpp.so.2.5.4", at 0x7f67ab5cc11b, in moveit_cpp::MoveItCpp::MoveItCpp(std::shared_ptr<rclcpp::Node> const&, moveit_cpp::MoveItCpp::Options const&) [clone .cold] [move_group-1] #6 Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30", at 0x7f67aaed4517, in __cxa_throw [move_group-1] #5 Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30", at 0x7f67aaed42b6, in std::terminate() [move_group-1] #4 Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30", at 0x7f67aaed424b, in [move_group-1] #3 Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30", at 0x7f67aaec8bbd, in [move_group-1] #2 Source "./stdlib/abort.c", line 79, in abort [0x7f67aac067f2] [move_group-1] #1 Source "../sysdeps/posix/raise.c", line 26, in raise [0x7f67aac20475] [move_group-1] #0 | Source "./nptl/pthread_kill.c", line 89, in __pthread_kill_internal [move_group-1] | Source "./nptl/pthread_kill.c", line 78, in __pthread_kill_implementation [move_group-1] Source "./nptl/pthread_kill.c", line 44, in __pthread_kill [0x7f67aac74a7c] [move_group-1] Aborted (Signal sent by tkill() 2895 1000) [rviz2-2] [INFO] [1670671366.652270025] [rviz2]: Stereo is NOT SUPPORTED [rviz2-2] [INFO] [1670671366.652369356] [rviz2]: OpenGl version: 4.3 (GLSL 4.3) [rviz2-2] [INFO] [1670671366.665326153] [rviz2]: Stereo is NOT SUPPORTED [rviz2-2] Warning: class_loader.impl: SEVERE WARNING!!! A namespace collision has occurred 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-2] at line 253 in /opt/ros/humble/include/class_loader/class_loader/class_loader_core.hpp [ERROR] [robot_state_publisher-4]: process has died [pid 2901, exit code -6, cmd '/opt/ros/humble/lib/robot_state_publisher/robot_state_publisher --ros-args -r __node:=robot_state_publisher --params-file /tmp/launch_params_srky38s1']. [ERROR] [move_group-1]: process has died [pid 2895, exit code -6, cmd '/home/pan/moveit2_ws/install/moveit_ros_move_group/lib/moveit_ros_move_group/move_group --ros-args --params-file /tmp/launch_params_cz20p03m --params-file /tmp/launch_params_ct3y8_i6 --params-file /tmp/launch_params_0ortefko --params-file /tmp/launch_params_t6ts9z45 --params-file /tmp/launch_params_camlgkvc --params-file /tmp/launch_params_2sclyplm --params-file /tmp/launch_params_qhbrrs6c']. [rviz2-2] [ERROR] [1670671369.787600339] [moveit_ros_visualization.motion_planning_frame]: Action server: /recognize_objects not available [rviz2-2] [INFO] [1670671369.798753966] [moveit_ros_visualization.motion_planning_frame]: MoveGroup namespace changed: / -> . Reloading params. [rviz2-2] Error: No name given for the robot. [rviz2-2] at line 118 in ./urdf_parser/src/model.cpp [rviz2-2] Failed to parse robot description using: urdf_xml_parser/URDFXMLParser [rviz2-2] [INFO] [1670671369.858143117] [moveit_rdf_loader.rdf_loader]: Unable to parse URDF [rviz2-2] [ERROR] [1670671369.864293830] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: Robot model not loaded r
具体原因不知道为啥,不过我看moveit2_tutorials里面关于robot_model部分确实是需要设置publish_robot_description部分的,现在基本上部分功能包废掉了,打算重新弄个