microsoft / azure_spatial_anchors_ros

ROS wrapper for the Azure Spatial Anchors Linux SDK, allowing robots (and other devices with vision-based sensors) to co-localize with other robots, AR-enabled phones, and Hololens devices.
https://azure.microsoft.com/en-us/services/spatial-anchors/
MIT License
87 stars 20 forks source link

Added target frame to CreateAnchor req #18

Closed jeffdelmerico closed 3 years ago

jeffdelmerico commented 3 years ago

Anchors can now be created relative to an arbitrary target frame, and the transform given in the service call is used with the target frame pose in the world frame (looked up from TF at the time of creation) to compute the anchor_in_world_frame transformation. Defaults to expected behavior of placing the anchor at the world frame origin if target_frame is not provided.

jeffdelmerico commented 3 years ago

The fallback behavior when the target frame is not found now does not just create the anchor relative to the world frame, and instead prints an error that the target frame was not found and the anchor was not created. The transform for the target frame is also now looked up based on the timestamp of the last processed frame, rather than ros::Time::now(), which would require slightly different usage in the launch file when playing back rosbags and dealing with simulated time.