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

chilypepper's profile - activity

2016-07-26 08:11:22 -0500 received badge  Famous Question (source)
2016-07-22 00:25:33 -0500 received badge  Notable Question (source)
2016-07-22 00:25:33 -0500 received badge  Popular Question (source)
2016-04-26 12:50:09 -0500 received badge  Supporter (source)
2016-04-25 23:45:23 -0500 commented answer Stereo cameras no disparity output

I've been trying to solve this for weeks, turns out one little command line argument was the key. Thank you so much.

2016-04-25 23:44:46 -0500 received badge  Scholar (source)
2016-04-24 19:15:11 -0500 received badge  Famous Question (source)
2016-04-24 13:06:48 -0500 asked a question Stereo cameras no disparity output

Hello,

I'm running 2 Point Grey Blackfly cameras in stereo and trying to get a disparity map out of them. I'm running into a ton of issues with getting to that point.

I fire up the cameras with the following launch file:

<launch>

<arg name="camera_serial" default="0"/> <arg name="calibrated" default="0"/>

<group ns="stereo">

<group ns="right" >
        <node pkg="nodelet" type="nodelet" name="manager" args="manager" />

    <node pkg="nodelet" type="nodelet" name="camera_nodelet" args="load pointgrey_camera_driver/PointGreyCameraNodelet manager">
        <param name="frame_id" value="right_camera"/>
        <param name="serial" value="14432788"/>
        <param name="camera_info_url" if="$(arg calibrated)"
        value="file://$(env HOME)/.ros/camera_info/14432788.yaml" />
        <param name="frame_rate" value="15"/>
    </node>
    <node name="image_proc_right" pkg="image_proc" type="image_proc"/>

</group>
<group ns="left" >
<node pkg="nodelet" type="nodelet" name="manager" args="manager" />

    <node pkg="nodelet" type="nodelet" name="camera_nodelet" args="load pointgrey_camera_driver/PointGreyCameraNodelet manager">
        <param name="frame_id" value="left_camera"/>
        <param name="serial" value="14490573"/>
        <param name="camera_info_url" if="$(arg calibrated)"
    value="file://$(env HOME)/.ros/camera_info/14432788.yaml" />
        <param name="frame_rate" value="15"/>
    </node>
    <node name="image_proc_left" pkg="image_proc" type="image_proc"/>
</group>

</group> </launch>

And then I run the calibration:

$ rosrun camera_calibration cameracalibrator.py --size 8x6 --square 0.073 right:=/stereo/right/image_raw left:=/stereo/left/image_raw right_camera:=/stereo/right left_camera:=/stereo/left --approximate=0.01

This works all fine and dandy and I calibrate the pair with my board (24x31in, 9x7 squares, 8x6 interior corners). I achieved an epi of about .15-.2.

At this point, I commit the calibration, and run

$ ROS_NAMESPACE=/stereo rosrun stereo_image_proc stereo_image_proc

And here is where everything goes south. I run stereo_view or disparity view and nothing but blank windows. Stereo_view gets all of the regular images (image_rect, .._rect_color, etc.) but exactly 0 disparity images. I've tried changing parameters to no avail; I even made a program to run through random parameter values and left it going on the computer. After about 500,000 frames, all with different parameter values, and not a single disparity image output, I quit it.

I'm not sure where to go from here, the calibration is totally fine, but no matter what I do, I cannot get a disparity image out of stereo_image_proc. stereo_image_proc works just fine as I can get all of the rectified images out of it, so theres no connection issue, its just the disparity images that will not come out of it no matter what.

If anyone has any pointers, please let me know, this is becoming very stressful.

2015-09-16 00:25:36 -0500 received badge  Student (source)
2015-09-06 17:08:40 -0500 received badge  Notable Question (source)
2015-08-06 16:36:03 -0500 received badge  Famous Question (source)
2015-07-18 06:19:43 -0500 received badge  Notable Question (source)
2015-07-06 07:55:45 -0500 received badge  Popular Question (source)
2015-07-05 10:16:52 -0500 received badge  Popular Question (source)
2015-07-04 13:53:47 -0500 commented question Image_proc fails with segmentation fault on ros::spin()

I ran it as a super user and as it turns out, it refuses to run unless the camera is "calibrated" which presents another hundred problems related to openCV >.<

2015-07-04 08:40:47 -0500 asked a question Image_proc fails with segmentation fault on ros::spin()

Hi,

I'm trying to run this node:

#include <ros/ros.h>
#include <nodelet/loader.h>
#include <image_proc/advertisement_checker.h>

int main(int argc, char **argv)
{
  ros::init(argc, argv, "image_proc");

  // Check for common user errors
  if (ros::names::remap("camera") != "camera")
  {
    ROS_WARN("Remapping 'camera' has no effect! Start image_proc in the "
             "camera namespace instead.\nExample command-line usage:\n"
             "\t$ ROS_NAMESPACE=%s rosrun image_proc image_proc",
             ros::names::remap("camera").c_str());
  }
  if (ros::this_node::getNamespace() == "/")
  {
    ROS_WARN("Started in the global namespace! This is probably wrong. Start image_proc "
             "in the camera namespace.\nExample command-line usage:\n"
             "\t$ ROS_NAMESPACE=my_camera rosrun image_proc image_proc");
  }

  // Shared parameters to be propagated to nodelet private namespaces
  ros::NodeHandle private_nh("~");
  ROS_INFO("Step1");
  XmlRpc::XmlRpcValue shared_params;
  int queue_size;
  if (private_nh.getParam("queue_size", queue_size))
    shared_params["queue_size"] = queue_size;

  nodelet::Loader manager(false); // Don't bring up the manager ROS API
  nodelet::M_string remappings;
  nodelet::V_string my_argv;
  ROS_INFO("Step2");

  // Debayer nodelet, image_raw -> image_mono, image_color
  std::string debayer_name = ros::this_node::getName() + "_debayer";
  manager.load(debayer_name, "image_proc/debayer", remappings, my_argv);

  // Rectify nodelet, image_mono -> image_rect
  std::string rectify_mono_name = ros::this_node::getName() + "_rectify_mono";
  if (shared_params.valid())
    ros::param::set(rectify_mono_name, shared_params);
  manager.load(rectify_mono_name, "image_proc/rectify", remappings, my_argv);
  ROS_INFO("Step3");
  // Rectify nodelet, image_color -> image_rect_color
  // NOTE: Explicitly resolve any global remappings here, so they don't get hidden.
  remappings["image_mono"] = ros::names::resolve("image_color");
  remappings["image_rect"] = ros::names::resolve("image_rect_color");
  ROS_INFO("Step4");
  std::string rectify_color_name = ros::this_node::getName() + "_rectify_color";
  if (shared_params.valid())
    ros::param::set(rectify_color_name, shared_params);
    ROS_INFO("Step5");
  manager.load(rectify_color_name, "image_proc/rectify", remappings, my_argv);
  ROS_INFO("Step6");
  // Check for only the original camera topics
  ros::V_string topics;
  ROS_INFO("Step7");
  topics.push_back(ros::names::resolve("image_raw"));
  topics.push_back(ros::names::resolve("camera_info"));
  ROS_INFO("Step8");
  image_proc::AdvertisementChecker check_inputs(ros::NodeHandle(), ros::this_node::getName());
  ROS_INFO("Step9");
  check_inputs.start(topics, 60.0);

  ros::spin();
  ROS_INFO("Step10");
  return 0;
}

However, every time I run it, it goes through it's lines (look at the ROS_INFO(StepX)) and then when it reaches the end, it just fails.

peter@peter:~/brokenGlasses$ ROS_NAMESPACE=camera rosrun image_proc image_proc 
[ INFO] [1436016564.924762943]: Step1
[ INFO] [1436016564.940809151]: Step2
[ INFO] [1436016565.444694821]: Step3
[ INFO] [1436016565.444757917]: Step4
[ INFO] [1436016565.444783119]: Step5
[ INFO] [1436016565.671524024]: Step6
[ INFO] [1436016565.671576133]: Step7
[ INFO] [1436016565.671605069]: Step8
[ INFO] [1436016565.671639400]: Step9
Segmentation fault (core dumped)

I'm assuming the namespace is correct since I didn't get the yellow warnings, however there is really nothing to work on here and I'm at an impasse on what to do.

If anyone ahs some good ideas, I would really appreciate it!

2015-07-03 15:44:01 -0500 asked a question At an impasse using OpenCV

Hi all,

I have this snippet of code that was copied from one of the tutorials on cv_bridge:

try
{
  ROS_INFO("Trying to convert");
  cv_ptr = toCvCopy(msg, sensor_msgs::image_encodings::BAYER_BGGR8);
  ROS_INFO("Converted");
}
catch (cv_bridge::Exception& e)
{
  ROS_INFO("Not Converted");

  ROS_ERROR("cv_bridge exception: %s", e.what());
  return;
}

And when I run it using a topic published by my camera I run into this error:

[ INFO] [1435952032.594731416]: Trying to convert
OpenCV Error: The function/feature is not implemented (Unknown/unsupported array type) in type, file /tmp/buildd/ros-indigo-opencv3-3.0.0-0trusty-20150607-1913/modules/core/src/matrix.cpp, line 1837
terminate called after throwing an instance of 'cv::Exception'
  what():  /tmp/buildd/ros-indigo-opencv3-3.0.0-0trusty-20150607-1913/modules/core/src/matrix.cpp:1837: error: (-213) Unknown/unsupported array type in function type

Aborted (core dumped)

(The ROS_INFO's are there to show steps and when there program breaks)

Now I know the error is in that line so I tried a few other things to get it to work. When I change the encoding type to something else, in this case bayer_grbg8, I get this error:

 [ INFO] [1435952475.576702858]: Step2
[ INFO] [1435952475.576715724]: Trying to convert
[ INFO] [1435952475.576814017]: Not Converted
[ERROR] [1435952475.576841782]: cv_bridge exception: Unsupported conversion from [bayer_bggr8] to [bayer_grbg8]

What are some possible solutions? I don't know how to change the encoding of the camera (Point Grey Blackfly3)

2015-07-03 15:43:52 -0500 asked a question OpenCV and ROS throwing an exception

Hi all,

I have this snippet of code copied from the cv_bridge tutorial:

try
    {
      ROS_INFO("Trying to convert");
      cv_ptr = toCvCopy(msg, sensor_msgs::image_encodings::BAYER_GRBG8);
      ROS_INFO("Converted");
    }
    catch (cv_bridge::Exception& e)
    {
      ROS_INFO("Not Converted");

      ROS_ERROR("cv_bridge exception: %s", e.what());
      return;
    }

And whenever I run it all I get are errors in various forms all occuring at the "toCvCopy" line.

When I use a different encoding I get this error:

    [ INFO] [1435952475.576702858]: Step2
[ INFO] [1435952475.576715724]: Trying to convert
[ INFO] [1435952475.576814017]: Not Converted
[ERROR] [1435952475.576841782]: cv_bridge exception: Unsupported conversion from [bayer_bggr8] to [bayer_grbg8]

But when I switched to the correct encoding (what it says) I get this error:

[ INFO] [1435952979.957482002]: Trying to convert
OpenCV Error: The function/feature is not implemented (Unknown/unsupported array type) in type, file /tmp/buildd/ros-indigo-opencv3-3.0.0-0trusty-20150607-1913/modules/core/src/matrix.cpp, line 1837
terminate called after throwing an instance of 'cv::Exception'
  what():  /tmp/buildd/ros-indigo-opencv3-3.0.0-0trusty-20150607-1913/modules/core/src/matrix.cpp:1837: error: (-213) Unknown/unsupported array type in function type

Aborted (core dumped)

(The ROS_INFO's are all there to show where the errosr are occurring)

Does anyone know what's going on / how to fix it?