473,404 Members | 2,187 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

Remoting and Robotics

Hi,

I'm developing a remote control panel for a mobile robot I'm developing. The
robot carries a PC that runs a C# app to control the platform. The robot's
PC has a wi-fi card. I'm not concerned with range issues now.

Now I want to create an application that will reside on my laptop that will
send commands to the robot (go forward, brake, pan, tilt, get me a gps fix,
etc) and will receive information messages (gps fix, a bitmap image, sensor
reading, etc).

I'm new to .net development, so I was about to start using direct TCP/IP
sockets when someone told me that remoting would be much easier. I'm
studying it right now.

Now I come here to ask you about what options would be best in this
environment. Keeping in mind the following considerations:

- Access rights and network safety is of no concern
- Performance is a mild concern
- Scalability is of no concern

Also make the other usual assumptions of a robotic environment vs. a
business environment.

Cheers

Padu
Jul 7 '06 #1
6 2856
Padu,

Since access rights and network safety is not a concern, nor is
scalability, and performance is a mild concern, I would ABSOLUTELY go with
remoting.

The reason for this is that remoting doesn't offer anything in terms of
safety and access rights, and is reasonably performant when using the tcp/ip
channel along with binary formatting.

However, I would say that generally, the rules of distributed computing
still apply, where you should make "chunky" calls as opposed to, well,
"not-chunky" calls.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Padu" <pa**@merlotti.comwrote in message
news:yZ******************************@iswest.net.. .
Hi,

I'm developing a remote control panel for a mobile robot I'm developing.
The robot carries a PC that runs a C# app to control the platform. The
robot's PC has a wi-fi card. I'm not concerned with range issues now.

Now I want to create an application that will reside on my laptop that
will send commands to the robot (go forward, brake, pan, tilt, get me a
gps fix, etc) and will receive information messages (gps fix, a bitmap
image, sensor reading, etc).

I'm new to .net development, so I was about to start using direct TCP/IP
sockets when someone told me that remoting would be much easier. I'm
studying it right now.

Now I come here to ask you about what options would be best in this
environment. Keeping in mind the following considerations:

- Access rights and network safety is of no concern
- Performance is a mild concern
- Scalability is of no concern

Also make the other usual assumptions of a robotic environment vs. a
business environment.

Cheers

Padu

Jul 7 '06 #2
On Fri, 7 Jul 2006 11:25:29 -0700, Padu wrote:

I'm developing a remote control panel for a mobile robot I'm developing. The
robot carries a PC that runs a C# app to control the platform. The robot's
PC has a wi-fi card. I'm not concerned with range issues now.

Now I want to create an application that will reside on my laptop that will
send commands to the robot (go forward, brake, pan, tilt, get me a gps fix,
etc) and will receive information messages (gps fix, a bitmap image, sensor
reading, etc).

I'm new to .net development, so I was about to start using direct TCP/IP
sockets when someone told me that remoting would be much easier. I'm
studying it right now.

Now I come here to ask you about what options would be best in this
environment.
..NET remoting would definitely be the best tool to use here. It will allow
to develop your application in no time and adding new commands later on if
necessary will be as easy as adding a new method to a class. Performances
should not really be an issue. You should keep in mind that .NET Remoting
is a .NET only technology though so if you'd like to be able to control
your robot via, say, a Java application or a native Linux C++ application,
then you should stick with the good old sockets.

To do what you want to do in .NET Remoting, you'll have to:
- define an interface containing the command that you want to send to your
robot. E.g GoForward(int distance), Tilt(int degrees)....
- place this interface in a DLL referenced by both the server application
(on the robot) and the client application (on your laptop)
- implement this interface in the server application then expose the
created class via .NET remoting (2 or 3 lines of code for that)
- in the client application, connect to the server, get a reference to the
remote object (2 or 3 lines of code too), then calls its methods as if it
was a normal local object

There are several tutorials on the web that will get you started. Of
course, there will be a few rough edges. To send an image, you won't be
able to simply pass a Bitmap object as a parameter as you would do with
many other types. You'll have to convert your image into a byte array
first. But there is code on the web that you can copy/paste to do that.
Sending events from your robot back to your client application also isn't
that an intuitive thing to implement but once again, there are many
examples on the web.
Jul 7 '06 #3
You may want to take a look at Microsoft's new Robotics Studio at http://www.microsoft.com/downloads/d...DisplayLang=en

Matt
"Padu" <pa**@merlotti.comwrote in message news:yZ******************************@iswest.net.. .
Hi,

I'm developing a remote control panel for a mobile robot I'm developing. The
robot carries a PC that runs a C# app to control the platform. The robot's
PC has a wi-fi card. I'm not concerned with range issues now.

Now I want to create an application that will reside on my laptop that will
send commands to the robot (go forward, brake, pan, tilt, get me a gps fix,
etc) and will receive information messages (gps fix, a bitmap image, sensor
reading, etc).

I'm new to .net development, so I was about to start using direct TCP/IP
sockets when someone told me that remoting would be much easier. I'm
studying it right now.

Now I come here to ask you about what options would be best in this
environment. Keeping in mind the following considerations:

- Access rights and network safety is of no concern
- Performance is a mild concern
- Scalability is of no concern

Also make the other usual assumptions of a robotic environment vs. a
business environment.

Cheers

Padu
Jul 7 '06 #4
------------------
You may want to take a look at Microsoft's new Robotics Studio at
http://www.microsoft.com/downloads/d...DisplayLang=en

Matt
-------------------

I'd taken a brief look at it when they released but I wasn't sure of exactly
what they were offering.

