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

bsatzinger's profile - activity

2020-02-02 07:37:02 -0500 received badge  Famous Question (source)
2017-06-30 08:08:26 -0500 received badge  Good Answer (source)
2016-08-05 12:09:53 -0500 received badge  Notable Question (source)
2016-02-08 13:29:44 -0500 received badge  Nice Answer (source)
2013-09-13 08:46:12 -0500 received badge  Popular Question (source)
2013-07-16 13:19:19 -0500 asked a question Gazebo loads slowly with around 500 objects in world

Hi,

I have a world file that has a large number of objects (>500) in particular poses. The model I created for these objects (they are all the same) is static, so they should just be fixed in space and only providing collision geometry to gazebo.

I am including these objects in the world file like this (and you can probably guess what the overall pattern is):

<include>
  <uri>model://fixed_block</uri>
<name>cinder_block_546</name>
<pose> 1.5151875 1.29227101498 0.154424735785 1.57079632679 -0.261799387799 -1.57079632679 </pose>

They seem to behave correctly (eventually all the objects appear in the right places), but as the number of objects increases gazebo takes longer and longer to start up. The GUI opens, but the world does not appear for several minutes, while gazebo takes up a CPU core doing something. I suppose I could just wait, but it seems unnecessary to take a break every time I start gazebo.

Is there a workaround to make loading faster? Or is this an algorithmic limitation in how Gazebo is handling this collision geometry somehow (and if so, can someone comment on where this problem might be, and how to word a bug report)?

Thanks!

2013-03-11 18:06:13 -0500 received badge  Enlightened (source)
2012-12-02 22:09:57 -0500 received badge  Good Answer (source)
2012-11-08 05:06:01 -0500 received badge  Nice Answer (source)
2012-08-27 06:22:49 -0500 commented answer Problem with Gazebo after update.

I'm seeing similar problems as well. Is there documentation somewhere on the best way to checkout simulator_gazebo from svn trunk and replace the existing version I got from apt-get without goofing everything up?

2012-08-23 17:50:32 -0500 received badge  Notable Question (source)
2012-08-23 17:50:32 -0500 received badge  Famous Question (source)
2012-05-03 04:11:40 -0500 received badge  Popular Question (source)
2012-04-30 06:26:35 -0500 received badge  Necromancer (source)
2011-09-27 07:56:15 -0500 answered a question How to execute floor collision map demo in ucsb-ros-pkg

Hi,

I'm the creator of that demo, so I should be able to help you out. I haven't uploaded the code to our public svn because it could do with a little updating to clean up the code, split off sections into functions, etc. It also doesn't compile under electric because it was developed under cturtle and I haven't updated it.

This demo was mostly created for me to learn PCL, so there are lots of ways to improve the code. For example, using kd trees instead of brute force collision detection, etc.

That said, here's the source code if you want to take a look.

-Brian

  //find_floor.cpp
//Author: Brian Satzinger (bsatzinger@gmail.com)
//Demonstration of automated floor finding & reorientation through
//planar segmentation, with a collision detection function.
//Publishes several ros topics with intermediate data for debugging
//and illustrative purposes.

/*
Copyright (c) 2011, Brian Satzinger
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
    * Redistributions of source code must retain the above copyright
      notice, this list of conditions and the following disclaimer.
    * Redistributions in binary form must reproduce the above copyright
      notice, this list of conditions and the following disclaimer in the
      documentation and/or other materials provided with the distribution.
    * Neither the name of the UCSB Robotics Lab nor the
      names of its contributors may be used to endorse or promote products
      derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

//ROS Includes
#include <ros/ros.h>
#include <geometry_msgs/Polygon.h>
#include <geometry_msgs/Point32.h>

//RVIZ ROS API Includes
#include <visualization_msgs/Marker.h>
#include <visualization_msgs/MarkerArray.h>

//TF Includes
#include <tf/transform_broadcaster.h>

//PCL Includes
#include <pcl/ModelCoefficients.h>
#include <pcl/io/pcd_io.h>
#include <pcl/point_types.h>
#include <pcl/features/normal_3d.h>
#include <pcl/filters/extract_indices.h>
#include <pcl/filters/passthrough.h>
#include <pcl/filters/voxel_grid.h>
#include <pcl/sample_consensus/method_types.h>
#include <pcl/sample_consensus/model_types.h>
#include <pcl/segmentation/sac_segmentation.h>
#include <pcl_visualization/pcl_visualizer.h>
#include <pcl/filters/project_inliers.h>
#include <pcl/surface/convex_hull.h>
#include <pcl/filters/voxel_grid.h>
#include <pcl_tf/transforms.h>
#include <pcl_ros/subscriber.h>

//Other includes
#include <boost/thread/mutex.hpp>
#include <iostream>
#include <stdio.h>
#include <math.h>

using namespace std;

//Typedefs
typedef pcl::PointXYZRGB PointT;
typedef pcl ...
(more)
2011-08-15 11:26:10 -0500 answered a question Connecting two kinects with openni_camera will show only the first two topics that are read

I was referred from here

I bought a pci-express card with its own usb controller (specifically, this), but I seem to be running into similar problems.

I have a single Kinect plugged into the pci express card. If I look at the camera/rgb/image_color topic in rviz, I'm able to see the camera output, but it only publishes at 20 Hz. Once I've looked at this topic, I'm not able to view anything else until I restart the driver.

I suspect that this particular pci express card isn't keeping up with the Kinect data. (My computer is easily able to keep up with Kinect data when it is plugged directly into the motherboard.)

My question is this:

Is anyone actually running a Kinect on any pci express add-on card successfully? If so, please let me know the model number so I can buy that card in particular.

2011-08-12 09:16:45 -0500 marked best answer Multiple Kinects - 2nd openni_node never publishes anything
2011-08-12 06:00:51 -0500 asked a question Multiple Kinects - 2nd openni_node never publishes anything

Hi,

I'm trying to run multiple Kinects on one computer (for now just two Kinects). I created a modified launch files to identify each kinect by its serial number, and launch it. I'm using remap in the launch file to remap the /camera/* topics to /cameraXXXX where XXXX are the last 4 digits of the serial number. I also have a launch file to launch a bunch of static transform broadcasters.

Here are my launch files. I originally had the two camera nodes in the same launch file, but I separated them to help with troubleshooting.

The problem I'm having is this: I can launch either camera node and everything works fine. When I try to run both camera nodes at the same time, only the first one to launch publishes any point clouds (as determined by trying to view the point clouds in rviz, and using the rostopic hz command). The other one never publishes any messages.

Any thoughts? Does anyone have some example launch files that are known to work with multiple kinects?

Here are my launch files:

<launch>
  <arg name="launch_prefix" value=""/>  
  <node pkg="openni_camera" type="openni_node" name="openni_node113A" output="screen" launch-prefix="$(arg launch_prefix)">
    <param name="device_id" value="A00364A14324113A"/> <!-- this line uses device with given serial number -->
    <rosparam command="load" file="$(find openni_camera)/info/openni_params.yaml" />
    <param name="rgb_frame_id" value="/openni_rgb_optical_frame113A" />
    <param name="depth_frame_id" value="/openni_depth_optical_frame113A" />
    <param name="use_indices" value="false" />
    <param name="depth_registration" value="true" />
    <param name="image_mode" value="2" />
    <param name="depth_mode" value="2" />
    <param name="debayering" value="2" />
    <param name="depth_time_offset" value="0" />
    <param name="image_time_offset" value="0" />
    <remap from="/camera" to="/camera113A"/>
  </node>
</launch>



<launch>
  <arg name="launch_prefix" value=""/>
  <node pkg="openni_camera" type="openni_node" name="openni_node045B" output="screen" launch-prefix="$(arg launch_prefix)">
    <param name="device_id" value="B00362709389045B"/> <!-- this line uses device with given serial number -->
    <rosparam command="load" file="$(find openni_camera)/info/openni_params.yaml" />
    <param name="rgb_frame_id" value="/openni_rgb_optical_frame045B" />
    <param name="depth_frame_id" value="/openni_depth_optical_frame045B" />
    <param name="use_indices" value="false" />
    <param name="depth_registration" value="true" />
    <param name="image_mode" value="2" />
    <param name="depth_mode" value="2" />
    <param name="debayering" value="2" />
    <param name="depth_time_offset" value="0" />
    <param name="image_time_offset" value="0" />
    <remap from="/camera" to="/camera045B"/>
  </node>
</launch>



<launch>
  <node pkg="tf" type="static_transform_publisher" name="kinect_base_link_113A" args="0 -0.02 0 0 0 0  /openni_camera113A /openni_depth_frame113A 100" />  
  <node pkg="tf" type="static_transform_publisher" name="kinect_base_link1_113A" args="0 -0.04 0 0 0 0  /openni_camera113A /openni_rgb_frame113A 100" />  
  <node pkg="tf" type="static_transform_publisher" name="kinect_base_link2_113A" args="0 0 0 -1.57 0 -1.57 /openni_depth_frame113A /openni_depth_optical_frame113A  100" />  
  <node pkg="tf" type="static_transform_publisher" name="kinect_base_link3_113A" args="0 0 0 -1.57 0 -1.57 /openni_rgb_frame113A /openni_rgb_optical_frame113A 100" />  

  <node pkg="tf" type="static_transform_publisher" name="kinect_base_link_045B" args="0 -0.02 0 0 0 0  /openni_camera045B /openni_depth_frame045B 100" />  
  <node pkg="tf" type="static_transform_publisher" name="kinect_base_link1_045B" args="0 -0.04 0 0 0 0  /openni_camera045B /openni_rgb_frame045B 100" />  
  <node pkg="tf" type="static_transform_publisher" name="kinect_base_link2_045B" args="0 0 0 -1.57 0 -1.57 /openni_depth_frame045B /openni_depth_optical_frame045B  100" />  
  <node pkg="tf" type="static_transform_publisher ...
(more)
2011-08-08 20:59:00 -0500 received badge  Teacher (source)
2011-07-11 10:05:56 -0500 answered a question What's the best way to convert a ros message to a string or xml?

Hi, heres a python function which will convert a ros message object into an xml representation. It needs to be modified if you want to use a message with arrays, but it'll work for nested structures just fine.

def ros2xml(msg, name, depth=0):
xml = "";
tabs = "\t"*depth

if hasattr(msg, "_type"):
    type = msg._type
    xml = xml + tabs + "<" + name + " type=\"" + type + "\">\n"

    try:
        for slot in msg.__slots__:
            xml = xml + ros2xml(getattr(msg, slot), slot, depth=depth+1)
    except:
        xml = xml + tabs + str(msg)
    xml = xml + tabs + "</" + name + ">\n"
else:
    xml = xml + tabs + "<" + name + ">" + str(msg) + "</" + name + ">\n"
return xml