Open RahmanMifta opened 6 years ago
Likely a duplicate of https://github.com/rosbook/effective_robotics_programming_with_ros/issues/4
Will look into it asap.
I had the same problem and have got it solved.
<gazebo>
<plugin name="skid_steer_drive_controller"....>
...
<robotBaseFrame>base_link</robotBaseFrame>
...
<broadcastTF>0</broadcastTF>
..
</gazebo>
Reasons:
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.
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));
}
Hi, I am learning ros by following "Effective Robotics Programming with ROS" and codes from github. As per the instructions in the book, i have run two launch file (chapter6_configuration_gazebo.launch and move_base.launch) in two separate terminal included in "chpater6_tutorials/launch" folder. But i am facing few errors:
I have attached the screen-shot of error file, tf frames, and rqt_graph.