Ask Your Question
1

dwa_local_planner penalize POSITIVE x

asked 2015-06-18 11:25:05 -0500

Rapha811 gravatar image

Hello everyone,

I am currently working in a student project and want to be able to navigate with the youbot from KUKA.

Everything works fine with the dwa_local_planner but in my specific case, I need the robot to drive backwards since the laserscanner is mounted at the back.

I wanted to adapt the source code of the dwa_local_planner to my needs, but I could not find out where the variable 'penalize_negative_x' is used. My plan was to start from there on to penalize POSITIVE x.

I am also quite new to ROS and seem to be a bit helpless. Maybe you can give me some advice, how I can force the dwa_local_planner to drive backwards.

Thanks for your reply and kind regards,

Raphael

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-06-18 11:29:34 -0500

David Lu gravatar image

There are two possible solutions:

1 - Turn the reference frame around so that the back is now the front.

2 - Set your possible x velocities to reflect the possible directions, i.e. /min_vel_x=-1.0 (or whatever) and /max_vel_x to 0.0.

edit flag offensive delete link more

Comments

Ok, so I tried the first solution and got it working, but the robot still moves forward from time to time although he could turn and move backwards, if he prefered it.

So, are negative x really penalized by the dwa_local_planner?

Rapha811 gravatar image Rapha811  ( 2015-06-23 11:00:53 -0500 )edit
1

Yes, this is a general preference to make the robot drive in the way that the sensors are pointed.

David Lu gravatar image David Lu  ( 2015-06-23 11:19:58 -0500 )edit

So, if I tell move_base to use two sensors (one pointing forward, one backwards) the robot will not prefer any direction? This is what i am currently doing. Then I should just remove the sensor pointing forward (it's only a kinect I don't want to be relying on) and the robot should move backwards?

Rapha811 gravatar image Rapha811  ( 2015-06-23 12:34:40 -0500 )edit
1

No. The preference to move forward assumes that you have sensors pointed forward (relative to the reference frame).

David Lu gravatar image David Lu  ( 2015-06-23 14:04:44 -0500 )edit

Okay thanks. I will keep an eye on the robots movement and work with what I got for now.

Rapha811 gravatar image Rapha811  ( 2015-06-24 08:51:15 -0500 )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

2 followers

Stats

Asked: 2015-06-18 11:25:05 -0500

Seen: 192 times

Last updated: Jun 18 '15