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

Ernest's profile - activity

2023-02-21 09:47:33 -0500 received badge  Good Question (source)
2020-12-14 16:23:24 -0500 received badge  Self-Learner (source)
2019-08-01 04:36:08 -0500 received badge  Nice Answer (source)
2019-06-29 00:42:45 -0500 received badge  Good Answer (source)
2019-05-01 12:43:24 -0500 received badge  Nice Answer (source)
2016-12-20 23:00:17 -0500 received badge  Nice Question (source)
2015-11-16 01:31:45 -0500 marked best answer Dynamically reconfiguring map_start_x/y

My quick question is: can we change the map_start_x and map_start_y parameters of the hector_mapping node once it's running? Or do we need to restart the node with those parameters?

Thank you in advance,

Ernest

2015-11-16 01:30:54 -0500 received badge  Famous Question (source)
2015-10-13 04:02:35 -0500 received badge  Popular Question (source)
2015-10-13 04:02:35 -0500 received badge  Famous Question (source)
2015-10-13 04:02:35 -0500 received badge  Notable Question (source)
2014-04-20 06:54:10 -0500 marked best answer rosserial - cannot import [custom messages] package

Hello,

I am having trouble using a custom ROS message type on my Arduino. I believe I have the latest version of ros-fuerte-rosserial

I have written & compiled a custom package called arduino_msgs, which worked since rosmsg show finds it. I have ran rosrun rosserial_client make_library.py to "bind" it to my arduino libraries, and I have received a good ouput.

My arduino node has two subscribers & one publisher. The publisher uses an arduino_msgs message type, and the subscribers are std_msgs. When I run rosrun rosserial_python serial_node.py /dev/ttyACM0, I get the following output (lunarex is the name of my computer..)

    lunarex@LunarEx:~/McGill_LunarEx_2013/Arduino$ rosrun rosserial_python serial_node.py /dev/ttyACM0[INFO] [WallTime: 1366251538.465538] ROS Serial Python Node
[INFO] [WallTime: 1366251538.474754] Connected on /dev/ttyACM0 at 57600 baud
[ERROR] [WallTime: 1366251540.605275] Cannot import package : arduino_msgs
[ERROR] [WallTime: 1366251540.607357] sys.path was ['/opt/ros/fuerte/stacks/rosserial/rosserial_msgs/src', '/opt/ros/fuerte/stacks/rosserial/rosserial_python/src', '/opt/ros/fuerte/stacks/rosserial/rosserial_python/nodes', '/opt/ros/fuerte/lib/python2.7/dist-packages', '/home/lunarex/McGill_LunarEx_2013/Arduino', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PIL', '/usr/lib/python2.7/dist-packages/gst-0.10', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/pymodules/python2.7', '/usr/lib/python2.7/dist-packages/ubuntu-sso-client', '/usr/lib/python2.7/dist-packages/ubuntuone-client', '/usr/lib/python2.7/dist-packages/ubuntuone-installer', '/usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol', '/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode']
[ERROR] [WallTime: 1366251540.609387] Failed to parse publisher: 'NoneType' object has no attribute 'msg'
[INFO] [WallTime: 1366251540.619060] Setup Subscriber on ang_speed [std_msgs/Float32]
[INFO] [WallTime: 1366251540.630073] Setup Subscriber on lin_speed [std_msgs/Float32]
[ERROR] [WallTime: 1366251540.633170] Tried to publish before configured, topic id 125
[ERROR] [WallTime: 1366251540.640945] Tried to publish before configured, topic id 125
[ERROR] [WallTime: 1366251540.656522] Tried to publish before configured, topic id 125
[ERROR] [WallTime: 1366251540.674111] Tried to publish before configured, topic id 125
[ERROR] [WallTime: 1366251540.685796] Tried to publish before configured, topic id 125
[ERROR] [WallTime: 1366251540.702021] Tried to publish before configured, topic id 125

..ad infinitum

so the bottom line is that my custom package (arduino_msgs) cannot be imported by rosserial, and therefore I cannot publish to a topic with that message type. Everything else works fine, so I can work around it using std_msgs, but if someone could point me to a solution that would be great.

Thanks! Ernest

---EDIT---

I have acted upon fergs's three suggestions.

1) rosmake arduino_msgs produces this correct output

[ rosmake ] rosmake starting...                                                                                 
[ rosmake ] Packages requested are: ['arduino_msgs']                                                            
[ rosmake ] Logging to directory /home/lunarex/.ros/rosmake/rosmake_output20130427-200123                      
[ rosmake ] Expanded args ['arduino_msgs'] to:
['arduino_msgs']                                                 
[rosmake-0] Starting >>> std_msgs [ make ]                                                                      
[rosmake-0] Finished <<< std_msgs  No Makefile in package std_msgs                                              
[rosmake-0] Starting >>> arduino_msgs [ make ]                                                                  
[rosmake-0] Finished <<< arduino_msgs [PASS] [ 5.27 seconds ]                                                   
[ rosmake ] Results:                                                                                            
[ rosmake ] Built 2 packages with 0 ...
(more)
2014-04-20 06:53:04 -0500 marked best answer Hector_mapping RVIZ visualization showing everything but the map

