# Using ROS 2 Transforms to Calculate Object Positions - Foxglove

**URL:** <https://discourse.openrobotics.org/t/using-ros-2-transforms-to-calculate-object-positions-foxglove/30020>\
**Category:** ROS General\
**Tags:** ros2\
**Created:** [February 28, 2023, 5:46pm UTC](https://discourse.openrobotics.org/t/using-ros-2-transforms-to-calculate-object-positions-foxglove/30020 "2023-02-28T17:46:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![eshu](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/eshu/32/10287_2.png) [@eshu](https://discourse.openrobotics.org/u/eshu)\
**Post date:** [February 28, 2023, 5:46pm UTC](https://discourse.openrobotics.org/t/using-ros-2-transforms-to-calculate-object-positions-foxglove/30020/1 "2023-02-28T17:46:43Z")

</div>

In the latest tutorial on the [Foxglove blog](https://foxglove.dev/blog), we cover how ROS 2 transforms can help us calculate the position of an object detected by a robot’s sensors – by using the [ROS `tf2` library](http://wiki.ros.org/tf2).

> **[Using ROS 2 Transforms to Calculate Object Positions](https://foxglove.dev/blog/using-ros2-transforms-to-calculate-object-positions)**
>
> Utilize the ROS 2 tf2 library to compute the relative positions of detected objects.

By leveraging the [`tf2` library](http://wiki.ros.org/tf2), you can easily help your robots’ sensors and actuators work better together.

For a reference to all the code covered in this post, check out our [`foxglove/tutorials` GitHub repo](https://github.com/foxglove/tutorials/tree/main/ros2/transforms).

And as always, feel free to comment below or reach out us directly in our [Slack community](https://foxglove.dev/slack) to request a topic for the next tutorial!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex022/uploads/ros/original/3X/b/6/b607ee3cc8e908b1b613bd74a683d749fea635a1.svg) [@system](https://discourse.openrobotics.org/u/system)\
**Post date:** [March 30, 2023, 5:47pm UTC](https://discourse.openrobotics.org/t/using-ros-2-transforms-to-calculate-object-positions-foxglove/30020/2 "2023-03-30T17:47:19Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
