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
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
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.

--
Jeff Shirley
snipped-for-privacy@mindspring.com
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
: 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 -- snipped-for-privacy@westnet.com -- (914) 967-7816
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
On Thu, 17 Mar 2005, Ringo wrote:

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.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
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
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Ringo wrote:

I like Java for this. I'm doing most of my robotic programming in Java now.
And besides which, I don't do graphics programming on my robot. If I need to do something like that, I send the data over the net and write a client to display the results in humna-readable form. -- D. Jay Newman http://enerd.ws/robots /
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
On Thu, 17 Mar 2005, Ringo wrote:

Ringo,
Check out the .canvas widget. Drawing is VERY easy. Further, there are 3rd party extensions like Zinc, which further extend the usefulness of canvas, and the photo (image) extensions which facilitate raster style images as well .jpg, and tcl bindings for imageMagick and GraphicsMagick.
While Java is popular, I have never really taken to the language.
Tcl/Tk has many advantages which make development quick and simple. I find that like forth, incremental development is very easy to accomplish with tcl procs, but unlike forth, there is no stack based expression stuff to learn and weird syntax stuff. Perhaps the best benefit of Tcl/Tk is the simplicity with which you can link C/C++ based extensions into the scripting tools (loading .dll's (.so's) at runtime, and calling C procedures directly ...
Info at the wiki:
    http://wiki.tcl.tk/1191 (C based extensions)     http://wiki.tcl.tk/canvas (Canvas based information)
    see also: comp.lang.tcl for an active developer base and     user assistance.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Ringo,
I've been developping applications in C or C++ for linux/windows/solaris/Irix/QNX for a long time now. The same application runs on all the enumerated OS. I've done a small patch for the QNX version. That's what I use.
For buttons, menus, interface: FLTK http://www.fltk.org , there is an application called "fluid" from which you can design your interface. FLTK works great with OpenGL or Mesa3D for the 2D/3D rendering. (http://www.opengl.org and http://www.mesa3d.org if opengl is not available "same function calls for both library"). Many library can be used with that combinaison. ( http://www.mesa3d.org/libraries.html , http://www.mesa3d.org/science.html , http://www.mesa3d.org/modelers.html )
There a lot of examples that come with FLTK.
OpenGL/Mesa3D are the fastest rendering library I've been working with. All new graphic cards support OpenGL. On my cheap graphic card, I have a refresh of 100 ms for 10000 Triangles in full 3D! For linux, QNX and W2K.
Hope it'll help!
Jean
Ringo wrote:

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
wrote:

If you like Visual Basic, you might want to check out the Gambas basic package. Webiste is:
http://gambas.sourceforge.net /
It has a development environment very near visual basic and it works well with Linux. It has a useful number of visual-basic like controls.
Cheers, Ed L
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.