Gazebo | Ignition | Community
Ask Your Question

agonzamart's profile - activity

2016-04-07 21:35:43 -0500 commented question Time stamp error in Gazebo simulated kinect

Thank you so much for the answer. I eventually was able to get that working about three years ago ;)

2014-04-26 17:34:19 -0500 received badge  Famous Question (source)
2013-10-14 13:53:54 -0500 received badge  Taxonomist
2013-10-12 23:14:40 -0500 received badge  Notable Question (source)
2013-09-08 17:59:37 -0500 received badge  Popular Question (source)
2013-07-31 00:50:27 -0500 received badge  Favorite Question (source)
2013-07-29 05:20:43 -0500 received badge  Famous Question (source)
2013-07-13 15:34:20 -0500 received badge  Famous Question (source)
2013-07-12 06:41:51 -0500 asked a question Time stamp error in Gazebo simulated kinect

I have a Gazebo-Ros simulation where I use a range laser to get scans which is working properly and I am able to use the autonomous navigation on a simulated environment. Now I wanted to use a kinect as a sensor to get scans using the depthimage to laserscan node to substitute the range laser. After simulating this kinect, including all the different config files, nodes... I am able to read the scans after the cloudthrottle, so I think I have much of it correctly configured, but I am having problems with the tf's tranformations for this simulated kinect, when I try to read the topic inside rviz I get an error that the message is to old. I am able to se the image for this camera in rviz ( I really don't know why I do not get the same error in rviz with this topic because it's time stamp is not correct either) If I do a rostopich echo of the /scan topic created from this depth image I see that the time stamp is different from the other topics such as the /map topic which, as normally, I use as static frame. All the rostopic echo I do from the topics of the camera simulated in Gazebo have a different time stamp than the rest.

For the /scan created from this kinect I have a static transformation, after remapping the output frame topic of depth imagetolaserscan to /camera_depth

< node pkg="tf" type="statictransformpublisher" name "depthcamtf" args="0 -0.02 0 0 0 0 /baselink /cameradepth >

The viewframes tree seems correct, using tfmonitor everything looks is being publish with the proper freq. So the problem must be this difference in the time stamp.

Anyone can help me with this issue?

Gazebo is not publishing in the /clock topic. I have /usesimtime set to "true". Is there anything else needed to publish Gazebo's clock?

Thank u!

2013-07-04 07:48:02 -0500 answered a question can't get output of kinect

I do not know If you are planning to use this kinect sensor for using it with Ros, but I have been able to make it work defining it in the .sdf this way:

<sensor type="depth" name="camera1">
   <!--<alwaysOn>1</alwaysOn> --> 
    <update_rate>30.0</update_rate>
    <camera name="head">
    <horizontal_fov>1.3962634</horizontal_fov>
    <image>
      <width>800</width>
      <height>800</height>
      <format>R8G8B8</format>
    </image>
    <clip>
      <near>0.02</near>
      <far>300</far>
    </clip>
    <noise>
      <type>gaussian</type>
      <!-- Noise is sampled independently per pixel on each frame.  
           That pixel's noise value is added to each of its color
           channels, which at that point lie in the range [0,1]. -->
      <mean>0.0</mean>
      <stddev>0.007</stddev>
    </noise>
  </camera>
  <plugin name="camera_controller" filename="libDepthCameraPlugin.so">
  <always_on>1</always_on>
    <updateRate>0.0</updateRate>
    <frameName>camera_link</frameName>
    <hackBaseline>0.07</hackBaseline>
    <distortionK1>0.0</distortionK1>
    <distortionK2>0.0</distortionK2>
    <distortionK3>0.0</distortionK3>
    <distortionT1>0.0</distortionT1>
    <distortionT2>0.0</distortionT2>
  </plugin>
 <plugin name="kinect" filename="libgazebo_ros_openni_kinect.so">
    <always_on>1</always_on>
<updateRate>10.0</updateRate>
<image_topic_name>image_raw</image_topic_name>
    <point_cloud_topic_name>points</point_cloud_topic_name>
    <camera_info_topic_name>camera_info</camera_info_topic_name>
    <cameraName>depth_cam</cameraName>
    <frameName>/base_link</frameName>
    <point_cloud_cutoff>0.001</point_cloud_cutoff>
<distortionK1>0.00000001</distortionK1>
    <distortionK2>0.00000001</distortionK2>
    <distortionK3>0.00000001</distortionK3>
    <distortionT1>0.00000001</distortionT1>
 <distortionT2>0.00000001</distortionT2>
  </plugin>
