Ask Your Question

mortonjt's profile - activity

2020-06-16 02:47:48 -0500 received badge  Guru (source)
2020-06-16 02:47:48 -0500 received badge  Great Answer (source)
2014-11-11 06:29:16 -0500 received badge  Enlightened (source)
2014-11-11 06:29:16 -0500 received badge  Good Answer (source)
2014-07-26 19:18:44 -0500 received badge  Nice Answer (source)
2014-01-28 17:30:30 -0500 marked best answer Potential data loss with stereo_image_proc

Hello,

I have been messing around with the point clouds generated by stereo_image_proc for the bumblebee2 for a little bit now. I have just applied the toROSMsg command to convert my point clouds to opencv images and realized that there are many gapping holes in my images.

Is this a universal tendency for stereo_image_proc? Or is this an indication that I need to do much more parameter tuning via rqt_reconfigure?

2014-01-28 17:30:09 -0500 marked best answer cameracalibrator.py crashes during calibration

Hello. I'm trying to calibrate the bumblebee2. I'm currently using camera1394 stereo and the following topics are being published.

/camera1394stereo_node/parameter_descriptions
/camera1394stereo_node/parameter_updates
/image
/rosout
/rosout_agg
/stereo_camera/left/camera_info
/stereo_camera/left/image_raw
/stereo_camera/right/camera_info
/stereo_camera/right/image_raw

I run the following command

rosrun camera_calibration cameracalibrator.py --size 8x6 --square 0.108 right:=/stereo_camera/right/image_raw left:=/stereo_camera/left/image_raw right_camera:=/stereo_camera/right left_camera:=/stereo_camera/left -k 6

Then I either get a Segmentation Fault or I get the following error message

Waiting for service /stereo_camera/left/set_camera_info ...
OK
Waiting for service /stereo_camera/right/set_camera_info ...
OK
*** Added sample 1, p_x = 0.465, p_y = 0.760, p_size = 0.138, skew = 0.003
OpenCV Error: Assertion failed (blockSize % 2 == 1 && blockSize > 1) in adaptiveThreshold, file /tmp/buildd/ros-groovy-opencv2-2.4.4-1oneiric-20130301-2020/modules/imgproc/src/thresh.cpp, line 797
Exception in thread Thread-4:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
    self.run()
  File "/opt/ros/groovy/lib/camera_calibration/cameracalibrator.py", line 68, in run
    self.function(m)
  File "/opt/ros/groovy/lib/camera_calibration/cameracalibrator.py", line 142, in handle_stereo
    drawable = self.c.handle_msg(msg)
  File "/opt/ros/groovy/lib/python2.7/dist-packages/camera_calibration/calibrator.py", line 1028, in handle_msg
    rscrib_mono, rcorners, rdownsampled_corners, rboard, _ = self.downsample_and_detect(rgray)
  File "/opt/ros/groovy/lib/python2.7/dist-packages/camera_calibration/calibrator.py", line 402, in downsample_and_detect
    (ok, downsampled_corners, board) = self.get_corners(scrib, refine = True)
  File "/opt/ros/groovy/lib/python2.7/dist-packages/camera_calibration/calibrator.py", line 370, in get_corners
    (ok, corners) = _get_corners(img, b, refine)
  File "/opt/ros/groovy/lib/python2.7/dist-packages/camera_calibration/calibrator.py", line 156, in _get_corners
    (ok, corners) = cv.FindChessboardCorners(mono, (board.n_cols, board.n_rows), cv.CV_CALIB_CB_ADAPTIVE_THRESH | cv.CV_CALIB_CB_NORMALIZE_IMAGE | cv2.CALIB_CB_FAST_CHECK)
error: blockSize % 2 == 1 && blockSize > 1

I found a post with a similar problem at the following link

http://answers.ros.org/question/51072/why-there-is-no-window-show-after-i-run-the-camera_calibration-node/#52269

The errors are rather inconsistent -- the problem sometimes crashes immediately or crashes after a dozen readings.

I have tried different lighting environments and tinkered with rqt_configure and I'm currently at a loss about what could be causing this problem. Any help would be greatly appreciated.

UPDATE:

I found another program in camera_calibration folder called tarfile_calibration.py I have written my own image capture node that can two pictures simultaneously with each camera and have obtained around 70 images. When I ran tarfile_calibration.py, I get a more informative error message

Traceback (most recent call last):
  File "/opt/ros/groovy/lib/camera_calibration/tarfile_calibration.py", line 112, in <module>
    cal_from_tarfile(boards, tarname, options.mono, upload=options.upload)
  File "/opt/ros/groovy/lib/camera_calibration/tarfile_calibration.py", line 51, in cal_from_tarfile
    calibrator.do_tarfile_calibration(tarname)
  File "/opt/ros/groovy/lib/python2.7/dist-packages/camera_calibration/calibrator.py", line 1134, in do_tarfile_calibration
    self.cal(limages, rimages)
  File "/opt/ros/groovy/lib/python2.7/dist-packages/camera_calibration/calibrator.py", line 847, in cal
    goodcorners = self.collect_corners(limages, rimages)
  File "/opt/ros/groovy/lib/python2.7/dist-packages/camera_calibration/calibrator.py", line 864, in collect_corners
    raise ...
(more)
2014-01-28 17:29:56 -0500 marked best answer Rectification matrix clarification in stereo vision calibration

I have a Point Grey Bumblebee2 that I am trying to integrate into ROS and I am using the camera1394stereo node to read raw images from both cameras.

I have calibrated both cameras by hand and am currently trying to figure out how to configure the yaml files as specified in the StereoCalibration tutorial

So far, I have successfully undistorted the images. However, I am very unclear about what values I should put down in the rectification matrix. What is contained in this matrix? Is it a rotation matrix of the two cameras orientations with respect to each other?

I have been trying to insert rotations matrices into these values, only to encounter segfaults. Any help would be greatly appreciated.

2014-01-15 10:21:37 -0500 commented question PCL gpu include location?

If I am not mistaken, I think the pcl gpu headers have been introduced in pcl1.7. https://github.com/PointCloudLibrary/pcl/tree/pcl-1.6.0.

2014-01-12 05:35:08 -0500 asked a question Laserscan conversion to Pointcloud crashes

I'm trying to convert a laser scan into a Point cloud, but I'm getting a segfault when I make this conversion. I'm attaching snipbits of my code below.

laser_geometry::LaserProjection projector_;
sensor_msgs::LaserScan currentScan;
bool hasPoints;

void scan_callback (const sensor_msgs::LaserScan::ConstPtr& scan_in)
{
  currentScan = *scan_in;
  hasPoints = true;
}

