Ask Your Question

raphael favier's profile - activity

2020-11-30 12:00:07 -0600 received badge  Nice Answer (source)
2020-07-08 09:54:01 -0600 received badge  Good Answer (source)
2019-02-26 03:51:38 -0600 received badge  Guru (source)
2019-02-26 03:51:38 -0600 received badge  Great Answer (source)
2016-05-25 21:33:06 -0600 received badge  Nice Answer (source)
2015-11-10 10:06:21 -0600 received badge  Good Question (source)
2015-07-11 19:20:28 -0600 received badge  Nice Answer (source)
2015-06-09 13:37:05 -0600 received badge  Stellar Question (source)
2015-03-18 23:47:53 -0600 received badge  Nice Answer (source)
2014-11-12 18:30:40 -0600 received badge  Good Answer (source)
2014-04-20 12:23:45 -0600 marked best answer Asus Xtion, openni_camera_unstable

Dear all,

I am trying to use the Diamondback's package openni_camera_unstable to visualize the depth or my Asus Xtion.

Following the tutorial presented on the wiki always results in the following trace:

$ roslaunch openni_camera_unstable openni.launch 
... logging to /home/raph/.ros/log/1d23db16-a71c-11e0-96f5-0013a98db3d0/roslaunch-DTI-NB014-1972.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://DTI-NB014:51409/

SUMMARY
========

PARAMETERS
 * /rosdistro
 * /camera/driver/rgb_frame_id
 * /camera/driver/rgb_camera_info_url
 * /camera/driver/depth_frame_id
 * /camera/depth_registered/rectify/interpolation
 * /rosversion
 * /camera/driver/device_id
 * /camera/depth/rectify/interpolation
 * /camera/driver/depth_camera_info_url

NODES
  /camera/depth/
    rectify (nodelet/nodelet)
    metric_rect (nodelet/nodelet)
    metric (nodelet/nodelet)
    disparity (nodelet/nodelet)
    points (nodelet/nodelet)
  /camera/rgb/
    rectify (nodelet/nodelet)
    rectify_color (nodelet/nodelet)
  /
    camera_nodelet_manager (nodelet/nodelet)
    camera_base_link (tf/static_transform_publisher)
    camera_base_link1 (tf/static_transform_publisher)
    camera_base_link2 (tf/static_transform_publisher)
    camera_base_link3 (tf/static_transform_publisher)
  /camera/
    driver (nodelet/nodelet)
    register_depth_rgb (nodelet/nodelet)
    points_xyzrgb_depth_rgb (nodelet/nodelet)
  /camera/ir/
    rectify (nodelet/nodelet)
  /camera/depth_registered/
    rectify (nodelet/nodelet)
    metric_rect (nodelet/nodelet)
    metric (nodelet/nodelet)
    disparity (nodelet/nodelet)

auto-starting new master
process[master]: started with pid [2017]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 1d23db16-a71c-11e0-96f5-0013a98db3d0
process[rosout-1]: started with pid [2030]
started core service [/rosout]
process[camera_nodelet_manager-2]: started with pid [2033]
process[camera/driver-3]: started with pid [2034]
process[camera/rgb/rectify-4]: started with pid [2035]
process[camera/rgb/rectify_color-5]: started with pid [2036]
process[camera/ir/rectify-6]: started with pid [2037]
process[camera/depth/rectify-7]: started with pid [2038]
process[camera/depth/metric_rect-8]: started with pid [2039]
process[camera/depth/metric-9]: started with pid [2040]
process[camera/depth/disparity-10]: started with pid [2041]
process[camera/depth/points-11]: started with pid [2042]
process[camera/register_depth_rgb-12]: started with pid [2043]
process[camera/depth_registered/rectify-13]: started with pid [2044]
process[camera/depth_registered/metric_rect-14]: started with pid [2045]
process[camera/depth_registered/metric-15]: started with pid [2046]
process[camera/depth_registered/disparity-16]: started with pid [2047]
process[camera/points_xyzrgb_depth_rgb-17]: started with pid [2048]
process[camera_base_link-18]: started with pid [2049]
process[camera_base_link1-19]: started with pid [2050]
process[camera_base_link2-20]: started with pid [2051]
process[camera_base_link3-21]: started with pid [2052]
[ERROR] [1309880018.024766364]: Tried to advertise a service that is already advertised in this node [/camera/depth_registered/image_rect_raw/compressed/set_parameters]
[ERROR] [1309880018.031679707]: Tried to advertise a service that is already advertised in this node [/camera/depth_registered/image_rect_raw/theora/set_parameters]
terminate called after throwing an instance of 'openni_wrapper::OpenNIException'
  what():  unsigned int openni_wrapper::OpenNIDriver::updateDeviceList() @ /tmp/buildd/ros-diamondback-openni-kinect-0.2.1/debian/ros-diamondback-openni-kinect/opt/ros/diamondback/stacks/openni_kinect/openni_camera_unstable/src/openni_driver.cpp @ 116 : enumerating image generators failed. Reason: Can't create any node of the requested type!
