Hi all,
I am trying to create a Plan2Proto as input for Isaac.Navigation.FollowPath and believe I have successfully crafted the proto but cannot seem to input any values that do not return an error generated by
packages/planner/GlobalPlanner.cpp@205: Unknown pose
For quick reference, here’s a rough breakdown of the structure of a Plan2Proto (from https://docs.nvidia.com/isaac/isaac/doc/message_api.html):
Plan2Proto {
# List of poses the robot need to go through
poses @0: List(Pose2dProto) <i>list</i>{
# unit complex number (cos(a), sin(a)) for rotation angle a
rotation @0: SO2dProto {
q @0: Vector2dProto {
x @0: Float64;
y @1: Float64;
}
}
translation @1: Vector2dProto {
x @0: Float64;
y @1: Float64:
}
}
# name of the frame the plan is.
planFrame @1: text;
}
Here’s my C++ code to create and publish the proto:
//create Plan2Proto builder
auto plan = tx_plan().initProto();
//create List<Pose2dProto> builder with n list entries
auto poses = plan.initPoses(1);
//create SO2dProto builder
auto rotation = poses[0].initRotation();
//create Vector2dProto builder
auto q = rotation.initQ();
//set "rotation" x and y values (cos(a), sin(a) for given angle a per documentation)
q.setX(cos(PI));
q.setY(sin(PI));
//create Vector2dProto builder
auto translation = poses[0].initTranslation();
//set "translation" x and y values
translation.setX(5.0);
translation.setY(10.0);
//set "planFrame" (?)
plan.setPlanFrame("follow_path");
//publish Plan2Proto to isaac.navigation.FollowPath
tx_plan().publish();
I suspect that the proto is at least being created and published generally, because I get a distinct and different error if I set the X and Y values (of q) of the rotation both to 0:
./engine/core/math/so2.hpp@47: Direction vector must not be 0
My inclination is to still be suspicious of this strict and obscure format for rotation causing the “Unknown Pose” error, but truthfully it might be anything about my formatting of this proto. Beyond the given documentation above there is not much to go on, or any examples that I can find of its use.
I would appreciate if anyone has any helpful information, for example what purpose “planFrame” is and how this should be used (anything other than the goal_frame I set in isaac.navigation.FollowPath, “follow_path”, yields errors). I have tried a handful of things but can’t get any feedback other than Unknown Pose (and the 2 errors above).
Thanks in advance for any ideas on how to proceed!
- Travis