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

KarthikMurugan's profile - activity

2018-05-05 07:44:46 -0500 received badge  Student (source)
2016-06-09 03:51:21 -0500 received badge  Famous Question (source)
2014-01-28 17:30:14 -0500 marked best answer How to publish opencv Mat image in ROS Fuerte

I went through the http://www.ros.org/wiki/cv_bridge/Tutorials/UsingCvBridgeToConvertBetweenROSImagesAndOpenCVImages (tutorial) about conversion between ROS and OpenCV images.... To publish opencv image, it has to be converted to ROS image msg.

Now what I have is just a Mat image,

Mat opencv_img ;

I tried :

cv_bridge::CvImagePtr cv_ptr;

cv_ptr->image = opencv_img.clone();


ros::Publisher pub;

pub.publish(cv_ptr->toImgMsg());

I get an error :-

 T* boost::shared_ptr<T>::operator->() const [with T = cv_bridge::CvImage]: Assertion `px != 0' failed.
Aborted (core dumped)
2014-01-28 17:30:06 -0500 marked best answer How to set up OpenCV(which is part of ROS) in Qt creator in Ubuntu12.04

I have OpenCV2.4.2 installed as part of ROS(Fuerte) in my computer. I want to use an IDE for my projects, I already have installed Qt creator from Ubuntu Software center.

Is it possible to use ROS opencv in an IDE and work. If yes,can somebody help me with how to set up/configure Qt creator with the ROS opencv ?

Thank you

2014-01-28 17:29:43 -0500 marked best answer Provide parameters to OpenCV C++ program in ROS from external file

I want to write a program using OpenCV C++ interface in ROS. I want to provide parameters used by the program from external file(not sure which format will be apt).

Say, I use the threshold function in the program, instead of changing the threshold value each time in the program,make and then run, I want the program to fetch the threshold value from a file so that if I wish to change any value, I could do it in the external file.

I want this because I think it will be helpful to a third-person who can just change the various parameters in the file and observe the result rather than opening the program, change values,make and run (Sometimes the third person may not be a programmer and just wishes to see the results, in that case he would not know the technicalities of where to change parameters in the program)

I am new to ROS. I am using Fuerte. Is there any way to do this in ROS ??

Thank you

2013-07-09 01:46:27 -0500 received badge  Famous Question (source)
2013-06-25 21:46:05 -0500 received badge  Notable Question (source)
2013-06-21 03:59:14 -0500 received badge  Famous Question (source)
2013-06-07 06:20:08 -0500 received badge  Famous Question (source)
2013-05-26 22:43:29 -0500 received badge  Notable Question (source)
2013-05-01 08:31:30 -0500 received badge  Popular Question (source)
2013-05-01 07:07:43 -0500 commented answer PCL SACSegmentation - setAxis and setModelType has no effect in Output

Also what is the difference between SACMODEL_PERPENDICULAR_PLANE and SACMODEL_PARALLEL_PLANE... I get the same result for both!!!

2013-05-01 07:04:59 -0500 commented answer PCL SACSegmentation - setAxis and setModelType has no effect in Output

Thank u Jeremy.... tat worked!!! now only the ground plane gets removed...

but Still at some instants nothing gets removed... do you know wat could be the reason behind it... I tried values for epsAngle from 20 to 45 ....any rectification to be made ??

2013-04-30 18:54:13 -0500 commented answer PCL SACSegmentation - setAxis and setModelType has no effect in Output

Thank you Jeremy.. So is the angle parameter signify angle tolerance of plane with the axis or its normal with the axis??? (as it is in this : http://docs.pointclouds.org/trunk/classpcl_1_1_s_a_c_segmentation.html )

2013-04-30 18:40:52 -0500 received badge  Commentator
2013-04-30 18:40:52 -0500 commented answer How to publish opencv Mat image in ROS Fuerte

How to fill the headers ?? There are members such as seq ,time, frame id... what should I put into these ??

2013-04-29 21:00:56 -0500 received badge  Notable Question (source)
2013-04-29 20:55:50 -0500 received badge  Organizer (source)
2013-04-29 20:41:56 -0500 asked a question PCL SACSegmentation - setAxis and setModelType has no effect in Output

I want to estimate the ground plane present in the pointcloud and remove it. I used the plane model segmentation tutorial for that.

Instead of removing the ground plane it removes the vertical planes(wall) in the pointcloud.

I changed the axis perpendicular to which the plane is estimated but get the same result..

This is the code :-

  Eigen::Vector3f axis = Eigen::Vector3f(0.0,1.0,0.0);

  pcl::ModelCoefficients::Ptr coefficients (new pcl::ModelCoefficients);
  pcl::PointIndices::Ptr inliers (new pcl::PointIndices);
  // Create the segmentation object
  pcl::SACSegmentation<pcl::PointXYZI> seg;
   seg.setAxis(axis);

  seg.setOptimizeCoefficients (true);

  seg.setModelType (pcl:: SACMODEL_PLANE);
  seg.setMethodType (pcl::SAC_RANSAC);
  seg.setDistanceThreshold (0.5);

  seg.setInputCloud (cloud);
  seg.segment (*inliers, *coefficients);

When I input a stream of pointclouds through ROS, I get Model coefficients as :-

Model coefficients: 0.980676 0.00643671 0.195532 0.127706
Model coefficients: 0.0974007 -0.00814183 0.995212 2.64382
Model coefficients: 0.0235566 -0.997725 -0.0631705 4.7102
Model coefficients: 0.0404465 -0.999113 -0.0117141 4.65797

ie sometimes it removes ground plane and at some other instant it removes walls... the coordinate system in the pointcloud is

x axis -> forward
y axis -> right
z axis -> up

Now since ground plane is along x-z plane perpendicular to y axis I set the Axis as (0.0,1.0,0.0) so that according to PCL api ground_plane perpendicular to y axis be removed... but as i said only at some instants it is removed and at other instants vetical planes (wall) gets removed...

I tried all possibilities of (1,0,0) ,(0,1,0),(0,0,1) but it has NO EFFECT in the output result...The same result I mentioned above is obtained...

Also changed ModelType to SACMODEL_PERPENDICULAR_PLANE , SACMODEL_PARALLEL_PLANE ,still no desired result

Please pour in your suggestions where I am going wrong..

2013-04-29 17:14:22 -0500 received badge  Popular Question (source)
2013-04-28 16:03:55 -0500 received badge  Famous Question (source)
2013-04-27 10:12:26 -0500 asked a question Incorporate Frustum culling in ROS PCL-1.5

I am using PCL which is part of my ROS Fuerte for my applications. The PCL version I have is 1.5 ...

I saw the http://docs.pointclouds.org/trunk/classpcl_1_1_frustum_culling.html (Frustum culling) in filters module. Also it seems to be part of PCL-1.7

I checked my include folders and I dont have any files of frustum culling. Should I upgrade my PCL version of ROS or can I incorporate it in the currentt 1.5 version itself ?

If I have to upgrade, How should I proceed with the upgradation of PCL in ROS Fuerte?? Can anyone provide the steps ??

Thank you

2013-04-24 20:15:05 -0500 received badge  Popular Question (source)
2013-04-24 03:43:55 -0500 commented answer How to publish opencv Mat image in ROS Fuerte

/usr/include/boost/smart_ptr/shared_ptr.hpp:187:50: error: cannot convert int * to cv_bridge::CvImage * in initialization

2013-04-24 03:43:04 -0500 commented answer How to publish opencv Mat image in ROS Fuerte

usr/include/boost/smart_ptr/shared_ptr.hpp: In constructor ‘boost::shared_ptr<T>::shared_ptr(Y*) [with Y = int, T = cv_bridge::CvImage]’: /home/karthik/Desktop/pcl/sandbox/Image_processing/src/example.cpp:116:47: instantiated from here