Ask Your Question

Turtlebot with a Map/ devation of Position after drive into an Object

asked 2017-11-27 04:36:48 -0600

Baumboon gravatar image

updated 2017-12-04 05:18:23 -0600

Hello guys,

First of all i use ros Kinetic with gazebo 7.0.i use a python script where my robot drives to points i give him after this i let my Robot drive into that object to see if he can push the object or not.But after he drives into an object the map mess up with the Robot Position. So when i try to let the robot drive back to the beginning he lands somewhere else. Here is my Code for driving near the objects :

 def goto(self, pos, quat):

        # Send a goal
        self.goal_sent = True
    goal = MoveBaseGoal()
    goal.target_pose.header.frame_id = 'map'
    goal.target_pose.header.stamp =
        goal.target_pose.pose = Pose(Point(pos['x'], pos['y'], 0.000),
                                     Quaternion(quat['r1'], quat['r2'], quat['r3'], quat['r4']))

    # Start moving

    # Allow TurtleBot up to 60 seconds to complete task
    success = self.move_base.wait_for_result(rospy.Duration(200)) 

        state = self.move_base.get_state()
        result = False

        if success and state == GoalStatus.SUCCEEDED:
            # We made it!
            result = True

        self.goal_sent = False
        return result

    def shutdown(self):
        if self.goal_sent:

Addionally there is some Code for driving straight into objects. And after trying to push an object he stops and tries to move back to the starting position. The problem here is that there is a little deviation between the robot real position and the position on the map. This deviation causes that the robot don't reach the starting position.

Here is some Code how i bring up my map: First i start:

roslaunch turtlebot_navigation gmapping_demo.launch

i creates a map drive around and save this map. After i done this i run:

 roslaunch turtlebot_gazebo amcl_demo.launch map_file:=/home/<user_name>/turtlebot_custom_maps/tutorial.yaml

Is it possible to recalibrate the map position if the Robot or something else ?

Or is there a solution how i can deal with Wheel slapping in my map so i wont get any deviation?

edit retag flag offensive close merge delete


Avoiding obstacles is one of the main purposes of the navigation stack. You can either change the planner parameters to take less into account the presence of obstacles or you can add an additional custom step to drive yourself the robot towards the object/target. More detail would be nice.

IvanV gravatar image IvanV  ( 2017-11-27 09:47:43 -0600 )edit

I added some informations above can u explain how i can change the planner parameters? As a custom step u mean i can drive near the object and then i drive with a forward command into it ?

Baumboon gravatar image Baumboon  ( 2017-11-27 10:26:58 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2017-12-03 20:31:11 -0600

If I understand correctly what you want is the robot to actually "hit an obstacle" to push it? If that is the case the problem you are experiencing might be wheel slippage. Specially if you are using the simulator.

If the object that you are trying to move is significantly heavier than the Trutlebot or the friction of the object with the floor is too high or the friction of the Turtlebot wheels with the floor is too low, then the wheels will slip and that will cause the localization estimation of the robot to be incorrect. If the slippage is not too big then AMCL might help.

You can confirm the "wheel slippage" theory by using RVIZ to visualize your TF tree, you should notice that when you start Gazebo the /map and /odom frames will be perfectly aligned and will be almost perfectly aligned as the robot moves, but after the robot starts pushing an object the /map and /odom frames will diverge pretty quickly.

I hope this helps

edit flag offensive delete link more


U understand it right that's might be the cass... But this would be very bad for my project I need this functionality to push objects and get the correct position data.

But the problem is I get also position deviation if the robot can push the object. Is there a way to fix this problem ?

Baumboon gravatar image Baumboon  ( 2017-12-04 01:00:05 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2017-11-27 04:36:48 -0600

Seen: 373 times

Last updated: Dec 04 '17