0
$\begingroup$

Rosanswers logo

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 = rospy.Time.now()
        goal.target_pose.pose = Pose(Point(pos['x'], pos['y'], 0.000),
                                     Quaternion(quat['r1'], quat['r2'], quat['r3'], quat['r4']))

    # Start moving
        self.move_base.send_goal(goal)

    # 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
        else:
            self.move_base.cancel_goal()

        self.goal_sent = False
        return result

    def shutdown(self):
        if self.goal_sent:
            self.move_base.cancel_goal()
        rospy.loginfo("Stop")
        rospy.sleep(1)

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?


Originally posted by Baumboon on ROS Answers with karma: 206 on 2017-11-27

Post score: 0


Original comments

Comment by IvanV on 2017-11-27:
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.

Comment by Baumboon on 2017-11-27:
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 ?

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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


Originally posted by Martin Peris with karma: 5625 on 2017-12-03

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by Baumboon on 2017-12-04:
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 ?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.