How can I make my robot move like a robot with mecanum wheels

asked 2020-04-27 17:27:58 -0600

Alexander1991 gravatar image

Hello dear ROS-people,

I am searching for a week now for a solution i have a robot with 4 mecanum wheels, but any navigation stock i try or use my robot is driving curves, I want to get it to drive mostly straight lines and if it has to go around the corner it should not turn just drive to the side till wall is passed and then drive backwards (of course it should pass the obstacles the same way) (this is a link for a picture about how the wheels are mounted https://www.roboteq.com/images/articl... ) I am in ROS for 2 months, Rviz and Gazebo is showing that my robot moves and i can register laser data but i am stuck here :( I would be very thankful if someone can link a file with the the params i have to use in my move_base, i strongly suggest but maybe i am on a complete false way,

thanks for every answer. (feeling like someone want to chase me with belt trough city, because this must be posted already a thousand times but i can't find it :( ) *running

edit retag flag offensive close merge delete

Comments

Does your robot properly respond to the lateral part (y coordinate) in the twist message, i.e. is it generally capable to move sidewards in gazebo? If no, this should be fixed first. If this is possible, the error is somewhere in the navigation part. What configuration of the local planner are you using? There is a holonomic_robot parameter, see also https://answers.ros.org/question/2274...

Mork gravatar image Mork  ( 2020-04-28 09:47:36 -0600 )edit

thank you, for ur response, this helped me:

DWAPlannerROS:

Robot Configuration Parameters

max_vel_x: 1 min_vel_x: -1

max_vel_y: 1 min_vel_y: -1

The velocity when robot is moving in a straight line

max_trans_vel: 1 min_trans_vel: 1

max_rot_vel: 0.0 min_rot_vel: 0.0

acc_lim_x: 2.5 acc_lim_y: 2.5 acc_lim_theta: 0.0

Goal Tolerance Parametes

xy_goal_tolerance: 0.05 yaw_goal_tolerance: 0.17 latch_xy_goal_tolerance: false

Forward Simulation Parameters

sim_time: 2.0 vx_samples: 20 vy_samples: 0 vth_samples: 40 controller_frequency: 10.0

Trajectory Scoring Parameters

path_distance_bias: 32.0 goal_distance_bias: 20.0 occdist_scale: 0.02 forward_point_distance: 0.325 stop_time_buffer: 0.2 scaling_speed: 0.25 max_scaling_factor: 0.2

Oscillation Prevention Parameters

oscillation_reset_dist: 0.05

Debugging

publish_traj_pc : true publish_cost_grid_pc: true

Alexander1991 gravatar image Alexander1991  ( 2020-04-28 14:55:29 -0600 )edit

and: <arg name="move_forward_only" default="false"/>

in my move.launch file

Alexander1991 gravatar image Alexander1991  ( 2020-04-28 14:56:43 -0600 )edit

so i am able to drive in y.

But ist there a opportunity to make a rectangle trajectory and not curved.?

Actually I would like also have the possibility to run my robot, it should follow a line with corners and at every corner turn 90° degrees to have it look always in the way the path is going.

Alexander1991 gravatar image Alexander1991  ( 2020-04-28 15:03:43 -0600 )edit