|
From: kamil d. <kdr...@gm...> - 2009-07-13 12:18:19
|
Thank Alex for you answer,
I was checking the playerclientdriver.cpp file from hydro and i was playing
with the file and i changed the enable function like this:
void
Driver::enable()
{
if ( enabled_ ) return;
cout << "TRACE(playerclientdriver.cpp): Driver: Connecting to player on
host "
<< config_.host << ", port " << config_.port << endl;
// player throws exceptions on creation if we fail
try
{
cout << "TRACE(playerclientdriver.cpp): Driver: Creating Robot
proxy...................." ;
robot_ = new PlayerCc::PlayerClient( config_.host, config_.port
);
cout << "Ready" << endl;
cout << "TRACE(playerclientdriver.cpp): Driver: Creating Position2d
proxy..............." ;
positionProxy_ = new PlayerCc::Position2dProxy( robot_, 0 );
cout << "Ready" << endl;
cout << "TRACE(playerclientdriver.cpp): Driver: Getting data from
driver................" ;
robot_->Read();
cout << "Ready" << endl;
cout << "TRACE(playerclientdriver.cpp): Driver: Getting motor status
from driver........" ;
positionProxy_->SetMotorEnable( true );
cout << "Ready" << endl;
}
catch ( const PlayerCc::PlayerError & e )
{
stringstream ss;
ss << "Driver: " << e;
disable();
throw hydrointerfaces::Robot2d::Exception( ss.str() );
}
catch (...)
{
stringstream ss;
ss << "Driver: Unknown error";
disable();
throw hydrointerfaces::Robot2d::Exception( ss.str() );
}
enabled_ = true;
}
The output when i executed again robot2d was:
[ 07/13/09 12:25:37.262 RoboDelta/robot2d: info: HwThread: (Re-)Enabling
driver... ]
TRACE(playerclientdriver.cpp): Driver: Connecting to player on host
localhost, port 6665
TRACE(playerclientdriver.cpp): Driver: Creating Robot
proxy....................Ready
TRACE(playerclientdriver.cpp): Driver: Creating Position2d
proxy...............[ 07/13/09 12:25:37.770 RoboDelta/robot2d: info:
LocalStatus: NetThread is ok : 'Net loop timed out' ]
then looks the problem came when is created the instance for the
position2dProxy, something quite surprising.
I will try to create a client to check if i get the same error and also I
will ask about this in the player mail list but anyway, do you have any idea
why this can be happening?
Best regards,
Kamil
2009/7/12 Alex Brooks <a.b...@ma...>
> Hi Kamil,
>
> It looks like the orca driver is hanging in the 'enable()' call. I'm
> looking
> at the fact that in simulation there is "Enable succeeded":
>
> TRACE(playerclientdriver.cpp): Driver: Connecting to player on host
> localhost, port 6665
> [ 07/10/09 09:07:41.447 RoboPlatform/robot2d: info: HwThread: Enable
> succeeded. ]
>
> But on the real hardware we don't see it:
>
> [ 07/10/09 09:13:57.515 RoboPlatform/robot2d: info: HwThread:
> (Re-)Enabling
> driver... ]
> TRACE(playerclientdriver.cpp): Driver: Connecting to player on host
> localhost, port 6665
> [ 07/10/09 09:13:58.084 RoboPlatform/robot2d: info: LocalStatus: NetThread
> is ok : 'Net loop timed out' ]
>
>
> The "enable" function in hydrodrivers/robot2dplayerclient/driver.cpp is:
>
> void
> Driver::enable()
> {
> if ( enabled_ ) return;
>
> cout << "TRACE(playerclientdriver.cpp): Driver: Connecting to player on
> host "
> << config_.host << ", port " << config_.port << endl;
>
> // player throws exceptions on creation if we fail
> try
> {
> robot_ = new PlayerCc::PlayerClient( config_.host,
> config_.port );
> positionProxy_ = new PlayerCc::Position2dProxy( robot_, 0 );
>
> robot_->Read();
>
> positionProxy_->SetMotorEnable( true );
> }
> catch ( const PlayerCc::PlayerError & e )
> {
> stringstream ss;
> ss << "Driver: " << e;
> disable();
> throw hydrointerfaces::Robot2d::Exception( ss.str() );
> }
>
> enabled_ = true;
> }
>
> So something in the function above is hanging.
> My guess would be perhaps that the "positionProxy_->SetMotorEnable( true )"
> is
> the culprit, since playerv works: maybe playerv doesn't make this call but
> the orca driver does? Can your driver handle this call?
>
> The teleop output is complaining that hte hardware driver hasn't
> initialised
> yet, this message could be more helpful (I've changed it in svn).
>
>
> Cheers,
>
> Alex
>
>
> On Fri, 10 Jul 2009, kamil ducheckev wrote:
> > Hello everybody,
> >
> > At this moment I am trying to port the custom hardware of my robot to
> Orca
> > use player and the componente robot2d.
> >
> > I follow the next steps:
> >
> > 1.- Start ice services
> > 2.- Run player server with my own plugin driver
> > 3.- Run Orcaview2d to visualize my componentes
> > 4.- Run Robot2d
> >
> > After this step yy player driver receive a geometry request as it is
> > suppose to do but seems that something is not working ok in the robot2d
> > component. This two are the different output i have from robot2d running
> it
> > with a real or simulated robot.
> >
> > output with player/stage (simulation):
> > [ 07/10/09 09:07:41.419 RoboPlatform/robot2d: info: HwThread:
> > (Re-)Enabling driver... ]
> > TRACE(playerclientdriver.cpp): Driver: Connecting to player on host
> > localhost, port 6665
> > [ 07/10/09 09:07:41.447 RoboPlatform/robot2d: info: HwThread: Enable
> > succeeded. ]
> > [ 07/10/09 09:07:41.548 RoboPlatform/robot2d: info: LocalStatus:
> HwThread
> > is ok : '' ]
> > [ 07/10/09 09:07:41.548 RoboPlatform/robot2d: info: LocalStatus:
> NetThread
> > is ok : '' ]
> >
> > output with my onw driver:
> > [ 07/10/09 09:13:57.515 RoboPlatform/robot2d: info: HwThread:
> > (Re-)Enabling driver... ]
> > TRACE(playerclientdriver.cpp): Driver: Connecting to player on host
> > localhost, port 6665
> > [ 07/10/09 09:13:58.084 RoboPlatform/robot2d: info: LocalStatus:
> NetThread
> > is ok : 'Net loop timed out' ]
> >
> > It seems that the problem could came because I don't publish correctly
> the
> > odometry data from my driver but I can read it without problems with any
> > other player client like 'playerv'.
> >
> > 5.- Run teleop
> >
> > I get the following exit:
> > [ 07/10/09 12:52:47.623 RoboDelta/teleop: info: loading
> > 'VelocityControl2d' driver ]
> > [ 07/10/09 12:52:47.846 RoboDelta/teleop: warn:
> > VelocityControl2dDriver::repeatCommand(): Initialising ]
> > x[ 07/10/09 12:52:47.947 RoboDelta/teleop: warn:
> > VelocityControl2dDriver::repeatCommand(): Initialising ]
> > x[ 07/10/09 12:52:48.048 RoboDelta/teleop: warn:
> > VelocityControl2dDriver::repeatCommand(): Initialising ]
> > x[ 07/10/09 12:52:48.149 RoboDelta/teleop: warn:
> > VelocityControl2dDriver::repeatCommand(): Initialising ]
> >
> > Any idea to get my driver working with orca?
> > Thanks
>
>
>
> --
> ------------------------------
> Dr Alex Brooks
>
> Marathon Robotics Pty Ltd
> National Innovation Centre
> 4 Cornwallis Street
> Eveleigh, NSW 2015
> Sydney, Australia
> Ph: +61 2 9036 7057
> Web: www.marathon-robotics.com
> ------------------------------
>
|