</sensor>
</link>

  <joint name="kinect_joint" type="revolute">
    <child>kinect::link</child>
    <parent>chassis</parent>
    <axis>
      <xyz>0 0 1</xyz>
      <limit>
        <upper>0</upper>
        <lower>0</lower>
      </limit>
    </axis>
  </joint>

I am still trying to make better this .sdf because I have some warnings and I think some tags are not being used, but still I am able to get publish a ros topic with the data from this simulated kinect.

I hope it helps and we could keep in touch if you want and are going to work with this so we can help each other.

2013-07-04 07:40:54 -0500 commented answer Kinect sensor gazebo-ros

I really appreciate your help and time

2013-07-04 07:40:18 -0500 commented answer Kinect sensor gazebo-ros

I also see here: http://gazebosim.org/wiki/Tutorials/1.9/ROSMotorandSensorPlugins in the Skid Steering Drive paragraph for example that the <alwaysOn> tag is used inside the plugin, I see no difference between using the tag inside the plugin or not using it so I assume that it is not being used. On the other hand when I use a gztopic I can not see wich one is from the camera, but gazebo must be publishing this topic if I can read it trough the ros topic. I think I might not getting something

2013-07-04 07:19:50 -0500 commented answer Kinect sensor gazebo-ros

Error [parser.cc:719] XML Element[alwaysOn], child of element[sensor] not defined in SDF. Ignoring.[sensor] Error [parser.cc:710] Error reading element <sensor> Error [parser.cc:710] Error reading element <link> Error [parser.cc:710] Error reading element <model> Error [parser.cc:710] Error reading element <world> Error [parser.cc:369] Unable to read element <sdf> Error [Server.cc:253] Unable to read sdf file

2013-07-04 07:07:44 -0500 commented answer Kinect sensor gazebo-ros

nkoening I was checking out the config I used for the .sdf to make the kinect work and I realized I did't use the <alwaysOn> tag at all. But I still get ros topics published. I can add a image viewer to rviz and I see the image from the simulated camera /depthcam/depth/imageraw. I even used a cloudthrottle to make a laserscan and seems to work properly. But if I try to add the <alwaysOn> tag as a child of sensor I get an error from the .sdf parser

2013-07-04 03:37:46 -0500 received badge  Notable Question (source)
2013-06-30 12:35:29 -0500 commented answer Kinect sensor gazebo-ros

Thanks I had already solved it but I didn't know exactly what had made it work. I appreciate it! :)

2013-06-30 12:32:51 -0500 received badge  Popular Question (source)
2013-06-21 14:30:23 -0500 asked a question Kinect sensor gazebo-ros

I am trying to add a kinect sensor to a simulation I have already running using a hokuyo laser as sensor for navigation. I want to add the kinect sensor in order to simulate navigation using point clouds. I have all of this already running in the real robot.

I am using ros groovy and Gazebo 1.6

The important part of the .sdf I use is at the end of the question. I have gone through the tutorials but I am still not sure about how sensors and plugins properly work. For what I understand just adding the camera depth sensor should get the topic from gazebo listed in a gztopic list, but I do not see this happening. And for what I understand adding the plugin besides adding new functionalities should make the bridge to ros available so that it would publish in the same topics as a depth camera does in ros.

I am pretty stuck so I would appreciate any help.

Thanks for our time.


<link name="kinect::link"> <pose>0.2 0 0.265 0 0 0</pose> <inertial> <mass>0.1</mass> </inertial> <collision name="collision"> <geometry> <box> <size>0.073000 0.276000 0.072000</size> </box> </geometry> </collision> <visual name="visual"> <geometry> <mesh> <uri>model://kinect/meshes/kinect.dae</uri> </mesh> </geometry> </visual>

  <sensor name="camera" type="depth">
    <pose>0.2 0 0.265 0 0 0</pose>
    <update_rate>20</update_rate>
    <camera>
      <horizontal_fov>1.047198</horizontal_fov>
      <image>
        <width>640</width>
        <height>480</height>
        <format>R8G8B8</format>
      </image>
      <clip>
        <near>0.05</near>
        <far>3</far>
      </clip>
    </camera>
    <plugin name="camera" filename='libDepthCameraPlugin.so'>
        <alwaysOn>1</alwaysOn>
    <updateRate>10.0</updateRate>
    <image_topic_name>image_raw</image_topic_name>
        <point_cloud_topic_name>points</point_cloud_topic_name>
     <camera_info_topic_name>camera_info</camera_info_topic_name>
    <cameraName>depth_cam</cameraName>
        <frameName>/base_link</frameName>
        <point_cloud_cutoff>0.001</point_cloud_cutoff>
    <distortionK1>0.00000001</distortionK1>
        <distortionK2>0.00000001</distortionK2>
        <distortionK3>0.00000001</distortionK3>
        <distortionT1>0.00000001</distortionT1>
        <distortionT2>0.00000001</distortionT2>
  </sensor>
