ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Aarif's profile - activity

2021-11-23 08:23:19 -0500 received badge  Great Question (source)
2020-11-02 18:50:27 -0500 received badge  Famous Question (source)
2020-11-02 18:50:17 -0500 received badge  Famous Question (source)
2020-11-02 18:50:17 -0500 received badge  Notable Question (source)
2020-10-12 20:14:16 -0500 received badge  Good Question (source)
2020-07-12 01:09:02 -0500 commented answer why "map update loop missed" warning occours and what are is effects??

hi @vanquang, After banging my head for long, I wrote my own navigation program.

2020-07-02 03:11:28 -0500 marked best answer why "map update loop missed" warning occours and what are is effects??

Hello, I am setting up a navigation as explained in Navigation Stack Setup Tutorial stack for P3AT spawned. after making all the costmap files when i run the move_base.launch file the following warning appears:-

[ WARN] [1413658951.699133967]: Map update loop missed its desired rate of 5.0000Hz... the loop actually took 2.1020 seconds

I just want to know why this error occurs and what are its effects on automated navigation??

2020-05-07 17:16:47 -0500 received badge  Stellar Question (source)
2019-08-04 07:12:21 -0500 received badge  Famous Question (source)
2018-06-01 02:37:19 -0500 marked best answer how to put publisher and subscriber in a single Node?

hello, i am writing a node which subscribes to /scan topic make some calculations and according to the calculated values it publishes different messages on the /robotState topic in the callback function.

Here is my code:

#include "ros/ros.h"
#include "sensor_msgs/LaserScan.h"
#include "std_msgs/String.h"
#include <sstream>

void switcherCallback(const sensor_msgs::LaserScan::ConstPtr& msg)
{
    ros::NodeHandle p;
    ros::Publisher state_pub = p.advertise<std_msgs::String>("robotState",1000);
    ros::Rate loop_rate(1);
    while(ros::ok())
    {
    int f=0;
    for(int i=0; i<msg->ranges.size(); i++){
        if(msg->ranges[i]<1.5f){
            f=1;
            break;
        }
    }
    if(f==1){
        std_msgs::String msg;
        std::stringstream ss;
        ss<<"1";
        msg.data = ss.str();
        state_pub.publish(msg);
    }else{
        std_msgs::String msg;
        std::stringstream ss;
        ss<<"0";
        msg.data = ss.str();
        state_pub.publish(msg);
    }
    ros::spinOnce();
    loop_rate.sleep();
    }
}

int main(int argc, char **argv)
{
    ros::init(argc, argv, "switcher");
    ros::NodeHandle n;
    ros::Subscriber sub = n.subscribe<sensor_msgs::LaserScan>("scan", 1000, switcherCallback);
    ros::spin();
    return 0;
}

But whenever i executes the code it shows the following error:

Bus error (core dumped)

i am just wandering why this error is occurred and how can i put both publisher and subscriber in a single node?

2017-09-10 15:51:08 -0500 received badge  Favorite Question (source)
2017-08-01 11:44:03 -0500 marked best answer need explanation on sensor_msgs/LaserScan.msg

Hi, i am new in ROS, the message Definition of a LaserScan.msg is as follows:-

std_msgs/Header header
float32 angle_min
float32 angle_max
float32 angle_increment
float32 time_increment
float32 scan_time
float32 range_min
float32 range_max
float32[] ranges
float32[] intensities

i want to know the what information these variable holds and how can i manipulate them to extract the distance from an obstacle.

2017-07-28 07:14:59 -0500 marked best answer how to get robot's distance from an obstacle??

hello, i have a P3AT spawned in USARsim environment and i can navigate it through keyboard, i want to know its distance from obstacles while it is in motion in the form of x and y coordinates, but i don't know how to do it.

please help.

I am using ROS-fuerte on UBUNTU 12.04 LTS

2017-05-15 02:58:19 -0500 marked best answer Waiting on transform from /base_footprint to /map to become available before running costmap, tf error:

I want to auto navigate my P3AT.

Using ROS-Fuertr (on PC1: UBUNTU 12.04 LTS) & USARSim (on PC2: windows7 ).

I have my launch file move_base.launch,

<launch>

  <master auto="start"/>
  <!-- Run the map server -->
  <node name="map_server" pkg="map_server" type="map_server" args="$(find my_robot_name_2dnav)/map/map.pgm 0.05"/>

  <!--- You can see original move_base.launch -->
  <!--- Run AMCL -->
  <include file="$(find usarsim_inf)/launch/usarsim.launch"/>
  <include file="$(find amcl)/examples/amcl_omni.launch" />

  <node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
    <rosparam file="$(find my_robot_name_2dnav)/launch/costmap_common_params.yaml" command="load" ns="global_costmap" />
    <rosparam file="$(find my_robot_name_2dnav)/launch/costmap_common_params.yaml" command="load" ns="local_costmap" />
    <rosparam file="$(find my_robot_name_2dnav)/launch/local_costmap_params.yaml" command="load" />
    <rosparam file="$(find my_robot_name_2dnav)/launch/global_costmap_params.yaml" command="load" />
    <rosparam file="$(find my_robot_name_2dnav)/launch/move_base_params.yaml" command="load" />
    </node>

