Creating a TCP/IP socket server within orocos

Hello,

I'm trying to create a generic software for moving robotic arms among
obstacles. I feel that orocos would be useful, but I have a couple of
questions whose answers I couldn't find in the "Forum" section of orocos.org

My concept is:

Generic motion control API (here, start & end points are
specified)--->Path planner which outputs a list of 'configurations'
(each configuration is an array of joint values)--->function calls to
robot manufacturer's API to move manipulator to each point in the list
output by the Path planner

Additionally, the Path planner continuously outputs data which can be
used by an external visualizing program to show some stuff in a 3D window.

It would be good to have a TCP/IP internet socket server, which can
accept motion requests from clients. The question is, "How to implement
a TCP/IP server inside a taskContext?"

(Someone has done something similar before:
http://www.orocos.org/node/563 but code files were transferred privately)

The network programming tutorial says that to create a server, I
eventually call listen() and then accept(), which blocks (can be set
non-blocking as well).

Now, it seems wrong to put the server code (which contains accept() )
inside a periodic task. I could make it non-periodic, but do I put the
accept() call in updateHook() ? That doesn't seem right either, since
updateHook shouldn't block.

So, how can I create a TCP/IP server in the Orocos universe?

I'd also really appreciate some tips on the creating the architecture
for the system. For now, I'm thinking of creating a taskContext each for
the TCP/IP server and the path planner and another one for making calls
to the robot manufacturer's API.

Thanks in advance,
Sagar

Creating a TCP/IP socket server within orocos

A Dissabte 18 Juliol 2009, Sagar Behere va escriure:
> Hello,
>
> I'm trying to create a generic software for moving robotic arms among
> obstacles. I feel that orocos would be useful, but I have a couple of
> questions whose answers I couldn't find in the "Forum" section of
> orocos.org
>
> My concept is:
>
> Generic motion control API (here, start & end points are
> specified)--->Path planner which outputs a list of 'configurations'
> (each configuration is an array of joint values)--->function calls to
> robot manufacturer's API to move manipulator to each point in the list
> output by the Path planner
>
> Additionally, the Path planner continuously outputs data which can be
> used by an external visualizing program to show some stuff in a 3D window.
>
> It would be good to have a TCP/IP internet socket server, which can
> accept motion requests from clients. The question is, "How to implement
> a TCP/IP server inside a taskContext?"
>
> (Someone has done something similar before:
> http://www.orocos.org/node/563 but code files were transferred privately)

Was me, and I think I can provide the example. However, this:
http://orocos.org/wiki/rtt/simple-examples/simple-tcp-client-using-non-b...

it's much better than my example.

Regards,