From: Nate K. <nat...@gm...> - 2010-06-23 14:12:11
|
The problem may also be related to a "feature" that has been added to gazebo. Sensors will not generate data unless an external program requests data. So, if you run gazebo without connecting to the laser via shared memory, Player, or through ROS then the laser will not generate data and it will seem to pass through objects. You can also add the <alwaysActive> tag to a sensor: <sensor:ray> <alwaysActive>true</alwaysActive> </sensor:ray> Which will force the sensor on. -nate On Tue, Jun 22, 2010 at 2:45 AM, John Hsu <jo...@wi...> wrote: > I found a couple of things that might be giving you grief. Attached is a > slightly modified cylinder1 model that should work. Mainly, the visual and > collision geometry in your cylinder1 object model file do not match, > collision size is specified by <size>radius length</size> and visual scale > specifies the bounding box scale of a unit_cylinder. Your collision > cylinder is 1m tall and 1m wide (0.5m radius), but visual cylinder is half > of that in all three dimensions. > This might be unrelated, but there appears to be a bug in gui manipulation > of static bodies as well, I'll investigate further, but quick glance it > seems that using the gazebo gui to drag a static body around does not > actually move its collision geometry. > > hope this helps. > John > > On Sat, Jun 19, 2010 at 8:26 PM, zhangqun <zha...@gm...> wrote: > >> >> Hi, John, thanks for your reply. I post my world file and sicklms200 laser >> model below. I only put one cylinder there for test. In the laser model, >> the >> tab <displayRays>, no matter i put fan, false or lines values, the laser >> beams still can pass through the objects. Actually, even the example world >> file coming with gazebo 0.10.0, like pioneer2dx.world, the laser beams can >> also pass through the object. So i dont think it is the world file problem. >> And I further test the new laser model (gazebo 0.10.0) in my old version >> gazebo (0.8pre3), and the laser beems work fine. Thanks. >> >> world file: >> >> <?xml version="1.0"?> >> >> <gazebo:world >> xmlns:xi="http://www.w3.org/2001/XInclude" >> xmlns:gazebo="http://playerstage.sourceforge.net/gazebo/xmlschema/#gz" >> xmlns:model="http://playerstage.sourceforge.net/gazebo/xmlschema/#model" >> xmlns:sensor="http://playerstage.sourceforge.net/gazebo/xmlschema/#sensor >> " >> xmlns:window="http://playerstage.sourceforge.net/gazebo/xmlschema/#window >> " >> xmlns:param="http://playerstage.sourceforge.net/gazebo/xmlschema/#param" >> 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" >> >> xmlns:interface=" >> http://playerstage.sourceforge.net/gazebo/xmlschema/#interface" >> xmlns:ui="http://playerstage.sourceforge.net/gazebo/xmlschema/#ui" >> >> xmlns:rendering=" >> http://playerstage.sourceforge.net/gazebo/xmlschema/#rendering" >> >> xmlns:controller=" >> http://playerstage.sourceforge.net/gazebo/xmlschema/#controller" >> >> xmlns:physics=" >> http://playerstage.sourceforge.net/gazebo/xmlschema/#physics" >> > >> >> <verbosity>5</verbosity> >> >> <physics:ode> >> <stepTime>0.03</stepTime> >> <gravity>0 0 -9.8</gravity> >> <cfm>10e-5</cfm> >> <erp>0.3</erp> >> <updateRate>0</updateRate> >> </physics:ode> >> >> <rendering:gui> >> <type>fltk</type> >> <size>800 600</size> >> <pos>0 0</pos> >> <xyz>0 0 0</xyz> >> <rpy>0 0 0</rpy> >> <updateRate>20</updateRate> >> >> <frames> >> <row height="100%"> >> <camera width="100%"> >> <xyz>0.35 -0.5 0.43</xyz> >> <rpy>0 14 111.5</rpy> >> </camera> >> </row> >> </frames> >> </rendering:gui> >> >> <rendering:ogre> >> <ambient>0.5 0.5 0.5 1.0</ambient> >> <sky> >> <material>Gazebo/CloudySky</material> >> </sky> >> >> <fog> >> <color>1.0 1.0 1.0</color> >> <linearStart>10</linearStart> >> <linearEnd>100</linearEnd> >> </fog> >> </rendering:ogre> >> >> <!-- Ground Plane --> >> <model:physical name="plane1_model"> >> <xyz>0 0 0</xyz> >> <rpy>0 0 0</rpy> >> <static>true</static> >> >> <body:plane name="plane1_body"> >> <geom:plane name="plane1_geom"> >> <normal>0 0 1</normal> >> <size>2000 2000</size> >> <segments>10 10</segments> >> <uvTile>100 100</uvTile> >> <material>Gazebo/Grey</material> >> </geom:plane> >> </body:plane> >> </model:physical> >> >> <model:physical name="cylinder1_model"> >> <xyz>3.15 1.68 .3</xyz> >> <rpy>0.0 0.0 0.0</rpy> >> <static>true</static> >> >> <body:cylinder name="cylinder1_body"> >> <geom:cylinder name="cylinder1_geom"> >> <size>0.5 1</size> >> <mass>1.0</mass> >> <visual> >> <scale>0.5 0.5 0.5</scale> >> <mesh>unit_cylinder</mesh> >> <material>Gazebo/Color</material> >> </visual> >> </geom:cylinder> >> </body:cylinder> >> </model:physical> >> >> >> <model:physical name="pioneer2dx_model1"> >> <xyz>0 0 0.145</xyz> >> <rpy>0.0 0.0 0.0</rpy> >> >> >> <model:physical name="laser"> >> <xyz>0.15 0 0.18</xyz> >> >> <attach> >> <parentBody>chassis_body</parentBody> >> <myBody>laser_body</myBody> >> </attach> >> >> <include embedded="true"> >> <xi:include href="models/sicklms200.model" /> >> </include> >> </model:physical> >> >> >> <include embedded="true"> >> <xi:include href="models/pioneer2dx.model" /> >> </include> >> </model:physical> >> >> <!-- White Directional light --> >> <model:renderable name="directional_white"> >> <light> >> <type>directional</type> >> <direction>0 -0.6 -0.4</direction> >> <diffuseColor>1.0 1.0 1.0</diffuseColor> >> <specularColor>0.2 0.2 0.2</specularColor> >> <range>20</range> >> <attenuation>1000 1.0 0.0 0</attenuation> >> </light> >> </model:renderable> >> >> >> </gazebo:world> >> >> part of laser model: >> >> <sensor:ray name="laser_1"> >> <rayCount>180</rayCount> >> <rangeCount>361</rangeCount> >> <origin>0.05 0.0 0</origin> >> >> <minAngle>-90</minAngle> >> <maxAngle>90</maxAngle> >> >> <minRange>0.1</minRange> >> <maxRange>8</maxRange> >> <displayRays>fan</displayRays> >> >> <!--<displayRays>lines</displayRays>--> >> <!--<displayRays>false</displayRays>--> >> >> <resRange>1</resRange> >> >> <controller:sicklms200_laser name="laser_controller_1"> >> <interface:laser name="laser_iface_0"/> >> <interface:fiducial name="fiducial_iface_0"/> >> </controller:sicklms200_laser> >> </sensor:ray> >> >> >> >> >> Hi, >> can you post your world file so I can try and reproduce the issue? thanks, >> John >> >> On Jun 19, 2010 7:55 AM, "zhangqun" <zha...@gm...> wrote: >> >> >> >> -- >> View this message in context: >> http://old.nabble.com/Laser-beams-passing-through-objects-tp28934167p28938580.html >> Sent from the playerstage-gazebo mailing list archive at Nabble.com. >> >> >> >> ------------------------------------------------------------------------------ >> ThinkGeek and WIRED's GeekDad team up for the Ultimate >> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the >> lucky parental unit. See the prize list and enter to win: >> http://p.sf.net/sfu/thinkgeek-promo >> _______________________________________________ >> Playerstage-gazebo mailing list >> Pla...@li... >> https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo >> > > ------------------------------------------------------------------------------ > ThinkGeek and WIRED's GeekDad team up for the Ultimate > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the > lucky parental unit. See the prize list and enter to win: > http://p.sf.net/sfu/thinkgeek-promo > _______________________________________________ > Playerstage-gazebo mailing list > Pla...@li... > https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo > > |