have you added methods to the function table in libplayerxdr to pack and unpack the message structures? are you getting any warning on the player terminal output?
To add an interface in 2.0.x you need:
to add the interface to player.h
to add the pack and unpack methods to the player xdr function table
to add the interface code and string to the utility tables (or was this only early 2.1 versions?)
add a client proxy in C
add an entry to register the interface in the client library
optionally add a c++ proxy
I think that is all the steps, but it is from memory.
You will be pleased to know in 2.1 it is a single file for the server side stuff, and you can even create the interface as a plugin.
Thanks for the reply. I realise that I'm defining a new interface, I
think this way it makes the client code much simpler and more
understandable than using the opaque interface. Unfortunately I'm stuck
using Player 2.0.5 for now, because I need it to be compatible with both
Gazebo 0.7, and the setup we currently have in our lab. I will of course
update it to CVS HEAD when time allows.
The interface I've created works perfectly for the most part, messages
coming from the client to the driver are all received and transmitted,
it's just messages from the driver to the interface proxy which for some
reason aren't arriving.
> What you are effectively doing is creating a new inteface, if you want
> to do this you will need to use player 2.1, and CVS Head at that. Most
> likely the path of least resistance is to use an existing interfaces
> and to publish with one of the messages already defined in the player
> interfaces (player.hin 2.0, player_interfaces.h in 2.1)
> the opaque interface allows you to send arbitrary data if this is the
> way you need to go, you just need to know how to unpack it at the
> other end.
>On 10/03/2008, Michael Sheldon <mike@mi...> wrote:
>> I'm new to Player and have been writting a little driver (and
>> interface) for calculating the Euclidean distance between the current
>> camera image and a given target image (this is with Player 2.0.5).
>> However I'm having a problem with making the resultant distance
>> information available via the corresponding libplayerc device proxy.
>> I've based the driver around ImageBase, and once the distance has
>> been calculated I try to send it to the device proxy with the Publish
>> Publish(device_addr, NULL, PLAYER_MSGTYPE_DATA,
>> PLAYER_EUCLIDEAN_DISTANCE_DATA, &distance_data,
>> It was my understanding that this message should then be received by
>> my playerc_euclidean_distance_putmsg function in the device proxy,
>> which I registered with the command:
>> playerc_device_init(&device->info, client,
>> PLAYER_EUCLIDEAN_DISTANCE_CODE, index,
>> (playerc_putmsg_fn_t) playerc_euclidean_distance_putmsg);
>> But the message is never received, I've looked at various other
>> drivers and can't see what I'm doing differently, but clearly I must
>> be missing something.
>> Can anyone suggest anything I might have missed?
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
Playerstage-developers mailing list