<ActionID="ClearCostmapExceptRegion"> <input_portname="service_name">Service name</input_port> <input_portname="server_timeout">Server timeout</input_port> <input_portname="reset_distance">Distance from the robot above which obstacles are cleared</input_port> </Action>
<ActionID="ClearCostmapAroundRobot"> <input_portname="service_name">Service name</input_port> <input_portname="server_timeout">Server timeout</input_port> <input_portname="reset_distance">Distance from the robot under which obstacles are cleared</input_port> </Action>
编译nav2_costmap_2d后,直接运行ros2 run nav2_costmap_2d nav2_costmap,结果报错
1
[pluginlib.ClassLoader]: Skipped loading plugin with error: XML Document '/home/user/project/install/nav2_costmap_2d/share/nav2_costmap_2d/costmap_plugins.xml' has no Root Element. This likely means the XML is malformed or missing..
[ERROR] [1754535646.216247848] [nav2_node]: "global_costmap/clear_entirely_global_costmap" service server not available after waiting for1.00s [nav2_node-1] terminate called after throwing an instance of 'std::length_error' [nav2_node-1] what(): basic_string::_M_create
可以把 BtServiceNode构造函数的throw一行删掉,这样即使没有服务端,也不会报错
Action和service_name不符合,加载行为树会报错
1
what(): could not create client: create_client() called for existing request topic name rq/global_costmap/clear_entirely_global_costmapRequest with incompatible type navit_msgs::srv::dds_::ClearEntireCostmap_Request_, at ./src/rmw_client.cpp:165, at ./src/rcl/client.c:146
ros2 param describe /turtlesim background_r Parameter name: background_r Type: integer Description: Red channel of the background color Constraints: Min value: 0 Max value: 255 Step: 1
ros2 param get node_name parameter_name
1 2
ros2 param get /turtlesim background_r Integer value is: 69
nvidia@ubuntu:~$ ros2 action send_goal /turtle1/rotate_absolute turtlesim/action/RotateAbsolute "{theta: 1.57}" Waiting for an action server to become available... Sending goal: theta: 1.57 Goal accepted with ID: 5cd8eb561348477abbb532fc816ce792
# 执行 git status 的结果 On branch master Your branch and 'origin/master' have diverged, and have 5 and 21 different commits each, respectively. (use "git pull" to merge the remote branch into yours)