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

Ben_S's profile - activity

2023-06-05 09:39:42 -0500 received badge  Guru (source)
2023-06-05 09:39:42 -0500 received badge  Great Answer (source)
2022-08-15 07:17:21 -0500 received badge  Good Answer (source)
2022-02-22 06:23:58 -0500 received badge  Good Answer (source)
2021-11-16 04:18:40 -0500 received badge  Good Answer (source)
2021-05-24 19:53:09 -0500 received badge  Guru (source)
2021-05-24 19:53:09 -0500 received badge  Great Answer (source)
2021-05-23 05:57:53 -0500 received badge  Good Answer (source)
2021-05-02 13:00:30 -0500 received badge  Good Answer (source)
2021-03-12 10:49:26 -0500 received badge  Nice Answer (source)
2021-01-18 23:14:57 -0500 received badge  Good Answer (source)
2019-08-01 04:35:21 -0500 received badge  Nice Answer (source)
2019-07-09 08:13:39 -0500 received badge  Nice Answer (source)
2018-07-13 08:15:07 -0500 received badge  Nice Answer (source)
2017-03-12 21:03:04 -0500 received badge  Nice Answer (source)
2016-06-08 14:15:40 -0500 received badge  Guru (source)
2016-06-08 14:15:40 -0500 received badge  Great Answer (source)
2016-03-31 01:23:04 -0500 received badge  Good Answer (source)
2016-01-27 09:39:22 -0500 received badge  Nice Answer (source)
2016-01-05 08:29:04 -0500 received badge  Nice Answer (source)
2015-09-24 13:54:12 -0500 received badge  Good Answer (source)
2015-04-21 04:00:30 -0500 received badge  Nice Answer (source)
2015-03-25 21:02:07 -0500 received badge  Nice Answer (source)
2014-08-18 02:49:16 -0500 received badge  Good Answer (source)
2014-05-19 23:09:39 -0500 received badge  Nice Answer (source)
2014-01-14 00:36:55 -0500 answered a question Localization issue using gmapping and odom data.

You made some really large (and some even absurd) changes to some of the gmapping parameters, which may lead to the observed behaviour...

<param name="linearUpdate" value="0.01"/>
<param name="angularUpdate" value="0.01"/>
<param name="temporalUpdate" value="0.1"/>

These settings will force an update with almost every new scan and benefit the accumulation of even small errors in scan matching. This may be the main culprit and what makes your odometry mostly meaningless.

Try setting these parameters closer to the default like linear 0.2, angular 0.3 and especially temporal to something like 5-10 (or even -1 to turn it off completely).

<param name="particles" value="1"/>

Now regarding the "even absurd" part of your config. GMapping is a particle filter based SLAM approach. So it needs some particles with each representing one "guess" of the current position and traveled path. When setting particles to 1 you are in fact doing dead reckoning based on scan matching, odometry and even some (intentionally!) added noise. You should set particles to at least the default value of 30 or even better higher! (Whatever your CPU can support. We typically use between 50 and 80 particles.)

In general i would advise you to start of with the default GMapping config and change only those parameters you really need and even then not by a factor of over 30 to begin with...

2014-01-14 00:21:32 -0500 commented question Localization issue using gmapping and odom data.

Thanks for the additional informations. Would it be possible to post a similar video while having the fixed frame set to /odom?

2014-01-09 02:59:28 -0500 commented question Localization issue using gmapping and odom data.

Is your laser scanner mounted in a somewhat unusual position? (Like facing backwards, seen from positive x of your base_link) What are your transforms from base_link to laser? Would it be possible to post your launch file(s) and maybe a small bag recording?

2014-01-02 15:57:50 -0500 received badge  Nice Answer (source)
2013-12-19 02:17:02 -0500 answered a question Calling a function in a function

cloudcb is not a member of your class Listener. Thats why it won't be possible to call publishBbox() from within. Make it a class method and add your object reference to the subscriber like you did for the publisher.

You should also get your variable names right and think about moving the subscriber and publisher into your class, initializing them in the constructor.

2013-12-19 01:51:49 -0500 answered a question Making Subscriber and Publisher work in the same node

You should use a combination of spinOnce() and sleep (have a look at the tutorials). spin() blocks until an error occures or the program receives a sigint (ctrl+c).

Also it may be a good idea to move the spinning to the main loop. A blocking constructor seems like rather bad design... :)

2013-11-27 23:38:17 -0500 commented answer gmapping with user defined laser scan and position data

