Coding Getting Started
From DGC Wiki
Contents |
Platform / Operating system
There are a couple of ways to develop code in Team Caltech:
NEVER under *any* circumstances compile code on GC - you should *always* use Jennifer (gcdev/gazebo cluster) when you are working in the shop
- Mac OS X
- Linux:
- Logging in remotely on the grandchallenge server using ssh from a shell and edit and compile your code through the shell remotely on grandchallenge. This can be OK for making a little coding but is not a recommended long term development choice.
- The recommended way to develop is to use a Linux workstation and check out the code locally on that computer. This can be tricky if you don't have your own laptop but usually most of the laptops in the shop isn't used so if you can work in the shop (they may not be borrowed without permission), this is a good option. The best way of course would be to install Linux on your own computer and develop from that.
- Windows:
- Logging in remotely on the grandchallenge server using a ssh client (we recommend Putty) and edit and compile your code through the shell remotely on grandchallenge. This can be OK for making a little coding but is not a recommended long term development choice.
- Using Cygwin to check out and compile the code repository. This might be tricky and an attempt to do this succeeded compiling everything except the things that requires the boost_thread libraries (which all the MTA modules does). So this is currently not a recommended approach since it's very limited (but working to some extent).
Code repository
The Team Caltech code repository tree is checked into a version management system called Subversion. Subversion is very similar to the more common used system called CVS but has many features that CVS miss, like ability to easily move and rename files.
The dgc repository is documented in Project Subversion Structure.
Editing
Most users in Linux use one of the following editors to edit code, remotely or locally:
- emacs
- vi/vim
- nano/pico
- KDevelop (KDE's intergrated development environment, graphical user interface - so not suited to run remotely)
When creating/editing source code, make sure to follow the coding and documentation standards.
Compilation
For compilation we use make so all you should need to do is to type make in a folder if the Makefile is setup properly. If not, see README in that folder.
.bashrc: In order to have some things to compile, you might need to edit your .bashrc file in your home directory to setup paths for include files and libraries. See the sample .bashrc in the code repository
General-usage libraries
Documentation
- There should always be a README file in the directory you're looking at. That file should contain a short description of the contents and hopefully even a link to a maintained Wiki page on the internal web that contains more information.
- For all code that's in the repository also an automaticly generated API is generated that is put on the DGC API page
![[Main Page]](../../../../upload/alice.jpg)