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

Robot Localization ekf_node: frame ID "camera_imu_optical_frame" does not exist

asked 2022-07-11 10:40:43 -0600

LiquidTurtle1 gravatar image

updated 2022-07-11 16:01:29 -0600

Hello,

I am new to ROS, and I was trying to use ROS2 to implement SLAM with RealSense Camera L515. I tried to search for others with similar issues, but haven't had any success.

Operating System & Version: Linux (Ubuntu 20.04) on Jetpack 5.01

ROS2 Distro: Foxy

Kernel Version: 5.10.65-tegra

Platform: NVIDIA Jetson Xavier NX

I'm working to set up odometry for my robot that utilizes the L515 and its internal imu. I don't have my wheel odometry set up yet, but I wanted to see if I could run the ekf_node from the robot localization package with just the imu first, but I encountered a barrage of warnings when I launched the node in conjunction with the realsense camera node. This message was repeatedly printed in the terminal:

[ekf_node-1] Warning: Invalid frame ID "camera_imu_optical_frame" passed to canTransform argument source_frame - frame does not exist [ekf_node-1] at line 133 in /tmp/binarydeb/ros-foxy-tf2-0.13.13/src/buffer_core.cpp

My ekf.yaml config file is as follows:

### ekf config file
ekf_filter_node:
    ros__parameters:
        frequency: 30.0
        sensor_timeout: 0.1
        two_d_mode: false
        transform_time_offset: 0.0
        transform_timeout: 0.0
        print_diagnostics: true
        debug: false
        debug_out_file: /path/to/debug/file.txt
        publish_tf: true
        publish_acceleration: false
        map_frame: map              # Defaults to "map" if unspecified
        odom_frame: odom            # Defaults to "odom" if unspecified
        base_link_frame: camera_link  # Defaults to "base_link" if unspecified
        world_frame: odom           # Defaults to the value of odom_frame if unspecified

        odom0: example/odom
        odom0_config: [true,  true,  false,
                    false, false, false,
                    false, false, false,
                    false, false, true,
                    false, false, false]
        odom0_queue_size: 2
        odom0_nodelay: false
        odom0_differential: false
        odom0_relative: false
        odom0_pose_rejection_threshold: 5.0
        odom0_twist_rejection_threshold: 1.0

        odom1: example/odom2
        odom1_config: [false, false, true,
                    false, false, false,
                    false, false, false,
                    false, false, true,
                    false, false, false]
        odom1_differential: false
        odom1_relative: true
        odom1_queue_size: 2
        odom1_pose_rejection_threshold: 2.0
        odom1_twist_rejection_threshold: 0.2
        odom1_nodelay: false
        pose0: example/pose
        pose0_config: [true,  true,  false,
                    false, false, false,
                    false, false, false,
                    false, false, false,
                    false, false, false]
        pose0_differential: true
        pose0_relative: false
        pose0_queue_size: 5
        pose0_rejection_threshold: 2.0  # Note the difference in parameter name
        pose0_nodelay: false

        twist0: example/twist
        twist0_config: [false, false, false,
                        false, false, false,
                        true,  true,  true,
                        false, false, false,
                        false, false, false]
        twist0_queue_size: 3
        twist0_rejection_threshold: 2.0
        twist0_nodelay: false

        imu0: camera/imu
        imu0_config: [false, false, false,
                    false,  false,  false,
                    false, false, false,
                    false,  false,  true,
                    true,  false,  false]
        imu0_nodelay: false
        imu0_differential: false
        imu0_relative: true
        imu0_queue_size: 5
        imu0_pose_rejection_threshold: 0.8              # Note the difference in parameter names
        imu0_twist_rejection_threshold: 0.8             #
        imu0_linear_acceleration_rejection_threshold: 0.8  #

        imu0_remove_gravitational_acceleration: true
        use_control: true
        stamped_control: false
        control_timeout: 0.2
        control_config: [true, false, false, false, false, true]
        acceleration_limits: [1.3, 0.0, 0.0, 0.0, 0.0, 3.4]
        deceleration_limits: [1.3, 0.0, 0.0, 0.0, 0.0, 4.5]
        acceleration_gains: [0.8, 0.0, 0.0, 0.0, 0.0, 0.9]
        deceleration_gains: [1.0, 0.0, 0.0, 0.0, 0.0, 1.0]

        process_noise_covariance: [0.05, 0.0,   0.0,    0.0,    0.0,    0.0,    0.0,    0.0,    0.0,    0.0,    0.0,    0.0,    0 ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2022-07-12 04:35:14 -0600

Per Edwardsson gravatar image

The EKF finds the imu data that you want, looks at the transform frame of that imu data, tries to look up where it is located in the world, fails, and warns you. You need to tell the system where your sensors are located. This is done via transforms. I think the method of choice is to provide a URDF for your robot, but I'm not sure. There are tutorials available that you could use.

edit flag offensive delete link more

Comments

I think you are right. Within the ekf config file it says "# make sure something else is generating the odom->base_link transform."

When I publish a static transform it works for 1 frame and the stops, so I should expect a dynamic transform to do the trick.

Thank you!

LiquidTurtle1 gravatar image LiquidTurtle1  ( 2022-07-12 08:54:24 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2022-07-11 08:30:44 -0600

Seen: 240 times

Last updated: Jul 12 '22