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

micah.corah's profile - activity

2020-01-06 11:28:00 -0500 received badge  Famous Question (source)
2019-05-20 02:27:11 -0500 marked best answer Is there a package for topic diagnostics/message rate tracking and warning?

I am interested in having something like a package with general nodes that subscribe to topics and publish warnings when messages aren't being sent or are coming in at the wrong rates and that publishes warnings when this happens.

I have a multi-robot system that suffers from a wide variety of often easily-mitigated errors related to things like hardware issues, wireless issues, etc. The biggest issue is generally detecting these errors. All of the typical failures involve streaming data such as heartbeats, odometry, and camera data. An easy way to track these streams in a separate node would be incredibly valuable. If someone has not already written a tool for this, I will likely write one myself.

2017-11-03 09:16:30 -0500 received badge  Notable Question (source)
2017-08-21 01:40:02 -0500 commented answer Is there a package for topic diagnostics/message rate tracking and warning?

Thanks. This looks a little more complex than what I was hoping for, but it looks like it can be configured to meet my n

2017-08-21 01:37:55 -0500 received badge  Popular Question (source)
2017-08-20 23:56:04 -0500 received badge  Organizer (source)
2017-08-20 23:55:13 -0500 asked a question Is there a package for topic diagnostics/message rate tracking and warning?

Is there a package for topic diagnostics/message rate tracking and warning? I am interested in having something like a p

2016-08-17 10:02:29 -0500 received badge  Famous Question (source)
2016-06-28 22:15:59 -0500 received badge  Nice Answer (source)
2015-10-27 15:20:16 -0500 received badge  Famous Question (source)
2015-10-27 15:20:16 -0500 received badge  Notable Question (source)
2015-06-22 01:31:58 -0500 received badge  Popular Question (source)
2015-06-09 03:48:13 -0500 received badge  Self-Learner (source)
2015-06-09 03:48:13 -0500 received badge  Teacher (source)
2015-06-03 13:01:27 -0500 answered a question rtabmap stereo with original (mono) Bumblebee

The issue was that the left and right cameras were switched. Remapping each side in camera1394stereo fixed the problem. Rtab-map in Indigo warns that the baseline is negative which tipped me off.

2015-06-03 12:58:56 -0500 commented answer rtabmap stereo with original (mono) Bumblebee

I didn't get to updating earlier. Turns out that the left and right of the camera were switched. rtab-map in hydro does not give meaningful output for this. On indigo it warns that the baseline is negative.

2015-06-03 00:15:43 -0500 received badge  Student (source)
2015-06-02 11:41:05 -0500 asked a question rtabmap stereo with original (mono) Bumblebee

I am trying to set up an original Bumblebee stereo camera with rtabmap. Currently, the issue that I am running into is that stereo_odometry is crashing without giving a discernible error message.

[FATAL] (2015-06-02 12:04:18.939) SensorData.cpp:92::SensorData() Condition (!depthOrRightImage.empty() && _fx>0.0f && _fyOrBaseline>0.0f && _cx>=0.0f && _cy>=0.0f) not met!

*******
FATAL message occurred! Application will now exit.

*******
[stereo_odometry-5] process has died [pid 6850, exit code 1, cmd /opt/ros/hydro/lib/rtabmap_ros/stereo_odometry left/image_rect:=/stereo_camera/left/image_rect right/image_rect:=/stereo_camera/right/image_rect left/camera_info:=/stereo_camera/left/camera_info right/camera_info:=/stereo_camera/right/camera_info odom:=/odometry __name:=stereo_odometry __log:=/home/rockie/.ros/log/3f5c6f20-093f-11e5-a60c-4cbb583a0a1c/stereo_odometry-5.log].
log file: /home/rockie/.ros/log/3f5c6f20-093f-11e5-a60c-4cbb583a0a1c/stereo_odometry-5*.log

Relevant parts of my launch file look like:

Camera:

<launch>
  <node pkg="camera1394stereo" type="camera1394stereo_node" name="camera1394stereo_node" output="screen" >
    <param name="video_mode" value="1024x768_mono16" />
    <param name="format7_color_coding" value="raw16" />
    <param name="bayer_pattern" value="" />
    <param name="bayer_method" value="" />
    <param name="stereo_method" value="Interlaced" />
    <param name="camera_info_url_left" value="file://$(find stereo_slam)/config/cal_left.yaml" />
    <param name="camera_info_url_right" value="file://$(find stereo_slam)/config/cal_right.yaml" />
  </node>
</launch>

Rectification:

 <!-- Run the ROS package stereo_image_proc for image rectification -->
  <group ns="/stereo_camera" >
    <node pkg="nodelet" type="nodelet" name="stereo_nodelet"  args="manager"/>

    <node pkg="stereo_image_proc" type="stereo_image_proc" name="stereo_image_proc">
      <param name="disparity_range" value="128"/>
    </node>
  </group>

Transform:

  <arg name="pi/2" value="1.5707963267948966" />
  <arg name="optical_rotate" value="0 0 0 -$(arg pi/2) 0 -$(arg pi/2)" />
  <node pkg="tf" type="static_transform_publisher" name="camera_base_link"
    args="$(arg optical_rotate) base_link stereo_camera 100" />

Odometry:

   <node pkg="rtabmap_ros" type="stereo_odometry" name="stereo_odometry" output="screen" >
      <remap from="left/image_rect"       to="/stereo_camera/left/image_rect"/>
      <remap from="right/image_rect"      to="/stereo_camera/right/image_rect"/>
      <remap from="left/camera_info"      to="/stereo_camera/left/camera_info"/>
      <remap from="right/camera_info"     to="/stereo_camera/right/camera_info"/>
      <remap from="odom"                  to="/odometry"/>

      <param name="frame_id" type="string" value="base_link"/>
      <param name="odom_frame_id" type="string" value="odom"/>

      <param name="Odom/InlierDistance" type="string" value="0.1"/>
      <param name="Odom/MinInliers" type="string" value="10"/>
      <param name="Odom/RoiRatios" type="string" value="0.03 0.03 0.04 0.04"/>
      <param name="Odom/MaxDepth" type="string" value="10"/>
      <param name="OdomBow/NNDR" type="string" value="0.8"/>

      <param name="GFTT/MaxCorners" type="string" value="500"/>
      <param name="GFTT/MinDistance" type="string" value="5"/>

      <param name="Odom/FillInfoData" type="string" value="true"/>
   </node>

Any ideas what my issue could be?

2015-02-20 13:22:13 -0500 received badge  Taxonomist
2014-09-30 12:09:06 -0500 received badge  Popular Question (source)
2014-09-30 12:09:06 -0500 received badge  Notable Question (source)
2014-09-24 12:13:22 -0500 received badge  Enthusiast
2014-07-09 11:31:13 -0500 received badge  Famous Question (source)
2014-07-09 11:28:02 -0500 answered a question Cleanly exit from python publisher ensuring all messages sent

Answering my own question:

I found my answer in the rospy source. There is a comment that explicitly states that sending of all messages before shutdown is not guaranteed. Instead, there is a check for whether the process is still running before writing, and if not it exits immediately.

Here is an excerpt from topics.py

 except ValueError:
        # operations on self.buff can fail if topic is closed
        # during publish, which often happens during Ctrl-C.
        # diagnose the error and report accordingly.
        if self.closed:
            if is_shutdown():
                # we offer no guarantees on publishes that occur
                # during shutdown, so this is not exceptional.
                return
2014-07-09 11:01:28 -0500 asked a question Does ROS-Matlab support parallel execution?

I have been testing out the ROS-Matlab package and have had some issues with subscribers, which run in the background, being starved. Matlab's "Parallel Computing Toolbox" which I do not have supports various methods for implementing parallelism such as parallel execution of "for" loops via "parfor." Unfortunately, the actual implementation of the listener is in an obfuscated ".p" file. I have found no documentation related to parallelism in ROS-Matlab.

Does anyone know anything related to parallelism in ROS-Matlab?

2014-07-03 16:41:43 -0500 received badge  Notable Question (source)
2014-07-03 14:30:01 -0500 received badge  Editor (source)
2014-07-03 14:27:34 -0500 received badge  Popular Question (source)
2014-07-03 14:27:00 -0500 received badge  Supporter (source)
2014-07-03 14:12:14 -0500 commented answer Cleanly exit from python publisher ensuring all messages sent

What I have been seeing is that some subscribers will get a message but not others so self-subscribing provides no guarantee (i.e. "rostopic echo" may get messages when another node doesn't) Good point about services, I was planning the switch. A delay may fix that problem, but it would be a hack.

2014-07-03 12:48:32 -0500 asked a question Cleanly exit from python publisher ensuring all messages sent

I have been working on a Python node that essentially publishes one-off messages and then exits. Due, I believe, to the threading in rospy, messages are not always sent if the script exits soon after publishing a message. I have also found no ways of truly guaranteeing that messages that sent messages are received.

Here is some example code based roughly on the nodes demonstrated in the ROS tutorials:

Publisher

#!/usr/bin/python

from std_msgs.msg import Header
import rospy
import math

topic = 'foo'

publisher = rospy.Publisher(topic, Header, queue_size = 10)

rospy.init_node('publisher',anonymous = True)

msg = Header()
msg.frame_id = "Hello World!"
publisher.publish(msg)

Subscriber:

#!/usr/bin/python
import rospy
from std_msgs.msg import Header

def callback(data):
    rospy.loginfo(rospy.get_caller_id()+"I heard %s",data.frame_id)

def listener():
    rospy.init_node('listener', anonymous=True)

    rospy.Subscriber("foo", Header, callback)

    rospy.spin()

if __name__ == '__main__':
    listener()

There are a number of modifications I have found that will get the messages to send:

  1. Use a rospy.Rate object with sufficiently low rate and sleep after publishing
  2. Sending messages in a loop with no other calls to ROS functionality will result in most messages being received.
  3. edit I tried a loop while not rorpy.is_shutdown() containing rospy.signal_shutdown('stuff') after the message is sent. This method results in the message being received some of the time.

There are also some exceptions where the message may otherwise be expected to be received:

  1. Sleeping using a rospy.Duration object will not allow sends to complete
  2. rospy.signal_shutdown does not guarantee that pending messages are sent
  3. Pending sends are not completed when using a Rate object with too high a rate

On top of all this, I have found that rostopic echo will often (but not always) get messages when a subscribing node does not.

I would like to know if there is any (hopefully documented) way that I can exit a python script with the guarantee that every subscriber to a topic that node publishes will have received every message that has been published. So far I have not been able to find anything to this effect.