Programming in linux

General Robotics Forum - All aspects of robots and their applications. 

Page 1 of 2       1 2 > last >> Bookmark this page:  YahooMyWeb Yahoo!  Google Google  Windows Live Favorites Windows Live  del.icio.us del.icio.us  digg digg  Add to Netscape Netscape
Subject Author Date
Programming in linux Ringo 03-17-2005
If you were  Registered and logged in, you could reply and use other advanced thread options
Posted by Ringo on March 17, 2005, 10:42 am


This is a take off from the "sharing ideas" thread. I have a robot that
is controlled from a laptops serial port. My control software has been
in VB but now I'm switching it over to linux. My code is all in C.
I'm at the point now where I need to start developing a mapping
system. I have this all working in vb but I'm not sure how to handle
the graphics in linux. I'm looking into using GTK since it looks easy
enough to add buttons and other widgets to my existing C code. Has
anyone done any mapping in C in linux? I'm just wondering what is the
best way to draw the map? The way I did it in VB was using lots and
lots of square "shapes". It worked well but was slow. Everytime I
got a sensor update it took like 400ms to redraw the screen.
Any suggestions?
Thanks
Ringo


Posted by Jeff Shirley on March 17, 2005, 11:32 am


Ringo,

For the simple, output only displays I have done so far (strip charts, logic
displays, and XY plots), I just use Xlib calls. When I actually get around to
implementing control screens, I guess I will have to learn a widget library.

Jeff.

> This is a take off from the "sharing ideas" thread. I have a robot that
> is controlled from a laptops serial port. My control software has been
> in VB but now I'm switching it over to linux. My code is all in C.
> I'm at the point now where I need to start developing a mapping
> system. I have this all working in vb but I'm not sure how to handle
> the graphics in linux. I'm looking into using GTK since it looks easy
> enough to add buttons and other widgets to my existing C code. Has
> anyone done any mapping in C in linux? I'm just wondering what is the
> best way to draw the map? The way I did it in VB was using lots and
> lots of square "shapes". It worked well but was slow. Everytime I
> got a sensor update it took like 400ms to redraw the screen.
> Any suggestions?
> Thanks
> Ringo


--
Jeff Shirley
spam-crepe@mindspring.com
"Bill Gates is filthy rich, but that doesn't mean I want to be married to him."

Posted by Christopher X. Candreva on March 17, 2005, 12:13 pm



: the graphics in linux. I'm looking into using GTK since it looks easy
: enough to add buttons and other widgets to my existing C code. Has
: anyone done any mapping in C in linux? I'm just wondering what is the
: best way to draw the map? The way I did it in VB was using lots and

GTK is great for the interface, but for actually drawing the image I would
look at the GD library, which is specificly designed for on the fly creating
of images. It's a standard part of most distros (it is in RedHat/ Fedora).
Even has a Windows version.

http://www.boutell.com/gd/


--
==========================================================
Chris Candreva -- chris@westnet.com -- (914) 967-7816
WestNet Internet Services of Westchester
http://www.westnet.com/

Posted by on March 17, 2005, 12:51 pm



On Thu, 17 Mar 2005, Ringo wrote:

> Date: 17 Mar 2005 07:42:23 -0800
> Newsgroups: comp.robotics.misc
> Subject: Programming in linux
> This is a take off from the "sharing ideas" thread. I have a robot that
> is controlled from a laptops serial port. My control software has been
> in VB but now I'm switching it over to linux. My code is all in C.
> I'm at the point now where I need to start developing a mapping
> system. I have this all working in vb but I'm not sure how to handle
> the graphics in linux. I'm looking into using GTK since it looks easy
> enough to add buttons and other widgets to my existing C code. Has
> anyone done any mapping in C in linux? I'm just wondering what is the
> best way to draw the map? The way I did it in VB was using lots and
> lots of square "shapes". It worked well but was slow. Everytime I
> got a sensor update it took like 400ms to redraw the screen.
> Any suggestions?
> Thanks
> Ringo

I might strongly suggest that you look at tcl/tk. Firstly, it is a
scripting language which has a minimal learning curve, has a widget
library which is simple to use, and runs on windows, unix, linux and
elsewhere. Secondly, linking c code, or even extending the language is
ridiculously simple.

Cheers,
Rob.

Posted by Ringo on March 17, 2005, 4:45 pm


I looked at TCL/tk briefly and it is extremely easy to make buttons and
that sort of thing, but I didn't see anything for drawing. Did I miss
something? I need to be able to draw teh sonar scans, and maps and
such.
Thanks
Ringo


Page 1 of 2       1 2 > last >>

The site map in XML format XML site map
other useful resources:
Official Robosapien Website
Lego Mindstorms Website

Contact Us | Privacy Policy