NXT++ working, plus a Python interface

NXT++ provides a Visual Studio 2008 (VS9.0) solution file for building its library, it builds without a problem. The developers dropped support for Linux at v0.6 (v0.5 should still work).

Using the library is rather simple, I have written a CMakeLists.txt and the project was successfully built on the first try (usually not the case). The downside is that this project does not seem to be really active, the wiki is there but there’s no help, no mailing list, and no community. Oh, and it does not support the new color sensor. I am including the content of the CMakeLists.txt here in case you want to try it out:

CMAKE_MINIMUM_REQUIRED(VERSION 2.8)

PROJECT(nxtpp-test)

FIND_PATH(NXTPP_ROOT_DIR include/NXT++.h HINTS "C:/nxtpp")

SET(NXTPP_INCLUDE_DIR ${NXTPP_ROOT_DIR}/include)

FIND_LIBRARY(NXTPP_LIB NXT++ "${NXTPP_ROOT_DIR}/bin/win32")
FIND_LIBRARY(NXTPP_DEBUG_LIB NXT++d "${NXTPP_ROOT_DIR}/bin/win32")

INCLUDE_DIRECTORIES(${NXTPP_INCLUDE_DIR}
${PROJECT_SOURCE_DIR})

FILE(GLOB SRCS "*.c" "*.cpp" "*.cxx")
FILE(GLOB HDRS "*.h")

ADD_EXECUTABLE(nxtpp-test ${HDRS} ${SRCS})

TARGET_LINK_LIBRARIES(nxtpp-test debug ${NXTPP_DEBUG_LIB} optimized ${NXTPP_LIB})

For Anders’ C++ communication library, I found that it is just a bunch of header files so it should be even easier to use (and it does have color sensor support). More on this later.

Another interesting findings on the Wikipedia is the Python interface to the NXT, nxt-python. Installation is very easy, only a few clicks of effort and it worked right off the bat. Although it lacks documentation, the project is quite active and I foresee myself using it quite a bit.

Advertisements
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: