Gazebo | Ignition | Community
Ask Your Question
0

Why does my rviz have no odom in fixed frame?

asked 2021-04-19 02:43:36 -0600

Jony gravatar image

I'm using ros2 to run gazebo-11 and rviz2

In my fixed frame have no odom but only the links that I was defined in urdf file. What should i do to have odom in Fixed Frame

image description

Here is my configuration of libgazebo_ros_diff_drive.so in urdf file

 <gazebo>
        <plugin name="differential_drive_controller" 
                filename="libgazebo_ros_diff_drive.so">
            <ros>
                <!-- Set namespace -->
                <namespace>/</namespace>
                <!-- Remap default topics -->
                <argument>--ros-args --remap cmd_vel:=cmd_vel</argument>
                <argument>--ros-args --remap odom:=odom</argument>
                <update_rate>10.0</update_rate>
            </ros>
            <left_joint>left_wheel_joint</left_joint>                                                                                                                            
            <right_joint>right_wheel_joint</right_joint>
            <rosDebugLevel>Debug</rosDebugLevel>
            <publish_wheel_TF>true</publish_wheel_TF>
            <publish_tf>1</publish_tf>
            <always_on>true</always_on>
            <update_rate>100.0</update_rate>
            <legacy_mode>true</legacy_mode>
            <publish_odom>true</publish_odom>
            <wheel_separation>${wheel_joint_y*2}</wheel_separation>
            <wheel_diameter>${2*wheel_radius}</wheel_diameter>
            <broadcast_TF>1</broadcast_TF>
            <max_wheel_torque>30</max_wheel_torque>
            <max_wheel_acceleration>1.8</max_wheel_acceleration>
            <odometry_frame>odom</odometry_frame>
            <robot_base_frame>base_footprint</robot_base_frame>
        </plugin>

        <plugin name="gazebo_ros_joint_state_publisher"
          filename="libgazebo_ros_joint_state_publisher.so">
            <ros>
              <namespace>/</namespace>
              <argument>--ros-args --remap joint_states:=joint_states</argument>
            </ros>
            <update_rate>100</update_rate>
            <joint_name>left_wheel_joint</joint_name>
            <joint_name>right_wheel_joint</joint_name>
        </plugin>
    </gazebo>
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2021-08-17 18:44:57 -0600

kakcalu13 gravatar image

Hmm...try change this line <robot_base_frame>base_footprint</robot_base_frame>

to <robot_base_frame>base_link</robot_base_frame>

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2021-04-19 02:43:36 -0600

Seen: 2,038 times

Last updated: Aug 17 '21