ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

[ROS2][Nav2] Nav2 Planner Metrics

asked 2021-06-30 07:25:48 -0600

PHFP gravatar image

updated 2022-02-22 11:08:25 -0600

lucasw gravatar image

Hello,

I am new to ROS and I don't know if this is the right place to ask about this. I did research but I couldn't find anything about how to calculate some planner metrics.

I would like to run a wide variety of planners SmacPlanner, A, Hybrid-A and varying some parameters while measuring the time to obtain the global path and its length. For now, I'm clueless about how to do it.

Additionally, I would like to set the initial pose and the goal pose programmatically so I can guarantee that the start and final poses are always the same. I do not have this precision using rviz commands. I tried publishing to the topic /initialpose with the following command but without success.

ros2 topic pub -1 /initialpose geometry_msgs/PoseWithCovarianceStamped '{ header: {stamp: {sec: 0, nanosec: 0}, frame_id: "map"}, pose: { pose: {position: {x: 10, y: 10.0, z: 00.0}, orientation: {w: 0.1}}, } }' Said that I have the following questions:

Is there a topic that I can subscribe in order to get those metrics (path length and average time to compute global path)? Is the initialpose the correct topic to publish this pose? Which topic can I use to publish the goal pose? I tried the /goal_pose but also without success.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-06-30 17:38:07 -0600

shonigmann gravatar image

To prod you in the right direction, I think you want to use action calls to set the goal pose. ros2 action send_goal /compute_path_to_pose nav2_msgs/action/ComputePathToPose ... seems like what you want. I am not aware of metrics on planning time or path length that are readily available so you may want to dig through the source a bit to see what information is computed already. If you can't find anything, the path message that gets published has a list of waypoints that you could use to approximate path length. Assuming its header is filled out, you should also have access to the timestamp, which you could use to back out how long the planner took.

edit flag offensive delete link more

Question Tools

3 followers

Stats

Asked: 2021-06-30 07:25:48 -0600

Seen: 656 times

Last updated: Jun 30 '21