neobotix / neo_simulation2

ROS 2 simulation packages for the Neobotix robots
MIT License
20 stars 11 forks source link

Issue with navigate through poses #78

Open VineetTambe opened 8 months ago

VineetTambe commented 8 months ago

Hey,

I was trying to use the navigate through poses API with the multi robot simulation (neo_simulation2 branch multi-robot-sim-with-xacro) but when I give the goal the robot does not move from it's position and I see the following error on the Nav2 terminal:

[bt_navigator-14] Warning: Invalid frame ID "base_link" passed to canTransform argument source_frame - frame does not exist

I am not really sure where the "base_link" is specified as all the params in the config have robotX/base_link (using the same configs as here)

This is the command I am using to give the pose:

ros2 action send_goal /robot1/navigate_through_poses nav2_msgs/action/NavigateThroughPoses '{ "poses": [ { "header": { "frame_id": "map" }, "pose": { "position": { "x": 2.0, "y": -2.5, "z": 0.0 }, "orientation": { "x": 0.0, "y": 0.0, "z": 0.0, "w": 1.0 } } }, { "header": { "frame_id": "map" }, "pose": { "position": { "x": 3.0, "y": -2.5, "z": 0.0 }, "orientation": { "x": 0.0, "y": 0.0, "z": 0.0, "w": 1.0 } }, "pose": { "position": { "x": 4.0, "y": -2.5, "z": 0.0 }, "orientation": { "x": 0.0, "y": 0.0, "z": 0.0, "w": 1.0 } } } ] }'

I verified that the nav2 stack and the controller server is working as expected by testing it using the following topic call:

ros2 topic pub --once /robot1/goal_pose geometry_msgs/msg/PoseStamped "{header: {stamp: {sec: 0, nanosec: 0}, frame_id: 'map'}, pose: {position: {x: 1.0, y: 2.0, z: 0.0}, orientation: {x: 0.0, y: 0.0, z: 0.0, w: 1.0}}}"

Any help would be appreciated!

padhupradheep commented 8 months ago

Thanks for reporting the issue.

I tested it out too. On a quick glance in the bt_navigator code. I think there is a bug here https://github.com/ros-planning/navigation2/blob/0f72da2690548d94bb7b21a7846c57b37078f515/nav2_bt_navigator/src/bt_navigator.cpp#L170-L172

As you can see in the same file (in the link that I posted), you can see the parameter robot_base_link it's what we also use in our configs.

Also note that, it complains as follows

[bt_navigator-7] [ERROR] [transformPoseInTargetFrame]: No Transform available Error looking up target frame: "base_link" passed to lookupTransform argument source_frame does not exist. 

so need to check the transformPoseInTargetFrame

At the moment, I'm swamped. I'll take a look at it in few days.