ROBOTIS-GIT / turtlebot3

ROS packages for Turtlebot3
http://turtlebot3.robotis.com
Apache License 2.0
1.52k stars 1.03k forks source link

`static_transform` between `base_link` and `camera` #1003

Open wangzizhe opened 10 months ago

wangzizhe commented 10 months ago
  1. Which TurtleBot3 platform do you use?

    • [x] Waffle Pi
  2. Which ROS is working with TurtleBot3?

    • [x] ROS2 Humble Hawksbill
  3. Which SBC(Single Board Computer) is working on TurtleBot3?

    • [x] Raspberry Pi 4
  4. Which OS you installed on SBC?

    • [x] Ubuntu 22.04 LTS
  5. Which OS you installed on Remote PC?

    • [x] Ubuntu 22.04 LTS

I'm not so much experienced with ROS2 and TurtleBot3, I actually want to know how to find the right value for static_transform between cameraand base_link. Say the value for arguments below.

Node(
    package='tf2_ros',
    executable='static_transform_publisher',
    name='base_link_to_camera_tf',
    # https://navigation.ros.org/setup_guides/transformation/setup_transforms.html
    # http://wiki.ros.org/tf#static_transform_publisher
    # Static TF Publisher (relationship between base link and camera doesn't change in time)
    arguments = ['0.073', '-0.011', '0.084',
                '0.000', '1.571', '0.000',
                'base_link', 'camera']
),

Is there a command which can tell me the values? Or could I find it somewhere? Or should I measure manually with a micrometer?

And how precise should the measurements be?

Could someone give me an explanation? Thanks a lot in advance!

yun-goon commented 2 weeks ago

Hi @wangzizhe Screenshot from 2024-11-07 10-40-17

This image is generated from the turtlebot3_waffle_pi.urdf file. The camera_link is located at x=0.073, y=-0.011, z=0.084 relative to the base_link.

To create a file that shows the positional relationships between each joint and link in the robot, you can use the urdf_to_graphiz command.

Thank you for your question!