void publish_loop(){
  sensor_msgs::PointCloud2 cloud;
  boost::shared_ptr<pcl::PointCloud<pcl::PointXYZ> > 
    pcl_cloud(new pcl::PointCloud<pcl::PointXYZ>());
  projector_.projectLaser(currentScan, cloud); 
....

I'm attaching the gdb output below

Starting program: /home/jamie/Documents/Redblade/devel/lib/redblade_laser/redblade_laser_node __name:=redblade_laser_node __log:=/home/jamie/.ros/log/70a46eac-78e5-11e3-a4cf-080027827e5d/redblade_laser_node-1.log
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device]
[New Thread 0x7fffeee6c700 (LWP 25633)]
[New Thread 0x7fffee66b700 (LWP 25634)]
[New Thread 0x7fffede6a700 (LWP 25635)]
[New Thread 0x7fffed669700 (LWP 25640)]
[New Thread 0x7fffece68700 (LWP 25649)]
[New Thread 0x7fffdffff700 (LWP 25650)]
redblade_laser_node: /usr/include/eigen3/Eigen/src/Core/CwiseBinaryOp.h:144: Eigen::CwiseBinaryOp<BinaryOp, Lhs, Rhs>::CwiseBinaryOp(const Lhs&, const Rhs&, const BinaryOp&) [with BinaryOp = Eigen::internal::scalar_product_op<double, double>, Lhs = const Eigen::Array<double, -0x00000000000000001, -0x00000000000000001>, Rhs = const Eigen::Array<double, -0x00000000000000001, -0x00000000000000001>]: Assertion `lhs.rows() == rhs.rows() && lhs.cols() == rhs.cols()' failed.

Program received signal SIGABRT, Aborted.
0x00007ffff5290425 in __GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
64  ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) backtrace
#0  0x00007ffff5290425 in __GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x00007ffff5293b8b in __GI_abort () at abort.c:91
#2  0x00007ffff52890ee in __assert_fail_base (fmt=<optimized out>, assertion=0x7ffff5b414d8 "lhs.rows() == rhs.rows() && lhs.cols() == rhs.cols()", 
    file=0x7ffff5b414a0 "/usr/include/eigen3/Eigen/src/Core/CwiseBinaryOp.h", line=<optimized out>, function=<optimized out>) at assert.c:94
#3  0x00007ffff5289192 in __GI___assert_fail (assertion=0x7ffff5b414d8 "lhs.rows() == rhs.rows() && lhs.cols() == rhs.cols()", file=0x7ffff5b414a0 "/usr/include/eigen3/Eigen/src/Core/CwiseBinaryOp.h", line=144, 
    function=0x7ffff5b41b20 "Eigen::CwiseBinaryOp<BinaryOp, Lhs, Rhs>::CwiseBinaryOp(const Lhs&, const Rhs&, const BinaryOp&) [with BinaryOp = Eigen::internal::scalar_product_op<double, double>, Lhs = const Eigen::Array<double, -"...) at assert.c:103
#4  0x00007ffff5b37ece in laser_geometry::LaserProjection::projectLaser_(sensor_msgs::LaserScan_<std::allocator<void> > const&, sensor_msgs::PointCloud2_<std::allocator<void> >&, double, int) ()
   from /opt/ros/hydro/lib/liblaser_geometry.so
#5  0x000000000043c324 in laser_geometry::LaserProjection::projectLaser (this=0x665820, scan_in=..., cloud_out=..., range_cutoff=-1, channel_options=3)
    at /opt/ros/hydro/include/laser_geometry/laser_geometry.h:152
#6  0x00000000004397eb in publish_loop () at /home/jamie/Documents/Redblade/src/redblade_laser/src/redblade_laser_node.cpp:30
#7  0x000000000043a07c in main (argc=1, argv=0x7fffffffdcf8) at /home/jamie/Documents/Redblade/src/redblade_laser/src/redblade_laser_node.cpp:70

As you can see, it crashes when it converts the laser scan into a point cloud. Has anyone gotten this function to ... (more)

2014-01-10 19:18:35 -0500 commented answer Running PCL in Hydro

Thank you very much for posting your solution. Do you mind if you could post your CMakelists.txt? I'm still getting linker errors even with the changes that you suggested.

2014-01-08 10:57:37 -0500 asked a question rosbag missing data when reprocessing

I've been collecting stereo vision data and sometimes would like to reprocess the data from the bag files I've collected. To do this, I've created a launch file to play the bag files, launch my data crunching nodes, and record the output from my original bag file and the reprocessed data. I'm using the following launch file

<launch>

  <node pkg="rosbag" type="play" name="rosbag_play" 
    args="/home/jamie/bagFiles/test2/ekf.bag">
  </node>

  <node pkg="redblade_stereo" type="redblade_stereo_node"  name="redblade_stereo_node">
    <param name="verbose" value="true"/>
    <param name="survey_file" value="/home/jamie/Documents/Redblade/config/field.txt"/>
  </node>

  <node pkg="rosbag" type="record" name="rosbag_rec" 
    args="-O /home/jamie/bagFiles/corrected.bag /gps /redblade_ekf/2d_pose /stereo_camera/points2 /stereo_camera/pole /stereo_camera/line /stereo_camera/test">
  </node>

</launch>

However, I've noticed that my new processed bag is missing quiet a bit of data. In the rosbag info output below, the corrected bag has half as many point cloud messages as the original bag. My question is, why is this happening? Is there a way for me to retrieve all of the point clouds?

path:        original.bag
version:     2.0
duration:    1:17s (77s)
start:       Jan 08 2014 15:22:27.51 (1389212547.51)
end:         Jan 08 2014 15:23:45.11 (1389212625.11)
size:        2.3 GB
messages:    889
compression: none [199/199 chunks]
types:       geometry_msgs/Pose2D    [938fa65709584ad8e77d238529be13b8]
             nav_msgs/Odometry       [cd5e73d190d741a2f92e81eda573aca7]
             sensor_msgs/PointCloud2 [1158d486dd51d683ce2f1be655c3c181]
topics:      /gps                     389 msgs    : nav_msgs/Odometry      
             /redblade_ekf/2d_pose    302 msgs    : geometry_msgs/Pose2D   
             /stereo_camera/points2   198 msgs    : sensor_msgs/PointCloud2

path:        corrected.bag
version:     2.0
duration:    1:24s (84s)
start:       Jan 08 2014 17:44:38.53 (1389221078.53)
end:         Jan 08 2014 17:46:03.05 (1389221163.05)
size:        1.2 GB
messages:    847
compression: none [101/101 chunks]
types:       geometry_msgs/Point     [4a842b65f413084dc2b10fb484ea7f17]
             geometry_msgs/Pose2D    [938fa65709584ad8e77d238529be13b8]
             nav_msgs/Odometry       [cd5e73d190d741a2f92e81eda573aca7]
             sensor_msgs/PointCloud2 [1158d486dd51d683ce2f1be655c3c181]
topics:      /gps                     388 msgs    : nav_msgs/Odometry      
             /redblade_ekf/2d_pose    302 msgs    : geometry_msgs/Pose2D   
             /stereo_camera/line       10 msgs    : sensor_msgs/PointCloud2
             /stereo_camera/points2   101 msgs    : sensor_msgs/PointCloud2
             /stereo_camera/test       36 msgs    : sensor_msgs/PointCloud2
2014-01-04 07:43:14 -0500 commented question Depth map from bumblebee2 camera?

You probably want to use the points2 data type

2013-12-30 16:27:18 -0500 commented question insert object using camera coordinates

Is this for gazebo?

2013-12-05 11:27:48 -0500 received badge  Nice Answer (source)
2013-09-21 13:44:25 -0500 answered a question robot state publisher error

Do you have ros-hydro-robot-state-publisher installed?

If not, try

sudo apt-get install ros-hydro-robot-state-publisher
2013-08-07 01:32:14 -0500 received badge  Famous Question (source)
2013-06-09 01:27:49 -0500 received badge  Notable Question (source)
2013-06-02 14:38:00 -0500 received badge  Popular Question (source)
2013-06-01 18:03:03 -0500 asked a question syncing pointcloud and laserscan topics

Hello,

I'm trying to create a subscriber that grabs closely coupled scan and pointcloud messages and combines them into another pointcloud. I tried following this wiki and wrote the following code

void callback(const sensor_msgs::PointCloud2ConstPtr& c, const sensor_msgs::LaserScan::ConstPtr& s){
//Do stuff ...
}

int main(int argc, char** argv){
  ros::init(argc, argv, "combine_scan");
  ros::NodeHandle n;
  message_filters::Subscriber<sensor_msgs::LaserScan> laser_sub(n,"scan",1);
  message_filters::Subscriber<sensor_msgs::PointCloud2> cloud_sub(n,"points",1);
  typedef ApproximateTime<sensor_msgs::LaserScan,sensor_msgs::PointCloud2> ApproximatePolicy;
  message_filters::Synchronizer<ApproximatePolicy> sync(ApproximatePolicy(10),cloud_sub,laser_sub);
  sync.registerCallback(boost::bind(&callback,_1,_2));
  ros::spin();
  return 0;
}

But I'm getting a ton of boost errors when I try to compile this code.

  In file included from /opt/ros/groovy/include/message_filters/simple_filter.h:41:0,
                   from /opt/ros/groovy/include/message_filters/subscriber.h:44,
                   from /opt/ros/groovy/stacks/redblade_tf/src/combine_scan.cpp:15:
  /opt/ros/groovy/include/message_filters/signal1.h: In instantiation of ‘void message_filters::CallbackHelper1T<P, M>::call(const ros::MessageEvent<const M>&, bool) [with P = const ros::MessageEvent<const sensor_msgs::LaserScan_<std::allocator<void> > >&; M = sensor_msgs::PointCloud2_<std::allocator<void> >]’:
  /opt/ros/groovy/stacks/redblade_tf/src/combine_scan.cpp:94:1:   required from here
  /opt/ros/groovy/include/message_filters/signal1.h:75:74: error: no matching function for call to ‘ros::MessageEvent<const sensor_msgs::LaserScan_<std::allocator<void> > >::MessageEvent(const ros::MessageEvent<const sensor_msgs::PointCloud2_<std::allocator<void> > >&, bool)’
  /opt/ros/groovy/include/message_filters/signal1.h:75:74: note: candidates are:
  In file included from /opt/ros/groovy/include/ros/parameter_adapter.h:32:0,
                   from /opt/ros/groovy/include/ros/subscription_callback_helper.h:35,
                   from /opt/ros/groovy/include/ros/subscriber.h:33,
                   from /opt/ros/groovy/include/ros/node_handle.h:33,
                   from /opt/ros/groovy/include/ros/ros.h:45,
                   from /opt/ros/groovy/stacks/redblade_tf/src/combine_scan.cpp:1:
  /opt/ros/groovy/include/ros/message_event.h:128:3: note: ros::MessageEvent<M>::MessageEvent(const ConstMessagePtr&, const boost::shared_ptr<std::map<std::basic_string<char>, std::basic_string<char> > >&, ros::Time, bool, const CreateFunction&) [with M = const sensor_msgs::LaserScan_<std::allocator<void> >; ros::MessageEvent<M>::ConstMessagePtr = boost::shared_ptr<const sensor_msgs::LaserScan_<std::allocator<void> > >; typename boost::add_const<M>::type = const sensor_msgs::LaserScan_<std::allocator<void> >; ros::MessageEvent<M>::CreateFunction = boost::function<boost::shared_ptr<sensor_msgs::LaserScan_<std::allocator<void> > >()>; typename boost::remove_const<M>::type = sensor_msgs::LaserScan_<std::allocator<void> >]
  /opt/ros/groovy/include/ros/message_event.h:128:3: note:   candidate expects 5 arguments, 2 provided
  /opt/ros/groovy/include/ros/message_event.h:123:3: note: ros::MessageEvent<M>::MessageEvent(const ConstMessagePtr&, ros::Time) [with M = const sensor_msgs::LaserScan_<std::allocator<void> >; ros::MessageEvent<M>::ConstMessagePtr = boost::shared_ptr<const sensor_msgs::LaserScan_<std::allocator<void> > >; typename boost::add_const<M>::type = const sensor_msgs::LaserScan_<std::allocator<void> >]
  /opt/ros/groovy/include/ros/message_event.h:123:3: note:   no known conversion for argument 1 from ‘const ros::MessageEvent<const sensor_msgs::PointCloud2_<std::allocator<void> > >’ to ‘const ConstMessagePtr& {aka const boost::shared_ptr<const sensor_msgs::LaserScan_<std::allocator<void> > >&}’
  /opt/ros/groovy ...
(more)
2013-05-31 18:09:27 -0500 commented question confusing about simple ros c++ code

I think you may be referring to a initialization list

2013-05-31 15:41:44 -0500 answered a question How to use CUDA with rosbuild

You can start by looking at parallel_quickstep package that has CUDA enabled

You can also check out this wiki page.

Both of these packages are incredibly out-of-date, but should provide good guidelines on how to compile your project

Make sure to note the FindCUDA.cmake file in both of these packages as it contains all of the CUDA variables needed to get your project up and running

Also, you may want to look into cuda_compile instead of cuda_add_library. I know this resolved some linking issues for me

2013-05-31 11:04:48 -0500 received badge  Commentator
2013-05-31 11:04:48 -0500 commented question cuda performance

That's really funny. I'm seeing the same thing on my robot using pcl_cuda. Have you profiled your code and verified that the performance drain is due to the memory transfer?

2013-05-26 03:31:34 -0500 commented answer Dijkstra Global Path Planner

Oops. I must have read that a little hastily. Yeah, your right. They are definitely using Dijkstra's algorithm in the source code.

2013-05-25 03:22:37 -0500 answered a question Dijkstra Global Path Planner

I don't think that there is a ROS package that implements Dijkstra's algorithm.

However, I do know that navfn and sbpl_lattice_planner both implement variants of the A* search algorithm. In fact, there is a parameter in sbpl_lattice_planner that demands that the path must be optimal. You may want to check out that package.

2013-05-23 21:24:09 -0500 received badge  Famous Question (source)
2013-05-23 05:27:36 -0500 received badge  Good Question (source)
2013-05-23 05:27:26 -0500 received badge  Nice Question (source)
2013-05-23 05:26:59 -0500 marked best answer gmapping missing spots

Hello,

For our robot, slam gmapping have been configured. However, when we display our cost maps in rviz, we see a big gapping hole that isn't being mapped

screenshot

I know that there are quite a few parameters that can be set for gmapping.

Are any of these parameters responsible for this hole in our mapping?

2013-05-23 05:25:19 -0500 received badge  Notable Question (source)
2013-05-23 03:04:28 -0500 received badge  Popular Question (source)