# ROS subscriber or action listener node on UR for geometry msg twist

**URL:** <https://forum.universal-robots.com/t/ros-subscriber-or-action-listener-node-on-ur-for-geometry-msg-twist/5976>\
**Category:** ROS\
**Created:** [January 3, 2020, 1:24pm UTC](https://forum.universal-robots.com/t/ros-subscriber-or-action-listener-node-on-ur-for-geometry-msg-twist/5976 "2020-01-03T13:24:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon32514704](https://avatars.discourse-cdn.com/v4/letter/a/e79b87/32.png) [@anon32514704](https://forum.universal-robots.com/u/anon32514704)\
**Post date:** [January 3, 2020, 1:24pm UTC](https://forum.universal-robots.com/t/ros-subscriber-or-action-listener-node-on-ur-for-geometry-msg-twist/5976/1 "2020-01-03T13:24:28Z")

</div>

My goal is to make the UR3e react to the movement of a MPU9250 (gyroscop, accelerometer and magnetometer hooked up to an arduino) If possible I would like the robots tool center point to mimic the motion of the MPU9250 in 3D space. I do not have a Gripper or tool attached to the Robot, I would like to move the position and orientation of the wrist though.

I followed enough tutorials to be able to run a ROS node on the Arduino to process data from the gyroscope and send TF data or gemometry\_msgs to Turtlesim. (The turtle moves when the gyroscop is moved)

I have installed ROS melodic, RosIndustrial and the Universal\_Robots\_ROS\_Driver driver. The github instructions for establishing communication via ethernet worked. (ROS can “ping” the robot) Unfortunately I have no idea how to translate the 2D simulation into actual robot movements.

- How do I write a basic subscriber node or action listener to run on the UR? (Are there any tutorials or demos about this? )
- Do I need some special algorythms to translate geometry\_msgs to the pose of the UR?
- Are there some good functions, libraries or frameworks for me to look into?

I’m a s student (Junior) working on my bachelors degree in software engineering. This project is part of my internship with a robotics departement in an actual company. I’m new to ROS and this is my first time working with an UR robot. I would ask my co workers if they had experience working with UR and ROS.

---

<div class="post-metadata">

**Author:** ![mauch](https://avatars.discourse-cdn.com/v4/letter/m/71e660/32.png) [@mauch](https://forum.universal-robots.com/u/mauch)\
**Post date:** [January 7, 2020, 11:12am UTC](https://forum.universal-robots.com/t/ros-subscriber-or-action-listener-node-on-ur-for-geometry-msg-twist/5976/2 "2020-01-07T11:12:31Z")

</div>

The interesting part is to generate motion commands from this TF data. From your generated pose you would have to derive a valid joint command (as we are currently only supporting commands in joint space) and send this to the robot.

However, as we use ROS-Control in the driver you can use other ROS-Controllers with the driver, as well. For instance, there is the [cartesian\_controllers](https://github.com/fzi-forschungszentrum-informatik/cartesian_controllers) package maintained by a colleague which does exactly that. You would have to add this package to your workspace, recompile and setup the respective controllers as explained in the package’s documentation.
