Hello All,

I have the same problem on gazebo 0.10. When using the wizbot.world and in
/tmp/gazebo-tomas-0 directory I
dont see an interface file created and I get this error:
error opening device file
/tmp/gazebo-tomas-0/position.pioneer2dx_model1::position_iface_0 : No such
file or directory
So I figured a problem with the holonome controler in that model...

If I try to use the ~/gazebo-0.10.0/worlds$ gazebo pioneer2dx.world
I see the interface file created and I can connect fine to the interface but
there is no response from the robot when trying to set cmd velocity it just
sits there:

to...@tomas-desktop:/tmp/gazebo-tomas-0$ ls
factory.default
gazebo.pid
graphics3d.box1_model
graphics3d.default
graphics3d.pioneer2dx_model1
graphics3d.pioneer2dx_model1::laser
graphics3d.pioneer2dx_model2
graphics3d.pioneer2dx_model2::laser
graphics3d.plane1_model
graphics3d.point_white
graphics3d.ramp_model
graphics3d.ramp_model2
graphics3d.sphere1_model
position.pioneer2dx_model1::position_iface_0
position.pioneer2dx_model2::position_iface_0
simulation.default


Here is a code fragment:
  /// Open the Position interface
  try
  {
    posIface->Open(client, "pioneer2dx_model1::position_iface_0");
  }
  catch (std::string e)
  {
    std::cout << "Gazebo error: Unable to connect to the position
interface\n" << e << "\n";
    return -1;
  }
...

  while(1)
{
   posIface->Lock(1);
   std::cout  << "Cmd Velocity (x,y,z)" << posIface->data->cmdVelocity.pos.x
<< " " << posIface->data->cmdVelocity.pos.y << " " << 
posIface->data->cmdVelocity.pos.z << std::endl;
   posIface->Unlock();
   posIface->Lock(1);
   std::cout  << "Velocity (x,y,z):" << posIface->data->velocity.pos.x << "
" << posIface->data->velocity.pos.y << " " << 
posIface->data->velocity.pos.z << std::endl;
   posIface->Unlock();
   posIface->Lock(1);
   std::cout  << "Roll,pitch,yaw:" << posIface->data->pose.roll << " " <<
posIface->data->pose.pitch << " " <<  posIface->data->pose.yaw << std::endl;
   posIface->Unlock();

   std::cout  << "Press u,d or s" << std::endl;
  c=getchar();
  if (c=='u')
  {
  posIface->Lock(1);
  posIface->data->cmdEnableMotors = 1;
  posIface->data->cmdVelocity.pos.x += 0.5;
  posIface->Unlock();
  }
  else
  if (c=='d')
  {
  posIface->Lock(1);
  posIface->data->cmdEnableMotors = 1;
  posIface->data->cmdVelocity.pos.x -= 0.5;
  posIface->Unlock();
  }
  if (c=='s')
  {
  posIface->Lock(1);
  posIface->data->cmdEnableMotors = 1;
  posIface->data->cmdVelocity.pos.x = 0;
  posIface->Unlock();
  }

   usleep(100000);
   }

I looked around for other postings and found nothing that helped. Thanks for
any info.
Tomas



Kamil Muszyński wrote:
> 
> Hi all, 
> 
> I've moved from gazebo 0.8 to svn version of gazebo 0.9. I've been trying
> to run wizbot.world (just a wizbot model - so I removed cam, cylinder and
> pioneer models). My aim was to apply speed to wizbot's wheels using only
> libgazebo and position interface (without player). This is the client code
> used:
> 
> #include <iostream>
> #include <string>
> #include <gazebo.h>
> #include <stdio.h>
> 
> int main(int argc, char * argv[]){
>       if (argc != 3) return 1;
> 
>       float x = atof(argv[1]);
>       float y = atof(argv[2]);
> 
>       gazebo::Client * client = new gazebo::Client();
>       gazebo::SimulationIface * simIface = new gazebo::SimulationIface();
>       int serverId = 0;
>       std::string id("default");
> 
>       try {
>               /// Connect to the libgazebo server
>               client->ConnectWait(serverId, GZ_CLIENT_ID_USER_FIRST);
>               /// Open the Simulation Interface
>               simIface->Open(client, id);
>               simIface->Unpause();
>       } catch (std::string e) {
>               std::cout<<"Gazebo error: Unable to connect to the sim 
> interface\n";
>               exit(0);
>       }
> 
>       gazebo::PositionIface * posIface = new gazebo::PositionIface();
>       try {
>               posIface->Open(client, "wizbot_model1::position_iface_0");
>       } catch (std::string ex) {
>               std::cout<<ex<<std::endl;
>               exit(0);
>       }
> 
>       std::cout<<"Applying speed\n";
>       posIface->Lock(1);
>       posIface->data->cmdEnableMotors = 1;
>       posIface->data->cmdVelocity.pos.x = x;
>       posIface->data->cmdVelocity.pos.y = y;
>       posIface->Unlock();
> 
> 
>       while(true){
>               usleep(20000);
>       }
> 
> 
>       posIface->Destroy();
>       delete posIface;
>       simIface->Close();
>       delete simIface;
>       client->Disconnect();
>       delete client;
> 
>       return 0;
> }
> 
> -------------
> 
> It turns out that this code has no effect - when I checked void
> Holonome3Sw_Position2d::UpdateChild() code that is used for controlling
> wizbot, some speed values (different than 0) are applied to joints, but
> wizbot is not moving. After some investigation I think I found a bug in
> method (file gazebo/server/physics/ode/ODEHingeJoint.cc)
> 
> void ODEHingeJoint::SetVelocity(int /*index*/, double angle)
> {
>   this->SetParam(angle, dParamVel); // shouldn't be
> this->SetParam(dParamVel, angle) ?
> }
> 
> but this fix didn't help and robot is still not moving (like if simulation
> was paused, which is not ;) ). 
> 
> I am using ogre 1.6.4 and ode 0.11.1 and ubuntu 9.10, if that could be
> useful. Can anyone give me some hints? :)
> 
> 
> 
> 
> Also I get segmentation fault after clicking on robot model (wizbot,
> pionieer and others - ctrl + rmb) or on model's name in the gazebo menu,
> here is some backtrace
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x04f7ce85 in Fl_Menu_::add(char const*, int, void (*)(Fl_Widget*, void*),
> void*, int) () from /usr/lib/libfltk.so.1.1
> (gdb) bt
> #0  0x04f7ce85 in Fl_Menu_::add(char const*, int, void (*)(Fl_Widget*,
> void*), void*, int) () from /usr/lib/libfltk.so.1.1
> #1  0x00632735 in gazebo::Sidebar::Update() () from
> /usr/local/lib/libgazebo_gui.so.0.9.0
> #2  0x006264ab in gazebo::Gui::Update() () from
> /usr/local/lib/libgazebo_gui.so.0.9.0
> #3  0x005ded7e in gazebo::Simulator::MainLoop() () from
> /usr/local/lib/libgazebo_server.so.0.9.0
> #4  0x0804a464 in main ()
> 
> Should I get newest fltk version?
> 
> Best regards,
> 
> Kamil
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Few-issues-with-latest-gazebo-%28svn%2C-rev-8432%29-tp26468941p28370482.html
Sent from the playerstage-gazebo mailing list archive at Nabble.com.


------------------------------------------------------------------------------
_______________________________________________
Playerstage-gazebo mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-gazebo

Reply via email to