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

Waterplant's profile - activity

2017-01-21 03:38:06 -0500 received badge  Nice Question (source)
2016-04-15 09:58:38 -0500 received badge  Self-Learner
2015-12-13 03:14:22 -0500 received badge  Famous Question (source)
2014-09-02 16:20:18 -0500 received badge  Famous Question (source)
2014-01-28 17:30:08 -0500 marked best answer Building-Problems with TimeSynchronizer

Hi - I want to subscribe two topics of the Kinect (synchron). I followed the TimeSynchronizer Tutorial, but I have following errors when I build the code:

error: CMakeFiles/example.dir/src/test.o: undefined reference to symbol 'boost::signals::connection::~connection()'
error: note: 'boost::signals::connection::~connection()' is defined in DSO /usr/lib/libboost_signals.so.1.46.1 so try adding it to the linker command line
/usr/lib/libboost_signals.so.1.46.1

error: could not read symbols: Invalid operation error: collect2: ld returned 1 exit status

Here is the important part:

void callback (const sensor_msgs::ImageConstPtr& input_image, const sensor_msgs::ImageConstPtr& input_depth) { 
//opencv stuff
}

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

    ros::NodeHandle nh;

    cv::namedWindow("matches");
    cv::namedWindow("depth");

    message_filters::Subscriber<sensor_msgs::Image> image_sub(nh, "camera/rgb/image_rect_color", 1);
    message_filters::Subscriber<sensor_msgs::Image> depth_sub(nh, "camera/depth_registered/image_rect", 1);

    TimeSynchronizer<sensor_msgs::Image, sensor_msgs::Image> sync(image_sub, depth_sub, 10);
    sync.registerCallback(boost::bind(&callback, _1, _2));

    ros::spin ();
    return 0;
}

Thank you very much :)

2013-11-26 17:59:29 -0500 received badge  Famous Question (source)
2013-11-09 17:32:29 -0500 received badge  Notable Question (source)
2013-10-26 07:00:40 -0500 received badge  Notable Question (source)
2013-08-06 16:42:38 -0500 received badge  Notable Question (source)
2013-06-27 03:45:51 -0500 received badge  Famous Question (source)
2013-06-01 16:39:59 -0500 received badge  Popular Question (source)
2013-05-27 14:52:33 -0500 received badge  Popular Question (source)
2013-05-13 10:10:26 -0500 received badge  Popular Question (source)
2013-05-07 03:43:38 -0500 asked a question RGBD Slam Stereo Setup

Hi - I want to use RGBD Slam using a Stereo Setup. I changed already the topics in the launch file, but when I start the RGBD GUI nothing happens.

Here is my launch file:

<launch>
  <node pkg="rgbdslam" type="rgbdslam" name="rgbdslam" cwd="node" required="true" output="log"> 

    <param name="config/camera_info_topic"             value="/stereo_camera/camera_info"/>
    <param name="config/wide_topic"                    value="/stereo_camera/left/image_mono"/>
    <param name="config/wide_cloud_topic"              value="/stereo_camera/points2"/>

[...]

  </node>
</launch>
2013-05-06 13:32:56 -0500 received badge  Nice Answer (source)
2013-05-03 02:33:42 -0500 received badge  Notable Question (source)
2013-04-29 00:28:13 -0500 asked a question TimeSynchronizer (boost invalid initialization of reference)

I have again a problem building the boost TimeSynchronizer Callback. I hope you can help me :)

void callback (const ImageConstPtr& right, ImageConstPtr& left) {

}


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

    ros::NodeHandle nh;

    message_filters::Subscriber<Image> right_image(nh, "/stereo_camera/right/image_rect", 1);
    message_filters::Subscriber<Image> left_image(nh, "/stereo_camera/left/image_rect", 1);

    TimeSynchronizer<Image, Image> sync(right_image, left_image, 10);
    sync.registerCallback(boost::bind(&callback, _1, _2));


    ros::spin ();


    return 0;
}

The error msg:

error: invalid initialization of reference of type ‘boost::shared_ptr<const sensor_msgs::Image_<std::allocator<void> > >&’ from expression of type ‘const boost::shared_ptr<const sensor_msgs::Image_<std::allocator<void> > >’
2013-04-19 02:13:04 -0500 received badge  Teacher (source)
2013-04-19 01:20:36 -0500 answered a question getting a C++ Programm run under ROS
  1. Create a Package: http://www.ros.org/wiki/ROS/Tutorials/CreatingPackage
  2. go in the CMakeLists.txt and add following line:

    rosbuild_add_executable (example src/example.cpp) target_link_libraries(example ${PCL_LIBRARIES})

PCL is only an example Library. Make sure that your cpp file is placed in src/..

The last step is only to call rosmake [pkg-name]

2013-04-18 21:03:30 -0500 received badge  Popular Question (source)
2013-04-18 20:52:46 -0500 answered a question TimeSynchronizer Callback problem

Thank you very much. That sounds logic

2013-04-17 00:42:06 -0500 received badge  Editor (source)
2013-04-17 00:41:22 -0500 asked a question TimeSynchronizer Callback problem

I have a problem using the TimeSynchronizer.

I added sub1 and sub2 to test if there is a with the subscriber, but in both cases the callbacks test_callback and test_callback2 are called. Only the synchronized callback is not called.

Thank you very much.

Here is the main part:

ros::Subscriber sub1 = nh.subscribe("/camera/rgb/image_rect_color", 1, test_callback);
ros::Subscriber sub2 = nh.subscribe("/camera/depth_registered/image_rect", 1, test_callback2);

message_filters::Subscriber<sensor_msgs::Image> image_sub(nh, "/camera/rgb/image_rect_color", 1);
message_filters::Subscriber<sensor_msgs::Image> depth_sub(nh, "/camera/depth_registered/image_rect", 1);

TimeSynchronizer<sensor_msgs::Image, sensor_msgs::Image> sync(image_sub, depth_sub, 10);
sync.registerCallback(boost::bind(&callback, _1, _2));
2013-04-16 10:25:42 -0500 received badge  Student (source)