Robot can't reach goal and keep rotate endless
Hi all,
I have some trouble implementing the navigation stack for one omnidirectional robot. The transfornation -and Odom publisher are done and work fine. I have read Navigation Tutorial and i have adjusted my files so that the application could operate without a static map. So when I launched my files and start sending a goal, the robot rotate endless.
Has anyone an idea about this issue? Here ist my setup for the navigation Stack:
Base local planner:
TrajectoryPlannerROS:
max_vel_x: 50
min_vel_x: 10
max_rotational_vel: 0.1
min_in_place_rotational_vel: 0.1
acc_lim_theta: 0.6
acc_lim_x: 2.5
acc_lim_y: 2.5
holonomic_robot: true
meter_scoring: true
Coastmap common:
obstacle_range: 2.5
raytrace_range: 3.0
footprint: [ [0.37, 0.33], [-0.37, 0.33], [-0.37, -0.33], [0.37, -0.33] ]
#footprint_padding: 0.01
inflation_radius: 0.55
observation_sources: laser_scan_sensor
laser_scan_sensor: {sensor_frame: /base_laser_front_link, data_type: LaserScan, topic: scan_front, marking: true, clearing: true}
Global coastmap:
global_costmap:
global_frame: map
robot_base_frame: base_link
update_frequency: 0.4
static_map: false
rolling_window: true
width: 3.0
height: 3.0
resolution: 0.005
origin_x: -1.5
origin_y: -1.5
Local coastmap:
local_costmap:
global_frame: odom
robot_base_frame: base_link
update_frequency: 0.4
publish_frequency: 2.0
static_map: false
rolling_window: true
width: 3.0
height: 3.0
resolution: 0.01
origin_x: -1.5
origin_y: -1.5
Move base:
<launch>
<node pkg="gmapping" type="slam_gmapping" name="slam_gmapping" >
<remap from="scan" to="scan_front" />
<param name="map_update_interval" value="0.2" />
</node>
<node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
<param name="controller_frequency" value="0.8"/>
<rosparam file="$(find miagy_2dnav)/costmap_common_params.yaml" command="load" ns="global_costmap" />
<rosparam file="$(find miagy_2dnav)/costmap_common_params.yaml" command="load" ns="local_costmap" />
<rosparam file="$(find miagy_2dnav)/local_costmap_params.yaml" command="load" />
<rosparam file="$(find miagy_2dnav)/global_costmap_params.yaml" command="load" />
<rosparam file="$(find miagy_2dnav)/base_local_planner_params.yaml" command="load" />
</node>
</launch>
Source file to send a goal:
#include <ros/ros.h>
#include <move_base_msgs/MoveBaseAction.h>
#include <actionlib/client/simple_action_client.h>
typedef actionlib::SimpleActionClient<move_base_msgs::MoveBaseAction> MoveBaseClient;
int main(int argc, char** argv){
ros::init(argc, argv, "simple_navigation_goals");
//tell the action client that we want to spin a thread by default
MoveBaseClient ac("move_base", true);
//wait for the action server to come up
while(!ac.waitForServer(ros::Duration(5.0))){
ROS_INFO("Waiting for the move_base action server to come up");
}
move_base_msgs::MoveBaseGoal goal;
//we'll send a goal to the robot to move 1 meter forward
goal.target_pose.header.frame_id = "base_link";
goal.target_pose.header.stamp = ros::Time::now();
goal.target_pose.pose.position.x = 1.0;
goal.target_pose.pose.orientation.w = 1.0;
ROS_INFO("Sending goal");
ac.sendGoal(goal);
ac.waitForResult();
if(ac.getState() == actionlib::SimpleClientGoalState::SUCCEEDED)
ROS_INFO("Hooray, the base moved 1 meter forward");
else
ROS_INFO("The base failed to move forward 1 meter for some reason");
return 0;
}
Any help will be appreciate. Thanks
I have exactly the same problem with the navigation stack. Did you solve it? Thanks.
Me too. If you have found a solution...
same here...
Are you sure you want max_vel_x = 50 and min_vel_x = 10? These are in meters per second so 10 m/s is approximately 22 mph or 36 km/h. Also, your global resolution is 0.005 m which is just 5mm. Is your odometry that accurate? Finally, why do you set the controller_frequency so low (0.8 Hz)?
same problem here. Solutions???