</link>

  <joint name="kinect_joint" type="revolute">
    <child>kinect::link</child>
    <parent>chassis</parent>
    <axis>
      <xyz>0 0 1</xyz>
      <limit>
        <upper>0</upper>
        <lower>0</lower>
      </limit>
    </axis>
  </joint>
2013-05-12 00:10:08 -0500 received badge  Notable Question (source)
2013-05-09 01:01:08 -0500 received badge  Popular Question (source)
2013-05-08 15:29:52 -0500 received badge  Editor (source)
2013-05-08 15:18:07 -0500 commented answer Sicklms200 model for Gazebo

Hi thank you for the answer, but is not quite working. The problem is that the file I found is a .model file not a .sdf file I explained above...

2013-05-07 15:21:51 -0500 received badge  Scholar (source)
2013-04-28 09:44:37 -0500 asked a question Sicklms200 model for Gazebo

Anyone knows where I can find a Sicklms200 model for Gazebo 1.6. I see that in the old versions was a model included but know it is not in the gazebo/models repository. I found the old sicklms200.model and the .mesh file but I do not know where I have to put them in order to work.

I would appreciate any help

The problem is that I got an siclms200.model file that looks like this:

<model:physical name="default&lt;em&gt;sicklms200&lt;/em&gt;model" xmlns:model="&lt;a href=" http:="" playerstage.sourceforge.net="" gazebo="" xmlschema="" #model"="">http://playerstage.sourceforge.net/gazebo/xmlschema/#model"

xmlns:controller="http://playerstage.sourceforge.net/gazebo/xmlschema/#controller"

xmlns:interface="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface"

xmlns:sensor="http://playerstage.sourceforge.net/gazebo/xmlschema/#sensor"

xmlns:body="http://playerstage.sourceforge.net/gazebo/xmlschema/#body"

xmlns:geom="http://playerstage.sourceforge.net/gazebo/xmlschema/#geom"

xmlns:joint="http://playerstage.sourceforge.net/gazebo/xmlschema/#joint"

>

< x y z> 0 0.0 0.0 < /x y z>

< r p y> 0 0 0< /r p y>

< canonicalBody> laser_body < /canonicalBody >

< body:box name="laser_body" >

<xyz>0.0 0.0 0.0</xyz>

<rpy>0.0 0.0 0.0</rpy>

< geom:box name="laser_geom1" >

  <xyz>0.0 0.0 0.0</xyz>

  <rpy>0 0 90</rpy>

  <size>0.15 0.15 0.2</size>

  <mass>0.01</mass>

  <visual>

    <scale>0.07 0.07 0.1</scale>

    <mesh>sicklms200.mesh</mesh>

    <material>Gazebo/Blue</material>

  </visual>

  <visual>

    <rpy>0 0 0</rpy>

    <size>0.12 0.12 0.18</size>

    <mesh>unit_cylinder</mesh>

    <material>Gazebo/Black</material>

  </visual>

</geom:box>

<sensor:ray name="laser_1">

  <rayCount>180</rayCount>

  <rangeCount>361</rangeCount>

  <origin>0.05 0.0 0</origin>

  <displayRays>fan</displayRays>

  <minAngle>-90</minAngle>

  <maxAngle>90</maxAngle>

  <minRange>0.1</minRange>

  <maxRange>8</maxRange>

  <resRange>.1</resRange>

  <alwaysActive>true</alwaysActive>

  <controller:sicklms200_laser name="laser_controller_1">

    <interface:laser name="laser_iface_0"/>

    <interface:fiducial name="fiducial_iface_0"/>

  </controller:sicklms200_laser>

</sensor:ray>

</body:box>

</model:physical>

And is not quite the same as the .sdf file for example from hokuyo laser. I don't know how to make it work, I have tried to change it to a sdf file format but still I can not make it work because I have a sicklms200.mesh file not a sicklms200.dae file and it gives me an error and does not work. I don't know why is this.

I don't know what is the best way of approaching the problem. I don't know how to update the model or how to make it work and I don't know where I can find some information. I am a bit lost.

I would appreciate any help.