0
$\begingroup$

I created and ran a urdf file by combining several examples.

When simply launched to view in rviz, tf_tree was produced normally.

However, since I added a controller and output it to joint_state_broadcaster,

It was confirmed that tf_tree was split.

Below is the tf_tree structure.

enter image description here

enter image description here

What more is needed to determine the cause of this data?

add1) Additionally, it wasn't completely non-functional. As a result of modifying the joint to fixed, it was confirmed that it was connected normally. So, I believe this is not a urdf problem. What's the problem?

add2) /static_tf msgs are found and I cannot see anything in /tf

add 3)) From ros2 topic echo /joint_states I got this msgs enter image description here

$\endgroup$

1 Answer 1

0
$\begingroup$

I think you have misunderstood how TF are supposed to work. Normally, the frames you can see in the TF tree, are the equivalent of the links that you have defined inside your URDF. In URDF format, you connect links through joints, specifying the type of the joint used. In TF, you do this by publishing transforms from one frame to another. You could publish yourself the tfs from each frame and it would work, but luckily, you have some packages to help you with that.

For static transformations (which are the equivalent to fixed joints) you can use robot_state_publisher. For non static ones, like a revolute joint, robot_state_publisher can't determine the state of that joint only reading the URDF data, so you need something else. One solution could be joint_state_publisher which searches which joints are not type fixed, and let's you change their state using its GUI. But in reality, you won't be the one controlling the joint, but any controller you use for it. Then, it would be that controller the one which should be publishing the tf representing that joint in the /tf topic.

It would be great if you could tell us what is the purpose of that TF and what are you trying to do.

If I didn't explain correctly, please do not hesitate to ask again and I will try to edit my answer.

$\endgroup$
5
  • $\begingroup$ First of all, thank you for understanding the concept. To summarize, the controller issues tf. It`s right? What I want is to operate the robot arm, and in this question, it was to activate ros2_control for operation. Considering that the controller is only responsible for delivering the content and not the content, is the following conclusion correct? What I need to check is what is being output through the controller node. Am I right $\endgroup$
    – ertretff
    Commented Mar 21 at 23:53
  • $\begingroup$ It was a bit confusing but I think I have managed to understand it. I don't know why you would like to have a tf stablished between your arm and the box you are trying to reach with it. Do you have some kind of AR tags that detect the relative pose from one frame to another? I encourage you to check the ros2_control tutorials since I haven't that much experience in order to give you an example using it. $\endgroup$
    – ÁngeLoGa
    Commented Mar 29 at 18:56
  • $\begingroup$ Yes, I are proceeding with this example as a reference. Since several joints must be inserted between two links, the joints are expressed as links, and the links are expressed separately as boxes. $\endgroup$
    – ertretff
    Commented Mar 30 at 8:00
  • $\begingroup$ Also, the problem was simpler than we thought. There was a problem with the expression in urdf, and it was resolved by modifying it. I think the stumbling block was that it was a bit inaccurate. I was able to get this far thanks to your conceptual help. thank you $\endgroup$
    – ertretff
    Commented Mar 30 at 8:02
  • $\begingroup$ Glad you found the solution! Please feel free to ask more questions if needed, and you're welcomed! $\endgroup$
    – ÁngeLoGa
    Commented Mar 31 at 3:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.