This will most likely not work. Laser parameters in GMapping are determined from the first received message. After that it will always use that frame, scan-count, angle increments etc... So no, using GMapping with multiple laser scanners is impossible or at least extremly difficult.

2013-11-27 05:28:47 -0500 answered a question Connection between Mongodb and UR5 Nodes?

Maybe the mongodb_wrapper is used through service calls and not topics. (Which would make sense in my opinion...)

These will not be visible in rqt_graph.

2013-11-20 05:15:46 -0500 commented question AMCL localisation/getting correct position

Can you post your launch files and maybe a bag file of your data? Guessing from your description seems rather problematic. Normally the odometry by laser_scan_matcher should be sufficient for amcl...

2013-11-07 02:54:50 -0500 answered a question AMCL + Laser Scan Matcher Crashing
  1. Remove the static transforms from map -> odom and odom -> base_link. You want them dynamic from amcl and the laser_scan_matcher and not static.
  2. fixed_frame for the laser_scan_matcher has to be set to /odom and not map, since the node is responsible for your odom -> base_link transform and not the localization within your map.
2013-11-05 22:48:32 -0500 answered a question amcl does not need odometry data?

amcl receives its odometry informations through the /odom -> /base_link transform. (Or whatever you have set as odom_frame_id and base_frame_id parameters)

This means that you need a node (typically your hardware abstraction) that accumulates odom information from your base-robot and publish the aggregated pose as a transform.

So no, laser only will not be sufficient.

2013-11-04 02:13:22 -0500 answered a question Problem with converting image from depth to grayscale

Try initializing depth_image.data with an properly sized array. Also you should check if the size of the incoming image and the output match. (Or set width, height and step accordingly to the input)

2013-10-14 03:07:59 -0500 commented answer ROS remote master: can see topics but no data

Have you set ROS_IP or ROS_HOSTNAME? Do some of the PCs have Firewalls installed?

2013-09-19 04:16:42 -0500 commented question Creating a map with gmapping using lidar data of a quick spinning robot

Well, in this case there was a real problem with GMapping and how it handles incoming data. There is no way, that this would have worked with the data "as is". :)

2013-09-18 06:31:35 -0500 commented answer Creating a map with gmapping using lidar data of a quick spinning robot

One thing i saw in the small bag is that the robot sometimes seems to roll or tilt, so that a part of the floor is seen by the laser. This may confuse pure 2d slam approaches as they may interpret that measurement as a wall.

2013-09-18 03:24:06 -0500 answered a question Creating a map with gmapping using lidar data of a quick spinning robot

I have made two changes to GMapping so that it looks fine to me playing your bag:

diff --git a/gmapping/src/slam_gmapping.cpp b/gmapping/src/slam_gmapping.cpp
index c97356c..6049a6f 100644
--- a/gmapping/src/slam_gmapping.cpp
+++ b/gmapping/src/slam_gmapping.cpp
@@ -350,7 +350,10 @@ SlamGMapping::initMapper(const sensor_msgs::LaserScan& scan)
   gsp_laser_angle_increment_ = orientationFactor * scan.angle_increment;
   ROS_DEBUG("Laser angles top down in laser-frame: min: %.3f max: %.3f inc: %.3f", angle_min_, angle_max_, gsp_laser_angle_increment_);

-  GMapping::OrientedPoint gmap_pose(0, 0, 0);
+  double theta = angle_min_ + (gsp_laser_beam_count_ * gsp_laser_angle_increment_ / 2);
+  ROS_DEBUG("Theta for gmap_pose: %.3f", theta);
+
+  GMapping::OrientedPoint gmap_pose(0, 0, theta);

   // setting maxRange and maxUrange here so we can set a reasonable default
   ros::NodeHandle private_nh_("~");
@@ -542,7 +545,8 @@ SlamGMapping::updateMap(const sensor_msgs::LaserScan& scan)
   boost::mutex::scoped_lock(map_mutex_);
   GMapping::ScanMatcher matcher;
   double* laser_angles = new double[scan.ranges.size()];
-  double theta = angle_min_;
+  // this is how GMapping internally calculates the min_angle
+  double theta = -gsp_laser_angle_increment_ * scan.ranges.size() / 2;
   for(unsigned int i=0; i<scan.ranges.size(); i++)
   {
     if (gsp_laser_angle_increment_ < 0)

I also played around with the launch file a bit to improve the performance of the laser_scan_matcher and GMapping:

<!-- 
Example launch file: uses laser_scan_matcher together with
slam_gmapping 
-->

<launch>

  #### set up data playback from bag #############################

  <param name="/use_sim_time" value="true"/>

  <node pkg="rosbag" type="play" name="play" 
    args="$(find laser_scan_matcher)/demo/vr100.bag -r 3 --delay=3 --clock"/>

  #### publish an example base_link -> laser transform ###########

  <node pkg="tf" type="static_transform_publisher" name="base_link_to_laser" 
    args="0.0 0.0 0.0 0.0 0.0 0.0 /base_link /neato_laser 100" />

  #### start rviz ################################################
  <node pkg="rviz" type="rviz" name="rviz" 
    args="-d $(find laser_scan_matcher)/demo/demo_vr100.vcg"/>

  #### start the laser scan_matcher ##############################

  <node pkg="laser_scan_matcher" type="laser_scan_matcher_node" 
    name="laser_scan_matcher_node" output="screen">

    <param name="fixed_frame" value = "odom"/>
    <param name="use_imu" value="false"/>
    <param name="use_odom" value="false"/>
    <param name="use_alpha_beta" value="false"/>
    <param name="max_iterations" value="20"/>
    <param name="kf_dist_linear" value="0.5"/>
    <param name="kf_dist_angular" value="1.0"/>

  </node>

  #### start gmapping ############################################

  <node pkg="gmapping" type="slam_gmapping" name="slam_gmapping" output="screen">
    <param name="map_udpate_interval" value="1.0"/>
    <param name="maxUrange" value="5.0"/>
    <param name="sigma" value="0.1"/>
    <param name="kernelSize" value="1"/>
    <param name="lstep" value="0.15"/>
    <param name="astep" value="0.15"/>
    <param name="iterations" value="5"/>
    <param name="lsigma" value="0.1"/>
    <param name="ogain" value="3.0"/>
    <param name="lskip" value="1"/>
    <param name="srr" value="0.1"/>
    <param name="srt" value="0.2"/>
    <param name="str" value="0.1"/>
    <param name="stt" value="0.2"/>
    <param name="linearUpdate" value="0.3"/>
    <param name="angularUpdate" value="0.3"/>
    <param name="temporalUpdate" value="0.5"/>
    <param name="resampleThreshold" value="0.5"/>
    <param name="particles" value="50"/>
    <param name="xmin" value="-5.0"/>
    <param name="ymin" value="-5.0"/>
    <param name="xmax" value="5.0"/>
    <param name="ymax" value="5.0"/>
    <param name="delta" value="0.02"/>
    <param name="llsamplerange" value="0.01"/>
    <param name="llsamplestep" value="0.05"/>
    <param name="lasamplerange" value="0.05"/>
    <param name="lasamplestep" value="0.05"/>
  </node>

</launch>

I hope this ... (more)

2013-09-16 13:06:57 -0500 commented question Creating a map with gmapping using lidar data of a quick spinning robot

I will be able to look into it on wednesday. Are you using the latest version from Github? GMapping in general has problems with non-symmetrical scanners. (e.g. min_angle != -max_angle) This will lead to problems like rotation by 180 degrees in your case...

2013-09-16 03:39:02 -0500 commented question Creating a map with gmapping using lidar data of a quick spinning robot

Could you upload the bag file somewhere? I would love to take a closer look. I wrote the last patch regarding gmapping and inverted (and rear facing) lasers. Try checking out the last gmapping versions for your ros-version from the git-repo. I dont know if the binary already includes the patches...

2013-09-02 00:16:43 -0500 commented answer How to publish TF for slam_gmapping

Its also important, that there is some kind of base_link. Currently released gmapping uses odom -> base_link tf for motion estimation. Newest version from git uses odom -> laser frame for motion, but needs base_link -> laser to find out about the orientation of the laser.

2013-07-22 05:19:56 -0500 commented question ros not communicating over sub-network

Can the device ping your pc by its name? ("laptop") Try setting ROS_IP to the IPs on both sides and use the IPs in the ROS_MASTER_URI.

2013-06-26 11:05:29 -0500 commented question unable to view kinect data in rviz

Ok, so the driver itself is working. Do you see the IR projector turning on, when you subscribe to the depth topics? Try disabling depth registration and then subscribe to the non registered depth topics. Is there any error message in rviz? Did you set a fixed frame?

2013-06-26 05:23:48 -0500 edited answer Common callback function

Yes, that is possible. Also have a look at this answer if you want your callback to have a custom parameter, to know which topic (/robot) is the source.


Edit:

You could use only one topic and let every robot send messages with a unique id to it.