> Hi, > > I am seeing this error while running player with gazebo: > > Added file watch 9 > accepted TCP client 0 on port 6665, fd 9 > Error Subscribing to Gazebo Position2d Interface > error opening device file /tmp/gazebo-gperes-0/position. : No such file or > directory > playerc error : failed to get response > Position2dProxy::Position2dProxy()(-1) : could not subscribe > [3]- Done player scarab4.cfg > > Can you please tell me what could be wrong? I am new to using > Player/Gazebo and I am unable to fix this. Your help will be greatly > appreciated. > > Thanks. > > This is my config file:
> driver > > ( > > name "gazebo" > > provides ["simulation:0"] > > plugin "libgazeboplugin" > > server_id "default" > > ) > > > driver > ( > name "gazebo" > provides ["6665:position2d:0"] > > model "robot1" > ) > > > driver( > name "relay" > provides ["6665:opaque:0"] > ) > > driver > ( > name "gazebo" > provides ["6666:position2d:1"] > > model "robot2" > ) > > driver( > name "relay" > provides ["6666:opaque:1"] > ) > > driver > > ( > > name "gazebo" > > provides ["position3d:0"] > > gz_id "quadrotor0_position_iface" > > ) > > This is my 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.01</stepTime> > <gravity>0 0 -9.8</gravity> > <maxUpdateRate>1000</maxUpdateRate> > <cfm>1e-10</cfm> > <erp>0.2</erp> > </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> > </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> > --> > > <shadowTechnique>stencilAdditive</shadowTechnique> > <grid>false</grid> > </rendering:ogre> > > <model:physical name="tracker"> > <controller:tracker name="fiducial"> > <models> > <track name="scarab0_marker" id="0"/> > <track name="scarab1_marker" id="1"/> > </models> > <updateRate>30</updateRate> > <interface:fiducial name="iface"/> > </controller:tracker> > </model:physical> > > > <!-- 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>10000 10000</uvTile> > <material>L457/Carpet</material> > <mu1>0.8</mu1> > </geom:plane> > </body:plane> > </model:physical> > > <model:physical name="vectormap1"> > <static>true</static> > <xyz>0 0 2.7</xyz> > <body:vector_map name="vector_map_body"> > <geom:vector_map name="vector_map_geom"> > <vert_input_filename>l457_2_vert.txt</vert_input_filename> > <wall_height>2.7</wall_height> > <material>L457/Acrylic</material> > </geom:vector_map> > </body:vector_map> > </model:physical> > > <model:physical name="vectormap2"> > <static>true</static> > <xyz>0 0 0.0</xyz> > <body:vector_map name="vector_map_body"> > <geom:vector_map name="vector_map_geom"> > <vert_input_filename>l457_vert.txt</vert_input_filename> > <wall_height>2.7</wall_height> > <material>L457/Acrylic</material> > </geom:vector_map> > </body:vector_map> > </model:physical> > > <model:physical name="vectormap3"> > <static>true</static> > <xyz>0 0 0.0</xyz> > <body:vector_map name="vector_map_body"> > <geom:vector_map name="vector_map_geom"> > <poly_input_filename>connectivity_map.poly</poly_input_filename> > <wall_height>0.35</wall_height> > <material>Gazebo/Red</material> > </geom:vector_map> > </body:vector_map> > </model:physical> > > <model:physical name="quadrotor0"> > <xyz>1.5 1.5 1.0</xyz> > <rpy>0 0.0 0.0</rpy> > > <include embedded="true"> > <xi:include href="models/quadrotor.model" /> > </include> > > <!-- > <controller:quadrotor_position3d name="position"> > <bodyName>chassis_body</bodyName> > <interface:position name="iface"/> > <control_noise>0.00 0.0 0.0 0.0</control_noise> > <thrust_scale>75.0</thrust_scale> > <rp_angle_scale>0.26</rp_angle_scale> > </controller:quadrotor_position3d> > --> > > <controller:kinematic_position3d name="position"> > <bodyName>chassis_body</bodyName> > <interface:position name="iface"/> > <control_noise>0.00 0.0 0.0 0.0</control_noise> > </controller:kinematic_position3d> > </model:physical> > > <model:physical name="quadrotor1"> > <xyz>-1.5 0 2.0</xyz> > <rpy>0 0.0 0.0</rpy> > > <include embedded="true"> > <xi:include href="models/quadrotor.model" /> > </include> > > <!-- > <controller:quadrotor_position3d name="position"> > <bodyName>chassis_body</bodyName> > <interface:position name="iface"/> > <control_noise>0.00 0.0 0.0 0.0</control_noise> > <thrust_scale>75.0</thrust_scale> > <rp_angle_scale>0.26</rp_angle_scale> > </controller:quadrotor_position3d> > --> > > <controller:kinematic_position3d name="position"> > <bodyName>chassis_body</bodyName> > <interface:position name="iface"/> > <control_noise>0.00 0.0 0.0 0.0</control_noise> > </controller:kinematic_position3d> > </model:physical> > > <model:physical name="quadrotor2"> > <xyz>0 -1.0 1.0</xyz> > <rpy>0 0.0 0.0</rpy> > > <include embedded="true"> > <xi:include href="models/quadrotor.model" /> > </include> > > <!-- > <controller:quadrotor_position3d name="position"> > <bodyName>chassis_body</bodyName> > <interface:position name="iface"/> > <control_noise>0.00 0.0 0.0 0.0</control_noise> > <thrust_scale>75.0</thrust_scale> > <rp_angle_scale>0.26</rp_angle_scale> > </controller:quadrotor_position3d> > --> > > <controller:kinematic_position3d name="position"> > <bodyName>chassis_body</bodyName> > <interface:position name="iface"/> > <control_noise>0.00 0.0 0.0 0.0</control_noise> > </controller:kinematic_position3d> > </model:physical> > > <model:physical name="scarab0"> > <xyz>2.5 -1.5 0.23</xyz> > <rpy>0 0.0 -0.4</rpy> > > <model:physical name="urg"> > <xyz>0.0622340 0.0 0.17</xyz> > <include embedded="true"> > <xi:include href="models/urg_nolaser.model" > /> > </include> > </model:physical> > > > <include embedded="true"> > <xi:include href="models/scarab.model" /> > </include> > </model:physical> > > <model:physical name="scarab1"> > <xyz>-1.5 -1.5 0.23</xyz> > <rpy>0 0.0 0.0</rpy> > > <model:physical name="urg"> > <xyz>0.0622340 0.0 0.17</xyz> > <include embedded="true"> > <xi:include href="models/urg_nolaser.model" > /> > </include> > </model:physical> > > > <include embedded="true"> > <xi:include href="models/scarab.model" /> > </include> > </model:physical> > > <model:physical name="scarab2"> > <xyz>-1.0 -1.5 0.23</xyz> > <rpy>0 0.0 0.0</rpy> > > <model:physical name="urg"> > <xyz>0.0622340 0.0 0.17</xyz> > <include embedded="true"> > <xi:include href="models/urg_nolaser.model" > /> > </include> > </model:physical> > > > <include embedded="true"> > <xi:include href="models/scarab.model" /> > </include> > </model:physical> > > <model:physical name="scarab3"> > <xyz>-1.0 -1.0 0.23</xyz> > <rpy>0 0.0 0.0</rpy> > > <model:physical name="urg"> > <xyz>0.0622340 0.0 0.17</xyz> > <include embedded="true"> > <xi:include href="models/urg_nolaser.model" > /> > </include> > </model:physical> > > > <include embedded="true"> > <xi:include href="models/scarab.model" /> > </include> > </model:physical> > > <model:physical name="scarab4"> > <xyz>-1.5 -1.0 0.23</xyz> > <rpy>0 0.0 0.0</rpy> > > <model:physical name="urg"> > <xyz>0.0622340 0.0 0.17</xyz> > <include embedded="true"> > <xi:include href="models/urg_nolaser.model" > /> > </include> > </model:physical> > > <include embedded="true"> > <xi:include href="models/scarab.model" /> > </include> > </model:physical> > > <model:renderable name="directional_white"> > <xyz>2 2 5</xyz> > <light> > <type>point</type> > <direction>-0.1 -0.1 -0.4</direction> > <diffuseColor>1.0 1.0 1.0</diffuseColor> > <specularColor>0.8 0.8 0.8</specularColor> > <attenuation>1000 1.0 0.0 0</attenuation> > </light> > </model:renderable> > > </gazebo:world> > > This is my C++ code: > #include <libplayerc++/playerc++.h> > #include <libplayerc/playerc.h> > #include <iostream> > #include <string> > #include <boost/signal.hpp> > > #include <boost/bind.hpp> > > #include <unistd.h> > > > int main(int argc, char **argv) > { > > try > { > using namespace PlayerCc; > using namespace std; > > PlayerClient robot("127.0.0.1", 6665); > Position2dProxy pp(&robot, 0); > OpaqueProxy op(&robot, 0); > player_opaque_data_t opData; > uint8_t opGetData[1024]; > > for(;;) > { > robot.Read(); > > opData.data_count = 4; > opData.data[0]='a'; > opData.data[1]='b'; > opData.data[2]='c'; > opData.data[3]='\0'; > op.SendCmd(&opData); > std::cout << opData.data << std::endl; > uint count = op.GetCount(); > std::cout << "count=" << count << std::endl; > op.GetData(opGetData); > std::cout << "opGetData[0]=" << opGetData[0] << std::endl; > std::cout << "opGetData[1]=" <<opGetData[1] << std::endl; > std::cout << "opGetData[2]=" <<opGetData[2] << std::endl; > //std::cout << "opGetData[3]=" <<opGetData[3] << std::endl; > } > } > catch (PlayerCc::PlayerError e) > { > std::cerr << e << std::endl; > return -1; > } > } -- View this message in context: http://www.nabble.com/Error-Subscribing-to-Gazebo-Position2d-Interface-tp20604476p20604476.html Sent from the playerstage-gazebo mailing list archive at Nabble.com. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Playerstage-gazebo mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo
