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

zsaigol's profile - activity

2020-06-07 10:11:56 -0500 received badge  Nice Answer (source)
2017-05-04 08:54:54 -0500 received badge  Good Answer (source)
2016-09-07 02:42:52 -0500 commented answer Bad maps produced by gmapping in simulation with feature-poor environments

Hi @gleb, the node doesn't really do anything - it just prints out the pose of the robot, as calculated in 3 different ways (as described above). You just run up Gazebo with the simulated Turtlebot, start this node, and it should print stuff out. Haven't tested with newer ROS versions, though.

2016-08-28 20:10:59 -0500 received badge  Necromancer (source)
2016-04-01 03:01:13 -0500 commented answer Modified version of ardrone_autonomy needed for tum_ardrone?

@Mani, sorry I didn't. First project requirements made using ardrone_autonomy a lower priority, and then the whole project ended.

2016-03-30 15:02:43 -0500 received badge  Notable Question (source)
2016-03-30 15:02:43 -0500 received badge  Famous Question (source)
2015-10-25 00:15:01 -0500 received badge  Famous Question (source)
2015-08-18 21:58:34 -0500 received badge  Self-Learner (source)
2015-07-02 09:36:25 -0500 received badge  Popular Question (source)
2015-06-30 05:35:03 -0500 commented answer Modified version of ardrone_autonomy needed for tum_ardrone?

Thanks Mani, that is very helpful. I'll let you know how I get on.

2015-06-29 11:30:47 -0500 asked a question Modified version of ardrone_autonomy needed for tum_ardrone?

The installation instructions for tum_ardrone say a modified version of ardrone_autonomy is needed, and this can be installed from https://github.com/tum-vision/ardrone... . However, this is a rosbuild package, and therefore the (catkinized) current tum_ardrone package cannot depend on it (see http://wiki.ros.org/catkin/migrating_... ).

