Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: usb2dynamixel c sdk

  1. usb2dynamixel c sdk

    I downloaded the USB2Dynamixel drivers, sdk, and source code. I could use some help compiling a sample in my Eclipse environment setup with Cygwin GCC. The sample in the sdk is for Visual C++. There is no makefile and I don't know C++ to understand how to setup all the dependencies correctly.

    I dropped all the files from ./src directory into my Eclipse based project.
    Code:
    C:\Users\workspace\TestCPP\src\Read_Write.cpp
    C:\Users\workspace\TestCPP\src\dxl_hal.h
    C:\Users\workspace\TestCPP\src\dynamixel.h
    C:\Users\workspace\TestCPP\src\ftd2xx.h
    C:\Users\workspace\TestCPP\src\ftd2xx.lib
    C:\Users\workspace\TestCPP\src\dxl_hal.c
    C:\Users\workspace\TestCPP\src\dynamixel.c
    I am getting warnings and errors in dynamixel.h:
    PHP Code:
    unsigned char gbInstructionPacket[MAXNUM_TXPARAM+10] = {0};
    ^
    'gbInstructionPacket' redeclared without dllimport attributeprevious dllimport ignored 
    PHP Code:
    void dxl_set_baudint baudnum )
    {
        
    float baudrate;

        if( 
    gbBaudNum == baudnum )
            return;
        
        
    baudrate 2000000.0f / (float)(baudnum 1);
        
    dxl_hal_set_baudbaudrate );
        
    gbBaudNum = (unsigned char)baudnum;
    }
    ^
    conflicting types for 'dxl_set_baud' 
    Any guidance would be appreciated.

  2. #2

    Re: usb2dynamixel c sdk

    The best advice I can give is this: If you are developing for Windows, USE VISUAL STUDIO! Visual Studio 2012 Express is a free download. If, somehow, Microsoft should decide to not support free (as in beer) development sometime in the future, you can worry about porting to GCC / Eclipse at that time. Also, the Visual Studio debugger is so much faster than GDB that it's in a class of its own; it's a joy to use, as opposed to GDB or any GUI on top of it, which is like running a Marathon through cold molasses. And I say this as a developer who prefer Linux and GCC and VIM! Yet, when I have to develop for Windows, I use Visual Studio, because that's absolutely the best way to develop for Windows.

  3. #3
    Join Date
    Dec 2012
    Location
    Los Angeles, CA
    Posts
    858
    Images
    25
    Rep Power
    88

    Re: usb2dynamixel c sdk

    Ah a fellow VIM user! GDB == marathon through cold molasses. Love it, I'll have to use that at work tomorrow.

  4. #4
    Join Date
    Sep 2010
    Location
    ಠ_ಠ
    Posts
    2,300
    Images
    27
    Rep Power
    278

    Re: usb2dynamixel c sdk

    Though I really don't like it many times, Visual Studio is pretty much the way to go on windows. If you don't have a microsoft live account to register Visual Studio Express, you would be amazed at the vanity/toss-away account names you can create with hotmail (not sure how mine wasn't taken already). I do have some fond memories of mingw and bloodshed dev-c++, but that has been a while and eventually caused conflicts with WinAVR and WinARM (why no add platform prefixes to gcc on windows?).

    Call me daft, but I kinda thought the main point of using Cygwin was to allow you to compile linux/posix programs on windows systems, so why would you use the windows version of the sdk? The linux sdk has a slight defect (timeout limit is too short), but the makefiles included with it should work fine.

    <flamewar>nano, gedit, and programmer's notepad 2</flamewar>
    Please pardon the pedantry... and the profanity... and the convoluted speech pattern...
    "You have failed me, Brain!"
    bleh
    more bleh

  5. Re: usb2dynamixel c sdk

    Thank you guys for setting me on an easier path. I am a Java developer so I thought originally it would save me time by using the tried and true development IDE (been using eclipse for 10 years). Also since I didn't have a goal of target platform, arbotix, Linux, Mac or win32, I kind of grabbed a compiler and an sdk just to try.

    For now I think I want to start off slow, try writing standalone c/c++ code on windows, to drive ax-12's with usb2dynamixel. I played around with arbotix for 5 minutes, but setting it aside for now. I am not really sure how to develop in arduino IDE, there is no debugger for instance.

    I will try Visual Studio express next. It seems like a path of less resistance. Thank you for pointing it out.

  6. #6
    Join Date
    Dec 2012
    Location
    Los Angeles, CA
    Posts
    858
    Images
    25
    Rep Power
    88

    Re: usb2dynamixel c sdk

    There are a few sample code bits to play with that come with the SDK. ReadWrite and SyncWrite. Also Kurt wrote a simple test program for the Arbotix/Arduino you should check out. https://github.com/KurtE/AX12_Test

  7. Re: usb2dynamixel c sdk

    Kevin(), I will have to check out Kurt's tester code for Arduino. The timer code is of interest.

    I was successful at compiling the sample project in VC++. The Read_Write worked, my servo moved, fantastic!!

    It makes a little more sense to use VC++ compiler, now that I see a windows library being imported:
    Code:
    #pragma comment(lib, "dynamixel.lib")
    Is this considered the driver, firmware, or something else? And is there a way to structure a project in VC++ or non windows code to use the sources instead of compiled dll?

  8. #8
    Join Date
    Sep 2010
    Location
    ಠ_ಠ
    Posts
    2,300
    Images
    27
    Rep Power
    278

    Re: usb2dynamixel c sdk

    dynamixel.h/c should be identical for all versions of the sdk. dxl_hal.h/c are platform specific (linux and windows functions/system calls). It is possible to add the source files and headers directly to the project and compile them into the final executable instead of using a shared library, but it tends to be a system/toolchain specific process (VS should just be "add existing file to project", add the correct paths to the project properties, and remove the lib import specific parts - been a while, so I'm probably forgetting something).
    Please pardon the pedantry... and the profanity... and the convoluted speech pattern...
    "You have failed me, Brain!"
    bleh
    more bleh

  9. #9

    Re: usb2dynamixel c sdk

    Apart from, obviously, Visual C++, the easy way to build the example in C++ I have found is with http://www.codeblocks.org and GCC. I have imported the project with the Code::blocks file:menu option, change the "#define DEFAULT_PORTNUM 2" to my USB2Dynamixel COm number, build and executed it without any problem.

    Previously I have tried with DEVCPP, but I have not manged to load the DLL, even I create an exe, but Windows said it was not correctly created.

  10. Re: usb2dynamixel c sdk

    Has anyone actually had any luck running any of the examples from the SDK using VS Express? I tried using VS Express 2005 and followed the instructions on the Robotis site for including the headers and library, but was having problems during building because of unresolved external variables. I had also installed the Microsoft Platform SDK. I'd like to know what other people out there are using because I'm desperate to get this to work after 2 days with no success.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Question(s) USB2Dynamixel in Ubuntu Natty
    By Chmaanta in forum Arbotix, Microcontrollers, Arduino
    Replies: 3
    Last Post: 02-01-2013, 03:28 PM
  2. Discussion USB2Dynamixel blue-screens. A LOT!
    By jwatte in forum Arbotix, Microcontrollers, Arduino
    Replies: 3
    Last Post: 12-31-2012, 01:23 AM
  3. AX-12 and USB2Dynamixel problem
    By ringo42 in forum DYNAMIXEL & Robot Actuators
    Replies: 8
    Last Post: 11-02-2011, 09:15 AM
  4. Trying PyPose with a USB2Dynamixel
    By Pi Robot in forum Software and Programming
    Replies: 2
    Last Post: 08-23-2010, 05:01 PM
  5. Strage Problems with usb2dynamixel
    By isermann in forum Arbotix, Microcontrollers, Arduino
    Replies: 4
    Last Post: 03-21-2010, 05:29 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •