ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

How do I broadcast multiple static transforms from different objects in the same process? [closed]

asked 2018-12-11 10:41:41 -0600

aPonza gravatar image

As per #310103 I need to broadcast some transforms for a pick&place application. Specifically, I (think I) need:

  • 2 static transforms for my robotic arm, to connect its base_link to the world (skippable, but the problem would remain though) and to have the pose of the center of the fingers in the end effector (last_link -> fingers_center);
  • 1 static transform to connect the mesh origin point of a pickable object to the grasping pose;
  • 1 (normal) transform from world to mesh origin point (which is currently not being broadcast at all, hopefully for the error related to the multiple static transforms);
  • all the transforms from arm base to end effector are handled by robot_state_publisher, so that I don't need to care about.

The problem arises when I publish more than one static transform from the same process, I think. As per #287469 and #261815, the solution should be relatively simple: send all the static transforms in one go, together. This is however infeasible at the moment for two separate design reasons:

  • encapsulation mandates that the robotic arm and the pickable are separate C++ classes managed by a process class which has to contain only the pick&place logic, making the "how" I achieve the result an implementation detail. Returning the TransformStamped messages to the process would violate such a requirement;
  • the pickable is instantiated multiple times, and in a loop, so I would also be continuously republishing unchanged static transforms for the arm with no real reason (more of a logic error than a performance issue, I'm guessing).

Is there a way to therefore accomplish the goal of broadcasting these 3 static transforms with these limitations?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by allenh1
close date 2018-12-12 14:36:16.672404

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-12-11 20:23:34 -0600

tfoote gravatar image

Since you're very constrained you can simply publish whatever transforms you want on a separate channel and then aggregate and republish them all together. You can do this as parts of your existing classes or as a 3rd class in the same process as your existing two.

You can also just publish them as regular frames instead of static ones. It's less efficient but greatly simplifies things. If they are attaching and detaching this is actually slightly more valid if the object is attaching and detaching occasionally, it's not actually a static transform.

edit flag offensive delete link more

Comments

Thanks @tfoote! What do you mean with If they are attaching and detaching this is actually slightly more valid if the object is attaching and detaching occasionally, it's not actually a static transform.? Pickables are attached/detached to/from the arm for collision checking but the static tf ...

aPonza gravatar image aPonza  ( 2018-12-12 01:59:17 -0600 )edit

... represents something internal to the object which won't ever change (i.e. like a link dimensions, unlike a joint position), and that I interpreted as static, whereas the position of the object will change in the world (due to p&p), which leads me to using a (normal) transform there.

aPonza gravatar image aPonza  ( 2018-12-12 02:02:08 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2018-12-11 10:41:41 -0600

Seen: 2,514 times

Last updated: Dec 11 '18