In practical terms, what would I benefit from using the robotics studio?

Cheers

Padu
Jul 7 '06 #5
I disagree with the others here .. I think a connection based protocol will
not work well for you.

I think you should look at implementing a simple UDP based protocol that
doesn't mind packet loss. With a connection based protocol you will often
have your controls go completely dead if it hits an off spot or sits on the
edge of its connection. A UDP based protocol is very simple to create
(especially just to tell it to do actions). More importantly if it hits a
bad spot it might miss a packet or two but it will keep on trucking.
http://msdn.microsoft.com/msdnmag/issues/06/02/UDP/ is worth a read.

Here is some simple client/sending code but it is literally about 15 lines
of code (the receiver being most of it .. the sending side is pretty much
UdpCLient.Send()

using System;
using System.Text;
using System.Net;
using System.Net.Sockets;
class Receiver {
static void Main(string[] args) {
UdpClient client = new UdpClient(1111);
IPEndPoint point = null;
while(true) {
byte[] data = client.Receive(ref point);
if (data.Length 0) {
Console.WriteLine("Received " + data.Length + " bytes
from " + point.Address);
Console.WriteLine ("\t" +
Encoding.ASCII.GetString(data));
}
}
}
}
Cheers,

Greg Young
MVP - C#
http://codebetter.com/blogs/gregyoung

"Padu" <pa**@merlotti.comwrote in message
news:yZ******************************@iswest.net.. .
Hi,

I'm developing a remote control panel for a mobile robot I'm developing.
The robot carries a PC that runs a C# app to control the platform. The
robot's PC has a wi-fi card. I'm not concerned with range issues now.

Now I want to create an application that will reside on my laptop that
will send commands to the robot (go forward, brake, pan, tilt, get me a
gps fix, etc) and will receive information messages (gps fix, a bitmap
image, sensor reading, etc).

I'm new to .net development, so I was about to start using direct TCP/IP
sockets when someone told me that remoting would be much easier. I'm
studying it right now.

Now I come here to ask you about what options would be best in this
environment. Keeping in mind the following considerations:

- Access rights and network safety is of no concern
- Performance is a mild concern
- Scalability is of no concern

Also make the other usual assumptions of a robotic environment vs. a
business environment.

Cheers

Padu

Jul 7 '06 #6
I've just finished my first remoting "hello world" app. Instead of using
console apps, I've created windows forms for both host and client apps. I'm
not sure I've completely understood the concept though.

Following the help file "how to", I've created a remotable type that
inherits from MarshalByRefObj, and has only one method:

public class RemotableType: MarshalByRefObject
{
public string HelloWorld()
{
return "Hello World";
}
}

I've compiled it into RemotableType.dll
Then I've created the host app in a windows form:

public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
RemotingConfiguration.Configure(@"RemotingHost.exe .config.xml",false);
}
}

The config.xml I've copied from C# help. It is defined as a wellknown
singleton, uses http on port 8989.
Finally the client windows form app has two buttons, a "connect" (now I
understand that it doesnt connect really) and a "Get Hello World":

public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private RemotableType remoteObject;
private void button2_Click(object sender, EventArgs e)
{
label1.Text = remoteObject.HelloWorld();
}
private void button1_Click(object sender, EventArgs e)
{
RemotingConfiguration.Configure(@"RemotingClient.e xe.config.xml",
false);
remoteObject = new RemotableType();
}
}
It all works, both on the same machine or in different machines.

Now, let's say I add a text box to the host application main form. What do I
have to do to add a method that retrieves the value of that text box from
the client app? I know I'll have to add another method to my RemotableType,
but I'm not sure how the dll will access the host windows form app. I
suspect I'm incurring in a major concept flaw here.
Cheers

Padu
Jul 7 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: sunk | last post by:
Team phantasm www.phantasm1.com is looking for expert programer to join our team for the next Darpa Grand challange. If you have alot of stamina and can apply your skills and are interested in...
14
by: Émρēror Śaki | last post by:
Hello. I am a n00b in the field of programming. I studied mIRC, html, max script, and very little c++ logistics. I was wondering if what specific areas of c++ might help for robotics. If you have...
0
by: bettervssremoting | last post by:
To view the full article, please visit http://www.BetterVssRemoting.com Better VSS Remote Access Tool including SourceOffSite, SourceAnyWhere and VSS Remoting This article makes a detailed...
2
by: clintonG | last post by:
Does anybody know what (if anything) Microsoft has been thinking about robotics? The LAMP camp is making real progress ,. <%= Clinton Gallagher METROmilwaukee (sm) "A Regional Information...
8
by: Raju Joseph | last post by:
Hi All, I am just trying to get an opinion here. I know this is always a tough choice to make. We are in the process of converting our VB6 based Healthcare Information System (a full-fledged...
11
by: Isaac T Alston | last post by:
Basically, I'm thinking about building a robot which can be controlled by programs which I write, I'm going to interface to the robot through the parallel port (like in this tutorial here:...
6
by: Padu | last post by:
I've completed the .net example on remoting and it works fine: a listening server, a dll with the marshal object and a client. Now in simple terms, how would I connect to a remote GUI and...
8
by: nyhetsgrupper | last post by:
I have written a windows service and want to expose a web based user interface for this service. I then wrote a class library containing a ..net remoting server. The class library have a method...
10
by: stolte | last post by:
Hey all, I'm using a US robotics wireless router, and I want to connect a HP Color Laserjet 1600 to it for use as a network printer. I followed the directions from the USR website carefully...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.