</launch>

but when i try,

$ roslaunch my_robot_name_2dnav move_base.launch

i am getting an warning message,

[ WARN] [1413488778.937642524]: Waiting on transform from /base_footprint to /map to become available before running costmap, tf error:

see here the full terminal output

please help to improve this scenario.

2017-03-15 02:17:12 -0500 marked best answer Warning "Map update loop missed its desired rate" keeps on comming

hello, i am setting up Navigation stack as explained in the Navigation Stack Setup Tutorial, My my configuration files are as follows:-

1. base_local_planner_params.yaml

    TrajectoryPlannerROS:
    # for details see: http://www.ros.org/wiki/base_local_planner
    max_vel_x: 0.2
    min_vel_x: 0.05
    max_rotational_vel: 0.5
    min_in_place_rotational_vel: 0.1

    acc_lim_th: 3.2
    acc_lim_x: 2.5
    acc_lim_y: 0

    holonomic_robot: true

    # goal tolerance parameters
    yaw_goal_tolerance: 0.1
    xy_goal_tolerance: 0.2
    latch_xy_goal_tolerance: true

2. costmap_common_params.yaml

  obstacle_range: 2.5
  raytrace_range: 3.0
  footprint: [[0.305, 0.278], [0.04, 0.193], [-0.04, 0.193], [-0.282, 0.178], [-0.282, -0.178], [-0.04, -0.193], [0.04, -0.193], [0.305, -0.278]]
 #footprint: [[0.075, 0.178], [0.04, 0.193], [-0.04, 0.193], [-0.282, 0.178], [-0.282, -0.178], [-0.04, -0.193], [0.04, -0.193], [0.075, -0.178]]
 #robot_radius: ir_of_robot
 inflation_radius: 0.6

 observation_sources: laser_scan_sensor

 laser_scan_sensor: {sensor_frame: openni_depth_frame, data_type: LaserScan, topic: scan, marking: true, clearing: true}

3. global_costmap_params.yaml

  global_costmap:
  global_frame: /map
  robot_base_frame: /base_footprint
  update_frequency: 2.0
  static_map: true

4. local_costmap_params.yaml

  local_costmap:
  global_frame: /map
  robot_base_frame: /base_footprint
  update_frequency: 2.0
  publish_frequency: 2.0
  static_map: false
  rolling_window: true
  width: 6.0
  height: 6.0
  # origin_x: -0.115
  origin_x: 7.5
  origin_y: 7.5
  resolution: 0.05

5. move_base_param.yaml

controller_frequency: 10
controller_patience: 15.0
oscillation_timeout: 10.0
oscillation_distance: 0.5

TrajectoryPlannerROS:
max_vel_x: 0.45
min_vel_x: 0.1
max_rotational_vel: 1.0
min_in_place_rotational_vel: 0.4

acc_lim_th: 1.0
acc_lim_x: 0.5
acc_lim_y: 0.5
path_distance_bias: 50.0
goal_distance_bias: 0.8
holonomic_robot: false

6. move_base.launch

<launch>

  <!-- Run the map server -->
  <node name="map_server" pkg="map_server" type="map_server" args="$(find my_robot_name_2dnav)/map/map.pgm 0.05"/>

  <!--- You can see original move_base.launch -->
  <!--- Run AMCL -->
  <include file="$(find usarsim_inf)/launch/usarsim.launch"/>
  <include file="$(find amcl)/examples/amcl_omni.launch" />



  <node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
    <rosparam file="$(find my_robot_name_2dnav)/launch/costmap_common_params.yaml" command="load" ns="global_costmap" />
    <rosparam file="$(find my_robot_name_2dnav)/launch/costmap_common_params.yaml" command="load" ns="local_costmap" />
    <rosparam file="$(find my_robot_name_2dnav)/launch/local_costmap_params.yaml" command="load" />
    <rosparam file="$(find my_robot_name_2dnav)/launch/global_costmap_params.yaml" command="load" />
    <rosparam file="$(find my_robot_name_2dnav)/launch/move_base_params.yaml" command="load" />
  </node>


  <node pkg="gmapping" type="slam_gmapping" respawn="false" name="slam_gmapping" args="scan:=lms200" >
  </node>

  <node pkg="rviz" type="rviz" respawn="false" name="rviz">
  </node>
</launch>

now where i launch the move_base.launch file everything goes fine but i am getting a warning as:-

  [ WARN] [1413922749.722348193]: Map update loop missed its desired rate of 2.0000Hz... the loop actually took 2.9248 seconds

in my previous question i asked about the reason of this warning but still i am confused and could not remove this warning, please help me out so that i can solve it.