Code Monkey home page Code Monkey logo

Comments (2)

huabench avatar huabench commented on July 18, 2024 1

I had the same problem and have got it solved.

  1. check robot model
    for me it is "robot1_description/urdf/robot1_base_04.xacro"
  2. open the xacro file and check gazebo tag (at the bottom of this file)
    what I saw is:
<gazebo>
    <plugin name="skid_steer_drive_controller"....>
    ...
    <robotBaseFrame>base_link</robotBaseFrame>
    ...
    <broadcastTF>0</broadcastTF>
..
</gazebo>
  1. change "base_link" to "base_footprint" and change "0" to "1"

Reasons:

  1. the root link of robot1 is base_footprint, and the correct tf tree should be:

    map -> odom-> base_footprint -> base_link
    

    If "base_link" be the robotBaseFrame, it(base_link) will have two parents(base_footprint and odom), which is invalid.

  2. broadcastTF determines whether skid_steer_drive_controller will publish tf transform between odomFrame and robotBaseFrame.

    Find details in https://github.com/ros-simulation/gazebo_ros_pkgs/blob/kinetic-devel/gazebo_plugins/src/gazebo_ros_skid_steer_drive.cpp

     if (!_sdf->HasElement("broadcastTF")) {
          ... } // if "broadcastTF" is not existed
     else // if "broadcastTF" exsits, get the value
       this->broadcast_tf_ = _sdf->GetElement("broadcastTF")->Get<bool>();
    if (this->broadcast_tf_) { 
        	transform_broadcaster_->sendTransform(
            tf::StampedTransform(base_footprint_to_odom, current_time,
                odom_frame, base_footprint_frame));
        }

from effective_robotics_programming_with_ros.

efernandez avatar efernandez commented on July 18, 2024

Likely a duplicate of #4

Will look into it asap.

from effective_robotics_programming_with_ros.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.