What was changed for this modified version? Should I:

  1. Use the Ubuntu package for ardrone_autonomy (I'm on Hydro)
  2. Install ardrone_autonomy from its GitHub repo
  3. Try to Catkinize the modified code...

I'm using Hydro on Ubuntu 12.04, but I suspect the same issue will apply to more up-to-date distros.

2015-04-22 07:18:47 -0500 received badge  Great Question (source)
2015-03-24 09:31:35 -0500 received badge  Notable Question (source)
2015-03-24 09:31:35 -0500 received badge  Popular Question (source)
2015-02-12 10:29:55 -0500 answered a question KnowRob for Hydro

Just to note Moritz has now produced a Catkinized version - see http://www.knowrob.org/blog/catkinize... and http://www.knowrob.org/installation/c...

2015-02-12 10:23:14 -0500 asked a question Catkinized KnowRob - dependency issues

I've installed the new catkinized KnowRob under Hydro, following the instructions and the very useful migration guide, and everything seems to be working.

However I had a couple of minor issues with dependencies: first, rosdep doesn't seem to install dependencies recursively, so some were missed (e.g. see http://answers.ros.org/question/84616... ).

I suggest instead of doing

rosdep install --ignore-src knowrob

you can use

rosdep install --ignore-src --from-paths stacks/

Secondly, a few packages are referenced in knowrob_addons but aren't present in the git repo, specifically:

  • knowrob_motion_constraints missing knowrob_mesh_reasoning
  • semantic_map_to_owl missing semantic_map_to_owl_msgs
  • knowrob_cad_models missing iai_cad_tools (for iai_cad_downloader -- which I tried installing, but then it seemed to need access to a private SVN repository)
2015-02-06 02:59:15 -0500 received badge  Nice Answer (source)
2015-02-06 02:57:56 -0500 received badge  Good Question (source)
2014-12-17 13:03:23 -0500 received badge  Nice Question (source)
2014-12-17 13:03:14 -0500 received badge  Teacher (source)
2014-12-17 13:03:14 -0500 received badge  Necromancer (source)
2014-08-07 14:01:00 -0500 received badge  Famous Question (source)
2014-08-07 12:28:06 -0500 answered a question Bad maps produced by gmapping in simulation with feature-poor environments

To help anyone else trying to debug this, I thought I'd post my node that prints out the robot's pose from 3 sources:

  1. The Gazebo model which I think is the ground truth, via topic /gazebo/model_states
  2. The odometry published by Gazebo
  3. The robot pose published by gmapping

While there may not be any noise added to Gazebo's odometry, it isn't simply publishing the ground truth, as you can see if you drive the robot into a wall for a bit.

#include <ros/ros.h>
#include <tf/transform_listener.h>
#include <geometry_msgs/Pose.h>
#include <gazebo_msgs/ModelStates.h>

tf::TransformListener * listener;
bool received_gazebo_message = false;
geometry_msgs::Pose model_pose;

void receivedGazeboMessage(const gazebo_msgs::ModelStatesPtr& model_states)
{
    if (!received_gazebo_message)
    {
        std::cout << "Gazebo model info received!" << std::endl;
    }
    for (unsigned int i = 0; i < model_states->name.size(); ++i)
    {
        if (model_states->name[i] == "mobile_base")
        {
            model_pose = model_states->pose[i];
            received_gazebo_message = true;
            break;
        }
    }
}

void printPoses(const ros::TimerEvent&)
{
    if (received_gazebo_message)
    {
        tf::StampedTransform odom_transform;
        tf::StampedTransform gmap_transform;
        try
        {
            listener->lookupTransform("/odom", "/base_footprint", ros::Time(0), odom_transform);
            listener->lookupTransform("/map", "/base_footprint", ros::Time(0), gmap_transform);
        }
        catch (tf::TransformException & ex)
        {
            ROS_ERROR("%s", ex.what());
            return;
        }
        std::cout << std::setiosflags(std::ios::fixed) << std::setprecision(3);
        std::cout << "* at " << odom_transform.stamp_.toSec() << ":" << std::endl;

        std::cout << "Model: " << model_pose.position.x << ", " << model_pose.position.y <<
                " / " << tf::getYaw(model_pose.orientation) << std::endl;
        std::cout << "Odom : " << odom_transform.getOrigin()[0] << ", " <<
                odom_transform.getOrigin()[1] <<
                " / " << tf::getYaw(odom_transform.getRotation()) << std::endl;
        std::cout << "Gmapg: " << gmap_transform.getOrigin()[0] << ", " <<
                gmap_transform.getOrigin()[1] <<
                " / " << tf::getYaw(gmap_transform.getRotation()) << std::endl;
    }
}

int main(int argc, char** argv)
{
    ros::init(argc, argv, "pose_printer");
    ros::NodeHandle n;
    listener = new tf::TransformListener();

    ros::Subscriber gazebo_ground_truth_sub =
                n.subscribe("/gazebo/model_states", 1, &receivedGazeboMessage);
    ros::Timer timer1 = n.createTimer(ros::Duration(1.0), printPoses);

    ros::spin();
    return 0;
}
2014-08-07 05:59:44 -0500 commented answer Bad maps produced by gmapping in simulation with feature-poor environments

Thanks for this clarification, jorge. I had thought the TB2 odometry drifted a bit, as I tried comparing 'tf_echo /odom /base_footprint' to the 'mobile_base' pose from topic /gazebo/model_states, but the discrepancy is tiny and may not really be increasing (2 cm after 10 mins).

2014-08-06 18:49:23 -0500 received badge  Notable Question (source)
2014-08-06 13:13:08 -0500 received badge  Student (source)
2014-08-06 13:10:04 -0500 received badge  Popular Question (source)
2014-08-06 10:53:44 -0500 commented question Bad maps produced by gmapping in simulation with feature-poor environments

@bvbdort - I'm happy that disabling the scan matching fixes the problem, thanks anyway.

2014-08-06 10:52:12 -0500 commented question Bad maps produced by gmapping in simulation with feature-poor environments

@jorge - the second question I'm not 100% sure of is: 2) Does keeping noise non-zero in the gmapping parameters mean we get a more accurate localisation even when the scan-matcher is effectively disabled? Yes, i.e. gmapping still chooses the best particle.

2014-08-06 10:50:42 -0500 commented question Bad maps produced by gmapping in simulation with feature-poor environments

@jorge - I mostly just meant this post to help people out. Regarding the motion model noise, the first question (which I don't need answering) is: 1) Why doesn't Gazebo produce perfect odometry? - I can see that it makes sense most of the time to simulate the real robot as faithfully as possible.

2014-08-06 09:06:05 -0500 answered a question Improve gmapping results

Not sure if you've got the same issue I had - but my fix here was to set the minimumScore parameter to a very large value.

2014-08-06 09:04:09 -0500 answered a question /map and /odom after mapping the environment

Not sure if you've got the same issue I had - but my fix here was to set the minimumScore parameter to a very large value.

2014-08-06 09:01:00 -0500 asked a question Bad maps produced by gmapping in simulation with feature-poor environments

I've found that in relatively feature-poor environments, e.g. a large rectangular room, the maps produced by gmapping can be very wrong. This is using a Turtlebot simulated in Gazebo, I'm not sure how transferrable this issue is. Also when using the environment from the tutorial gmapping works fine, so I suspect it's the lack of features causing the problem.

The symptoms are that the robots position jumps suddenly by up to ~1.5m, and walls it maps from then on are offset correspondingly.

I've tracked down the cause of this to "scan matching" in the OpenSLAM Gmapping code - particle locations are updated in two cases, first when applying the motion model, and second when each particle is 'jiggled' by the scan matcher to better fit the scan data. The fix for this is to change the minimumScore gmapping parameter to a large value:

<param name="minimumScore" value="10000"/>

by editing / copying gmapping.launch.xml. This turns gmapping into a pure mapping rather than a SLAM algorithm. However, the odometry provided by Gazebo seems pretty good, and not the cause of the problem (as some people seem to have suspected previously, e.g. http://answers.ros.org/question/12919/map-and-odom-after-mapping-the-environment/).

You can also set the motion model noise to zero, and reduce the number of particles to 1:

<param name="srr" value="0.0"/>
<param name="srt" value="0.0"/>
<param name="str" value="0.0"/>
<param name="stt" value="0.0"/>
<param name="particles" value="1"/>

which means the algorithm assumes the odometry is perfect. I think there might be some benefit in leaving these parameters as the default, to allow some corrections as the Gazebo odometry drifts, but I'm not completely sure.

2014-08-06 05:58:47 -0500 answered a question Turtlebot gmapping demo very long on hydro

Have you checked your setting for the map_update_interval parameter? Probably set in gmapping.launch.xml.

http://wiki.ros.org/gmapping?distro=hydro

2014-07-23 03:59:46 -0500 received badge  Enthusiast
2014-05-26 03:55:21 -0500 received badge  Supporter (source)
2014-03-05 02:14:14 -0500 received badge  Famous Question (source)
2014-01-28 17:31:36 -0500 marked best answer json_prolog ERROR: init.pl: source_sink `library(my_lib)' does not exist

Trying to load a library of functions from a ROS package's init.pl file, json_prolog gives the error:

ERROR: /home/path/my_package/prolog/init.pl:19:
 source_sink `library(my_lib)' does not exist 
Warning: /home/path/my_package/prolog/init.pl:19:
 Goal (directive) failed: user:use_module(library(my_lib))

The init.pl file uses the code

:- use_module(library('my_lib')).

to load a file 'my_lib.pl' located in the same directory as init.pl.

When starting the package using rosrun rosprolog rosprolog my_package the module gets compiled and loaded fine.

I suspect the problem is that JSONPrologNode.java uses ensure_loaded('/home/path/my_package/prolog/init.pl') instead of register_ros_package(my_package) which is what rosprolog uses.