Hi,

So, this is an odd one. I got the following "good" visualisation of hector_mapping in RVIZ (http://i.imgur.com/lYppRzn.png (imgur link) because I need 20 karma to attach an image..) by running this simple launch file:

<?xml version="1.0"?>
<launch>
    <node pkg="hector_mapping" type="hector_mapping" name="hector_mapping" output="screen">

        <param name="pub_map_odom_transform" value="true"/>
        <param name="map_frame" value="map" />
        <param name="base_frame" value="base_link" />
        <param name="odom_frame" value="base_link" />

    </node>

    <node pkg="tf" type="static_transform_publisher" name="base_to_laser_broadcaster" args="0 0 0 0 0 0 /base_link /laser 100" />


</launch>

I must have changed something because when I re-ran re-ran the hector_mapping node and the visualisation I got http://i.imgur.com/yoiXaUy.png (this) - the base_link frame seems to be moving fine but I don't see the map (what was in grey on the first screenshot) anymore.

Any idea why the map isn't being displayed anymore?

Thanks in advance,

Ernest


Some extra info:

tf_monitor returns this:

 Frame: /base_link published by
 /hector_mapping Average Delay:
 0.0366189 Max Delay: 0.0540163 Frame: /laser published by
 /base_to_laser_broadcaster Average
 Delay: -0.0994484 Max Delay: 0 Frame:
 /scanmatcher_frame published by
 /hector_mapping Average Delay:
 0.0367215 Max Delay: 0.0540429

 All Broadcasters: Node:
 /base_to_laser_broadcaster 10.1691 Hz,
 Average Delay: -0.0994484 Max Delay: 0
 Node: /hector_mapping 80.7814 Hz,
 Average Delay: 0.0366702 Max Delay:
 0.0540429
2014-04-20 06:53:03 -0500 marked best answer hector_mapping: base_link -> laser transform times out once

Hi,

I'm setting up a hector_mapping node. My simple launch file sets up a static base_link -> laser transform:

<node pkg="hector_mapping" type="hector_mapping" name="hector_mapping" output="screen">

    <param name="pub_map_odom_transform" value="true"/>
    <param name="map_frame" value="map" />
    <param name="base_frame" value="base_link" />
    <param name="odom_frame" value="base_link" />

</node>

<node pkg="tf" type="static_transform_publisher" name="base_to_laser_broadcaster" args="0 0 0 0 0 0 /base_link /laser 100" />

When I run it, I get the following error, but only once:

lookupTransform base_link to laser timed out. Could not transform laser scan into base_frame.

Does that mean there is one lookupTransform call for which the tf wasn't set up, but then it found it?

Thanks in advance,

Ernest

2014-04-20 06:53:02 -0500 marked best answer Writing a Python node that publishes AND subscribes to topics of different message frequency

Hi,

I'm trying to write a node in Python that subscribes to a topic and listens to another.

One way I have managed to do that is by issuing the publish command in the callback. However, this approach only lets my node publish when a new message comes in from the topic it is subscribed to. So my publisher is "constrained" to the subscribed topic's frequency.

Is there an other way to do this? I've looked online and couldn't find anything.

Thanks in advance, Ernest

2014-03-27 08:31:13 -0500 received badge  Famous Question (source)
2014-02-04 18:03:42 -0500 marked best answer Using odometry from hector_mapping for move_base (Nav stack)

Hi,

To run move_base (part of the Navigation stack), I need to provide an odom topic which move_base can subscribe to.

I use hector_mapping for odometry on my robot, and have set the pub_map_odom_transform option of my hector_mapping node to true to publish a tf between the map & the odom frames.

Is it possible to output odom as a topic from hector_mapping? If not, how should I go about constructing odom messages from hector_mapping topics? (I have a hunch that this is possible seeing as a tf from map to odom is available..)

Thank you in advance,

Ernest

Edit: Alternatively, is there a way in move_base to use the incoming map->odom tf for odometry (as opposed to the odom topic) ?

2014-01-28 17:30:28 -0500 marked best answer How to save the state of hector_mapping in case it fails?

In certain situations, my LiDAR's platform is subject to sharp motions which hector_mapping cannot handle. In this question, I asked Stefan Kohlbrecher, (one of) the author(s) of the hector_mapping package, what causes this.

Following his comments, I would like to know how to save the full internal state of hector_mapping to restart it with a valid state in case it fails.

Thank you very much,

Ernest

2014-01-28 17:30:24 -0500 marked best answer Global path not changing despite newly discovered obstacle

Hi,

I'm using move_base to generate paths based on a map & odom generated by hector_mapping. The below rviz screenshot sums up my problem quite well: essentially as the new (middle) obstacle appeared in my LiDAR's view, the global path (in green) doesn't update. It seems properly inflated (blue).

So what happens is that move_base keeps going onto the global path until it arrives too close to the obstacle, and then it backs up (recovery mode).

Any ideas why my global path isn't changing?

My yamls:

   global_costmap:

  global_frame: /map
  robot_base_frame: /base_link 
  update_frequency: 1.0

  static_map: false
  rolling_window: true

  width: 26
  height: 26
  resolution: 0.025

  map_type: costmap


local_costmap:
  global_frame: /odom
  robot_base_frame: /base_link 
  update_frequency: 1.5
  publish_frequency: 1.5
  static_map: false
  rolling_window: true
  width: 20.0 
  height: 20.0 
  resolution: 0.05

  map_type: costmap
2014-01-28 17:30:24 -0500 marked best answer tf frames in different time epoch from ros time?

I am trying to tackle the following warning when running Navigation:

[ WARN] [1368081077.201722266]: Could not get robot pose, cancelling reconfiguration
[ WARN] [1368081077.401579990]: Costmap2DROS transform timeout. Current time: 1368081077.4015, global_pose stamp: 136.4000, tolerance: 0.3000

The transform timed out because the time & the pose stamp are extremely different. Are they in different time epochs? If so, how can that be solved?

Thanks,

Ernest

2014-01-28 17:30:24 -0500 marked best answer Providing odom to move_base through a map->odom tf

Hi,

I'm providing odometry to move_base through a map->odom tf provided by hector_mapping.

This means that my odom topic is empty, which I think is the cause of a host of warnings, such as:

[ WARN] [1368064440.957099892, 700.300000000]: Costmap2DROS transform timeout. Current time: 700.3000, global_pose stamp: 700.0000, tolerance: 0.3000

[ WARN] [1368064440.957199828, 700.300000000]: Could not get robot pose, cancelling reconfiguration

I have managed to make move_base ignore the lack of odom messages by going to costmap_2d_ros.cpp of the costmap_2d package and doing this (warning: this is a bad hack!):

    // check global_pose timeout
if (current_time.toSec() - global_pose.stamp_.toSec() > transform_tolerance_) {
  ROS_WARN_THROTTLE(1.0, "Costmap2DROS transform timeout. Current time: %.4f, global_pose stamp: %.4f, tolerance: %.4f",
      current_time.toSec() ,global_pose.stamp_.toSec() ,transform_tolerance_);
  return true;
//  return false;
}

My question: is this a dangerous workaround? Is there a better way to tell move_base to ignore the odom topic?

Thank you in advance,

EDIT

Sometimes, the two times are very different, which leads me to think that they might be in different time epochs:

Costmap2DROS transform timeout. Current time: 1368081077.4015, global_pose stamp: 136.4000, tolerance: 0.3000

When this happens, the quick hack described above doesn't help..

2014-01-28 17:30:24 -0500 marked best answer inscribed and circumscribed radii of the robot used despite footprint being set

Hi,

I've declared my robot's footprint in my common costmap params:

footprint: [[-0.7,-0.45], [0.70,-0.45],[0.70, 0.45],[-0.70, 0.45]]

and so I haven't set inscribed or circumscribed radii, because those can be figured out from my footprint.

Nevertheless, when I run move_base I get this warning:

[ WARN] [1367908257.219539023, 2.000000000]: You have set an inflation radius that is less than the inscribed and circumscribed radii of the robot. This is dangerous and could casue the robot to hit obstacles. Please change your inflation radius setting appropraitely.

Any idea why? Can I safely ignore this warning?

Thanks,

Ernest

2014-01-28 17:30:21 -0500 marked best answer "SearchDir angle change too large" kills hector_mapping

Hi,

I've noticed that when sharp pose changes occur on my laser frame, the following error sometimes appears & kills hector_mapping:

SearchDir angle change too large

I was wondering: what exactly causes this, and if it is indeed linked to an unfeasible change of pose or laser scan data, what are the precise constraints on hector_mapping?

Thank you very much!

Ernest

2014-01-28 17:30:20 -0500 marked best answer Setting the scan_subscriber_queue_size

Hi, I'm trying to set a good scan_subscriber_queue_size for my hector_mapping node. According to the wiki:

~scan_subscriber_queue_size (int, default: 5) The queue size of the scan subscriber. This should be set to high values (for example 50) if logfiles are played back to hector_mapping at faster than realtime speeds.

I'm not sure what logfiles being played back means; my node just take in scans from hokuyo_node, so is it ok to leave the default value of 5?

Thanks,

Ernest