[camera_nodelet_manager-2] process has died [pid 2033, exit code -6].
log files: /home/raph/.ros/log/1d23db16-a71c-11e0-96f5-0013a98db3d0/camera_nodelet_manager-2*.log

which somehow make sense as the device does not have any RGB camera. Still, if I try to understand the file openni_driver.cpp, I see that given the vendor Id, the device should be recognize and no Image generator should be created:

 if (vendor_id == 0x45e)
    {
      device = boost::shared_ptr<OpenNIDevice > (new ...
(more)
2014-04-20 12:23:09 -0600 marked best answer camera laser calibration package?

Hello,

is there any available package for calibrating the extrinsic parameters of camera + laser range finder system?

I found the old laser_camera_calibration package, but I can't figure out where to find the source (roslocate does not return any result, and it is not in the browse list), and it does not seem to have been worked on since 2009.

Thanks in advance

Raph

2014-04-20 12:22:32 -0600 marked best answer wrong camera_info broadcasted with camera1394

Hello,

I am trying to use the ~camera_info_url parameter of camera1394.

I created the following config file:

image_width: 1200
image_height: 1600
camera_name: 00b09d01009f01a2
distortion_model: plump_bob
binning_x: 0
binning_y: 0
camera_matrix:
  rows: 3
  cols: 3
  data: [390.0, 0.0, 616.0, 0.0, 390.0, 808.0, 0, 0, 1.0]
distortion_model: plumb_bob
distortion_coefficients:
  rows: 1
  cols: 5
  data: [0, 0, 0, 0, 0]
rectification_matrix:
  rows: 3
  cols: 3
  data: [1, 0, 0, 0, 1, 0, 0, 0, 1]
projection_matrix:
  rows: 3
  cols: 4
  data: [390.0, 0.0, 616.0, 0.0 , 0.0, 390.0, 808.0, 0.0, 0, 0, 1.0, 0.0]

That I run using the following launch file:

<launch>
    <node pkg="camera1394" type="camera1394_node" name="ladybug" >
        <param name="guid" value="00b09d01009f01a2" />
        <param name="video_mode" value="1600x1200_mono8" />
        <param name="frame_id" value="ladybug0" />
        <param name="bayer_pattern" value="rggb" />
        <param name="auto_white_balance" value="2" />
        <param name="camera_info_url" value="package://mojo_camera/ladybug0_config.yaml" />
    </node>

    <node ns="camera" pkg="image_proc" type="image_proc" name="image_proc" />

    <node pkg="image_view" type="image_view" name="image_view" >
        <remap from="image" to="camera/image_color" />
    </node>
</launch>

My problem is that when I try to print the camera_info messages sent by camera1394 I get the default null ones:

header: 
  seq: 80
  stamp: 
    secs: 1305893240
    nsecs: 937414885
  frame_id: /ladybug0
height: 1200
width: 1600
distortion_model: ''
D: []
K: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
R: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
P: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
binning_x: 0
binning_y: 0
roi: 
  x_offset: 0
  y_offset: 0
  height: 0
  width: 0
  do_rectify: False
---

I tried to inspire from the example of the tests folder of camera1394 and I can't seem to get my mistake. Would anyone know what I do wrong here?

Thanks in advance

Raph

2014-04-20 12:22:31 -0600 marked best answer Camera_model segfault. Does it require a "real" camera_info not to crash?

Hello,

I am working on a node that colors point clouds with a camera image. My strategy is to project each point on the camera image plane, and find the corresponding pixel color.

In order to do so, I use the image_geometry::PinholeCameraModel object that can initialize itself directly from a sensor_msgs::camera_info message via the function fromCameraInfo and project points via the function project3dToPixel.

The current setup I have consist of a labybug3 camera and a tilting hokuyo LRF. I haven't develop a proper driver for the camera, so for the moment, I am using the camera_1394 package using the following configuration:

<node pkg="camera1394" type="camera1394_node" name="ladybug" >
    <param name="guid" value="00b09d01009f01a2" />
    <param name="video_mode" value="1600x1200_mono8" />
    <param name="frame_id" value="ladybug0" />
    <param name="bayer_pattern" value="rggb" />
    <param name="auto_white_balance" value="2" />
</node>

As you can notice, I do not provide any calibration info, which result in uncalibrated camera_info messages. (from camera1394: If CameraInfo calibration is not available or is incompatible with the current video_mode, uncalibrated data will be provided instead.)

Which is indeed what I can observe with rostopic:

header: 
  seq: 22480
  stamp: 
    secs: 1305821789
    nsecs: 356266975
  frame_id: /ladybug0
height: 1200
width: 1600
distortion_model: ''
D: []
K: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
R: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
P: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
binning_x: 0
binning_y: 0
roi: 
  x_offset: 0
  y_offset: 0
  height: 0
  width: 0
  do_rectify: False
---

My problem is that I am able to initialize my camera model using those camera_info messages, but my program keeps crashing on the call to project3dToPixel.

Code:

cv::Point2d pixel;
pcl::PointCloud<pcl::PointXYZ> cloud_xyz;
[...]
for(int i = 0 ; i < (int) cloud_xyz.size(); i++)
{
     if (isnan (cloud_xyz.points[i].x) || isnan (cloud_xyz.points[i].y) || isnan (cloud_xyz.points[i].z))
            continue;
     ROS_INFO("point with coordinates %f, %f, %f", cloud_xyz.points[i].x, cloud_xyz.points[i].y, cloud_xyz.points[i].z);
     ROS_INFO("A");
     cv::Point3d point(cloud_xyz.points[i].x, cloud_xyz.points[i].y, cloud_xyz.points[i].z);
     ROS_INFO("B");
     pixel = cam_model.project3dToPixel(point);

Trace:

[ INFO] [1305820636.985045709]: point with coordinates 0.245843, -6.119996, 0.848742
[ INFO] [1305820636.985082376]: A
[ INFO] [1305820636.985117506]: B
Segmentation fault

I had a look inside image_geometry::PinholeCameraModel's documentation but I can't find any information on the case where the camera_info messages are 0.

My best guess so far is that the on calibrated camera_info message triggers the segfault at runtime. Does anyone has experience with this issue?

Thanks for your help

Raph

2014-04-20 12:22:27 -0600 marked best answer Coloring point clouds from images - how to match 3Dpoint/pixel efficiently?

Hello all,

my colleague and I are developing a small node that colors a point cloud using a rgb image.

One of the bottleneck we found is using openCV to project each pixel back on the image_plane in order to find which pixel corresponds to which 3Dpoint, using camera models.

After browsing the ROS packages for a while, I stumbled upon the package pcl_point_cloud2_image_color which seems to do the exact same thing. Curious, we opened-up the code to see the trick used.

We were surprised to find the following:

void 
  pcl_point_cloud2_image_color::PointCloud2ImageColor::getColorPointCloud2 (const sensor_msgs::PointCloud2ConstPtr &cloud, 
                                                                            const sensor_msgs::ImageConstPtr &image,
                                                                            sensor_msgs::Image &img_out,
                                                                            pcl::PointCloud<pcl::PointXYZRGB> &cloud_out)
{
  pcl::PointCloud<PointRGB> cloud_color;
  cloud_color.width    = cloud->width;
  cloud_color.height   = cloud->height;
  cloud_color.is_dense = true;
  cloud_color.points.resize (cloud_color.width * cloud_color.height);

  // Convert to a templated type
  pcl::PointCloud<pcl::PointXYZ> cloud_xyz;
  pcl::fromROSMsg (*cloud, cloud_xyz);

  img_out = *image;
  // Cast image to IplImage
  sensor_msgs::CvBridge img_bridge;
  cv::Mat img = img_bridge.imgMsgToCv (image);

  // Assign colors from the rectified image
  int i = 0;
  for (size_t u = 0; u < image->height; ++u)   // rows
  {
    for (size_t v = 0; v < image->width; ++v, ++i)  // cols
    {
      // If the point is invalid
      if (isnan (cloud_xyz.points[i].x) || isnan (cloud_xyz.points[i].y) || isnan (cloud_xyz.points[i].z))
        continue;
      // Get the color information
      uint8_t g = img.at<uint8_t>(u, v);
      int32_t rgb = (g << 16) | (g << 8) | g;
      cloud_color.points[i].rgb = *(float*)(&rgb);
    }
  }

  // Concatenate the XYZ information with the RGB one
  pcl::concatenateFields (cloud_xyz, cloud_color, cloud_out);
}

As one can see, this function does the following processing:

  1. Create a dense PointRGB cloud with the same number of points as in the sensor message.
  2. Convert the sensor message into a PointXYZ cloud.
  3. Iterate over each pixel of the image and assign its color to a point of the PointRGB cloud.
  4. Concatenate the PointRGB and PointXYZ clouds.

What I do not get here is how are we sure pixel[u,v] corresponds to point[i]? How come is there no 3D to 2D projection involved in the pixel/point matching?

I feel I must be missing an important optimization trick here. If anyone can explain, I would be very grateful.

Thanks in advance

Raph

2014-04-20 12:22:26 -0600 marked best answer Is there a laser assembler that produces PointCloud2?

Hello,

I am using the laser_assembler package to assemble laser scans. This implementation outputs pointCloud messages, and in parallel, point_cloud_converter has been deprecated for diamondback.

Is there any implementation of laser assembler that would already output pointCloud2 format? Or is there anything planned to implement such a node? Else, I can modify laser_assembler myself.

Thanks in advance

Raph

2014-04-20 12:22:26 -0600 marked best answer is there any package for IP camera?

Hello,

would anyone know a package able to connect to an IP camera and send its frames as sensor_msgs/Image?

Thanks

Raph

2014-04-20 12:22:21 -0600 marked best answer pcl_to_octree cannot compile. Octomap bug?

Hello,

I am trying to compile the package next_best_view which depends on pcl_to_octree. Pcl_to_octree's compilation fails due to an inner octomap function.

From the line

/opt/ros/diamondback/stacks/octomap_mapping/octomap/octomap/include/octomap/OcTreeBase.hxx:484: error: no matching function for call to ‘octomap::OcTreeBase<octomap::OcTreeNodePCL>::genCoordFromKey(short unsigned int&, double&) const’

of my build output, it seems that the error is due to a cast double->float cast problem.

As the function calling genCoordFromKey is in a /opt/ros directory, I'm starting to think I might have found a bug in octomap itself. Could someone tell me if I am correct? Or am I plainly wrong?

Thanks in advance

Raph

----------

here is the compilation log:

[rosmake-0] Starting >>> pcl_to_octree [ make ]                                                                                                              
[ rosmake ] Last 40 linesl_to_octree: 5.3 sec ]                                                                                   [ 1 Active 43/44 Complete ]
{-------------------------------------------------------------------------------
  -- Build files have been written to: /home/raph/rosnodes/ROBOT/mojo_dependencies/tum_mapping/pcl_to_octree/build
  cd build && make -l2
  make[1]: Entering directory `/home/raph/rosnodes/ROBOT/mojo_dependencies/tum_mapping/pcl_to_octree/build'
  make[2]: Entering directory `/home/raph/rosnodes/ROBOT/mojo_dependencies/tum_mapping/pcl_to_octree/build'
  make[3]: Entering directory `/home/raph/rosnodes/ROBOT/mojo_dependencies/tum_mapping/pcl_to_octree/build'
  make[3]: Leaving directory `/home/raph/rosnodes/ROBOT/mojo_dependencies/tum_mapping/pcl_to_octree/build'
  [  0%] Built target rospack_genmsg_libexe
  make[3]: Entering directory `/home/raph/rosnodes/ROBOT/mojo_dependencies/tum_mapping/pcl_to_octree/build'
  make[3]: Leaving directory `/home/raph/rosnodes/ROBOT/mojo_dependencies/tum_mapping/pcl_to_octree/build'
  [  0%] Built target rosbuild_precompile
  make[3]: Entering directory `/home/raph/rosnodes/ROBOT/mojo_dependencies/tum_mapping/pcl_to_octree/build'
  make[3]: Leaving directory `/home/raph/rosnodes/ROBOT/mojo_dependencies/tum_mapping/pcl_to_octree/build'
  make[3]: Entering directory `/home/raph/rosnodes/ROBOT/mojo_dependencies/tum_mapping/pcl_to_octree/build'
  [ 14%] Building CXX object CMakeFiles/octree_pcl.dir/src/pcl_to_octree/octree/OcTreePCL.o
  /home/raph/rosnodes/ROBOT/mojo_dependencies/tum_mapping/pcl_to_octree/src/pcl_to_octree/octree/OcTreePCL.cpp: In member function ‘unsigned int octomap::OcTreePCL::memoryUsage() const’:
  /home/raph/rosnodes/ROBOT/mojo_dependencies/tum_mapping/pcl_to_octree/src/pcl_to_octree/octree/OcTreePCL.cpp:73: warning: ‘void octomap::OcTreeBase<NODE>::getLeafNodes(std::list<std::pair<octomath::Vector3, double>, std::allocator<std::pair<octomath::Vector3, double> > >&, unsigned int) const [with NODE = octomap::OcTreeNodePCL]’ is deprecated (declared at /opt/ros/diamondback/stacks/octomap_mapping/octomap/octomap/include/octomap/OcTreeBase.hxx:550)
  /home/raph/rosnodes/ROBOT/mojo_dependencies/tum_mapping/pcl_to_octree/src/pcl_to_octree/octree/OcTreePCL.cpp: In member function ‘void octomap::OcTreePCL::insertScanUniform(const octomap::ScanNode&, double)’:
  /home/raph/rosnodes/ROBOT/mojo_dependencies/tum_mapping/pcl_to_octree/src/pcl_to_octree/octree/OcTreePCL.cpp:224: warning: ‘double octomath::Vector3::norm2() const’ is deprecated (declared at /opt/ros/diamondback/stacks/octomap_mapping/octomap/octomap/include/octomap/math/Vector3.h:272)
  /home/raph/rosnodes/ROBOT/mojo_dependencies/tum_mapping/pcl_to_octree/src/pcl_to_octree/octree/OcTreePCL.cpp:238: warning: ‘octomath::Vector3 octomath::Vector3::unit() const’ is deprecated (declared at /opt/ros/diamondback/stacks/octomap_mapping/octomap/octomap/include/octomap/math/Vector3.h:289)
  /home/raph/rosnodes/ROBOT/mojo_dependencies/tum_mapping/pcl_to_octree/src/pcl_to_octree/octree/OcTreePCL.cpp:251: warning: ‘void octomap::OcTreeBase<NODE>::getLeafNodes(std::list<std::pair<octomath::Vector3, double>, std::allocator<std::pair<octomath::Vector3, double> > >&, unsigned int) const [with NODE = octomap::CountingOcTreeNode]’ is deprecated (declared at /opt ...
(more)
2014-04-20 12:22:17 -0600 marked best answer Tuning Navigation - robot keeps rotating when close to its goal

Hello,

My robot Mojo and I are happily trying to use the navigation stack.

After a bit of parameter tuning, I managed to get it follow its planned path quite well.

My only problem is that things get pretty rotational when Mojo closes on its goal. As you can see in this video, it is like if it forgets it can also not move forward while rotating. Mojo is fitted with a differential drive.

I tried to play with some parameters of the base planner, but I can't really figure out how to stop this annoying rotation. This is not my first experience with the navigation stack and I know it is possible to reach the goal far better than that.

Has anyone ever experienced this behaviour? How could I make it stop?

Here are my base planner parameters:

TrajectoryPlannerROS:
  max_vel_x: 0.45
  min_vel_x: 0.1

  max_rotational_vel: 0.5
  min_in_place_rotational_vel: 0.1

  acc_lim_th: 0.25
  acc_lim_x: 0.5

  vx_samples: 5                       #default is 3, I feel like putting 5. I'm the architect after all! :)
  vtheta_samples: 20                  #default is 20

  holonomic_robot: false

  path_distance_bias: 5.0             #default .6
  goal_distance_bias: 0.8             #default .8
  occdist_scale: 0.01                 #default 0.01

  heading_lookahead: 0.325            #default 0.325m   
  heading_scoring: false              #default false
  heading_scoring_timestep: 5.0       #default 0.8 sec

  sim_time: 5.0                       #default is 1.0 - simulate 5 seconds ahead
  sim_granularity: 0.025              #default is 0.025 - simulation with steps of 2.5 cm

  dwa: false                          #I prefer trajectory rollout as I can see it in rviz

  xy_goal_tolerance: 0.2              #default is 10cm but I think AMCL makes it too giggly for this to be safe
  yaw_goal_tolerance: 0.09            #default is 0.05 rad (~3 degrees), I changed it to 5

Thanks in advance for your help

Raph

2014-04-20 12:22:12 -0600 marked best answer Which microphones are the best to use with hark?

Hello,

We are planning to use hark and are curious about any advice anyone would have relative to choosing the correct microphone array. Some of them come with usb interfaces, some with jack. Some have 2 microphones, some up to 8.

In your experience(s), what would be the best choice to use on a robot with a standard laptop onboard?

Thanks in advance

Raph

2014-04-20 12:22:07 -0600 marked best answer What is the default behavior of the odometry display in Rviz?

Hello,

I am wondering what is the default behaviour I should expect from the odomety display we have in Rviz.

More precisely, I wonder if the odometry arrows should follow the twist information:

  • Should the arrow point toward where the robot is going? I mean, when the robot drives backward, should the arrows point toward its back or is it normal that they stay oriented toward its front?
  • Should the arrow's length be proportional with the instant velocities carried in the twist section of the odometry message?

Thanks in advance

Raph

2014-04-20 12:21:40 -0600 marked best answer How to make ReIn with Ubuntu 10.10 (Maverick)?

Hello,

the Recognition Infrastructure does not compile with Maverick (see its ROS_BUILD_BLACKLIST file). The problem is that soci.h is (strangely) not found by cmake. Is there any action going on to solve this issue at the moment?

I see some people are actively using some of the packages contained in the object_recognition stack. Could they explain how to do so using maverick?

I feel I am asking something stupid here, but I really can't figure out how to solve that cmake problem and use this stack. Any hint is welcome.

Thanks in advance

Raph

2014-04-20 12:21:35 -0600 marked best answer Could we have a "remove all topics subscriptions" button in Rviz?

Hello,

I am facing a lot the case where I start rviz with an old configuration and have to erase all my previous topic subscriptions one by one.

I know one can save and load configurations but having a simple button that would remove all the topic subscription (or the possibility to select several and remove them by pressing erase) would be a huge time-saver I think.

Raph

2014-04-20 12:21:32 -0600 marked best answer why cannot I tag one of my answers as answering my own question?

Hello,

I had the case today where I asked a question and found the answer myself a few hours later. I then posted the solution by answering my own original question.

Now I'd like to mark my original question as "answered" by clicking my solution as answering my original question. But the system insists that I cannot accept my own answer for my own question.

I am afraid that with time, a lot of questions might be left unanswered and will pile up on the main page of ros answers.

So here is the question: is this behaviour wanted?

Raph

2014-04-20 12:21:28 -0600 marked best answer Is there an existing implementation to save an Octomap octree as a PCD file?

Hello,

I am wondering if there is already a way to save an octree generated with Octomap as a pcd file?

Raph