‘Failed to fetch current robot state‘ when using the ‘plan_kinematic_path‘ service #868

https://github.com/ros-planning/moveit/issues/868icon-default.png?t=M4ADhttps://github.com/ros-planning/moveit/issues/868

avoelz
 
commented on 27 Apr 2018

Description

The 'plan_kinematic_path' service requires at least one second computation time and outputs the message 'Failed to fetch current robot state'. The issue has been introduced by the pull request #350 and the new line

+  // before we start planning, ensure that we have the latest robot state received...
+  context_->planning_scene_monitor_->waitForCurrentRobotState(ros::Time::now());

in moveit_ros/move_group/src/default_capabilities/plan_service_capability.cpp
While processing the computePlanService, the current state monitor is not able to process the incoming joint states in the callback function planning_scene_monitor::CurrentStateMonitor::jointStateCallback. Therefore waitForCurrentRobotState always waits until the maximum allowed time (by defaul 1 second) has passed and prints the error message 'Failed to fetch current robot state'.
The problem can be solved by adding a second spinning thread, i.e.

ros::AsyncSpinner spinner(2);

in moveit_ros/move_group/src/move_group.cpp. However, I do not know if this would introduce new problems at other places. Note that the problem does not exist with the MoveGroupMoveAction capability because the action server does not block the spinning thread.

Your environment

Steps to reproduce

I have added some debug print statements to highlight the issue, see the diff, then run

roslaunch *_moveit_config demo.launch
for an arbitrary robot model with move_group/MoveGroupPlanService capability enabled

rosservice call /plan_kinematic_path "motion_plan_request: ..."
for an arbitrary motion plan request

Expected behaviour

Service plan_kinematic_path returns in few milliseconds with output similar to

[ INFO] [1524824641.260897825]: planning_scene_monitor::CurrentStateMonitor::jointStateCallback
[ INFO] [1524824641.460614270]: planning_scene_monitor::CurrentStateMonitor::jointStateCallback
[ INFO] [1524824641.660500520]: planning_scene_monitor::CurrentStateMonitor::jointStateCallback
[ INFO] [1524824641.790221505]: Received new planning service request...
[ INFO] [1524824641.860544618]: planning_scene_monitor::CurrentStateMonitor::jointStateCallback
[ERROR] [1524824641.861405290]: No group specified to plan for
[ INFO] [1524824641.861477559]: Elapsed time: 0.071 s
[ INFO] [1524824642.060578465]: planning_scene_monitor::CurrentStateMonitor::jointStateCallback
[ INFO] [1524824642.260910956]: planning_scene_monitor::CurrentStateMonitor::jointStateCallback
[ INFO] [1524824642.461013625]: planning_scene_monitor::CurrentStateMonitor::jointStateCallback

Actual behaviour

Service plan_kinematic_path returns after approximately one second with output similar to

[ INFO] [1524824543.477195149]: planning_scene_monitor::CurrentStateMonitor::jointStateCallback
[ INFO] [1524824543.577266157]: planning_scene_monitor::CurrentStateMonitor::jointStateCallback
[ INFO] [1524824543.776860643]: planning_scene_monitor::CurrentStateMonitor::jointStateCallback
[ INFO] [1524824543.811930327]: Received new planning service request...
[ INFO] [1524824544.812130689]: Didn't received robot state (joint angles) with recent timestamp within 1 seconds.
Check clock synchronization if your are running ROS across multiple machines!
[ WARN] [1524824544.812195049]: Failed to fetch current robot state.
[ERROR] [1524824544.813068385]: No group specified to plan for
[ INFO] [1524824544.813148931]: Elapsed time: 1.001 s
[ INFO] [1524824544.813359534]: planning_scene_monitor::CurrentStateMonitor::jointStateCallback
[ INFO] [1524824544.976705795]: planning_scene_monitor::CurrentStateMonitor::jointStateCallback
[ INFO] [1524824545.077333781]: planning_scene_monitor::CurrentStateMonitor::jointStateCallback

One can see that in the second case the jointStateCallback is not exe

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
这个错误是指在启动路由时遇到了一个意外的错误,具体是"TypeError: Failed to fetch dynamically imported module",它表明在动态导入模块时发生了错误。 这个错误通常是由网络请求问题引起的,可能是因为请求的模块不存在或无法访问。你可以检查一下网络连接是否正常,并确保所请求的模块路径是正确的。另外,还可以尝试重新启动应用程序或尝试使用其他网络环境来解决这个问题。 另外,如果你在使用Vue Router时遇到这个错误,可能是因为导入的组件文件路径不正确或文件不存在。你可以检查一下导入的组件路径是否正确,并确保文件存在。 总结起来,"Unexpected error when starting the router: TypeError: Failed to fetch dynamically imported module"错误是由动态导入模块时发生的网络请求问题引起的,可能是模块路径不正确或文件不存在。你可以检查网络连接、模块路径和文件是否存在来解决这个问题。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [setup语法糖报错 vue-router.mjs:3451 TypeError: Failed to fetch dynamically imported module:](https://blog.csdn.net/m0_53703061/article/details/129941053)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *2* *3* [vue 路由报错](https://blog.csdn.net/weixin_44728473/article/details/125631845)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值