Page 25 of 25 FirstFirst ... 152122232425
Results 241 to 246 of 246

Thread: PhantomX controlled by a Raspberry Pi

  1. Re: PhantomX controlled by a Raspberry Pi

    The power supply is stable and doesn't gives any problem.

    The same, for data, if it were possible an easier connection it's ok, but now I solved in this way.

    I tried with ttl logic converter but without results, maybe I don’t understand how it works

    Click image for larger version. 

Name:	wiring phantom-x.jpg 
Views:	620 
Size:	78.2 KB 
ID:	7302Click image for larger version. 

Name:	IMG_20180828_121720.jpg 
Views:	632 
Size:	113.0 KB 
ID:	7303Click image for larger version. 

Name:	IMG_20180828_121730.jpg 
Views:	523 
Size:	113.2 KB 
ID:	7304Click image for larger version. 

Name:	IMG_20180828_121803.jpg 
Views:	523 
Size:	93.8 KB 
ID:	7305

    So recently I've tested a little program wrote in php code uploaded on Rpi, who switch on/off some led fixed on the arduino board.

    With the web page write in php, the corresponding commands, they shall be directed to usb in order to switch on the led.

    now I think that it's necessary to rewrite the sketch commander like I explained before, in order to redirect the commands to usb were is linked Arbotix-m or maybe it's possible to wire the geekduino with the sketch commander on the rpi.

    So the latter have to redirect the signals from geekduino to arbotix-m.
    Last edited by minimalfra; 08-28-2018 at 03:44 PM.

  2. Re: PhantomX controlled by a Raspberry Pi

    Click image for larger version. 

Name:	wiring con ttl.jpg 
Views:	543 
Size:	76.3 KB 
ID:	7310
    About the ttl logic converter, this is the wiring that I tried, but test the ttyAMA0 on raspberry, there's no signal coming from Arbotix.

    Can you explain how to use OpenCM9.04 in this project?

  3. #243

    Re: PhantomX controlled by a Raspberry Pi

    OpenCM board, just plug it into the RPI board, it will show up something like /dev/ttyAMA0
    Which you can open up and communicate.

    Depending on wjat upir needs/desires for the board. You could run a real real simple program on the OpenCM board that communicates with whatever servos you have connected to it...

    #include <DynamixelSDK.h>
    // Really basic Servo Controller... 
    // This version for Robotis OpenCM9.04
    // Options...
    #define BAUDRATE                        1000000
    #define DEVICENAME                      "3"                 //DEVICENAME "1" -> Serial1(OpenCM9.04 DXL TTL Ports)
    #define BUFFER_SIZE   64
    // Globals
    dynamixel::PortHandler *portHandler = dynamixel::PortHandler::getPortHandler(DEVICENAME);
    uint8_t buffer[BUFFER_SIZE];
    int led_state = LOW;
    // Setup
    void setup() {
      pinMode(BOARD_LED_PIN, OUTPUT);
      Serial.begin(115200); // actual speed does not matter USB
      // Open Port handler
      portHandler = dynamixel::PortHandler::getPortHandler(DEVICENAME);
      if (!portHandler->openPort()) signal_abort(1);
      if (!portHandler->setBaudRate(BAUDRATE)) signal_abort(2);
    // loop
    void loop() {
      bool did_something = false;
      int cb;
      // First forward anything received from DXL
      cb = portHandler->readPort(buffer, BUFFER_SIZE);
      if (cb > 0) {
        Serial.write(buffer, cb);  
        did_something = true;
      // Now forward anything received on USB to DXL
      cb = 0;
      while (Serial.available()) {
        buffer[cb++] =;
      if (cb) {
        portHandler->writePort(buffer, cb);  
        did_something = true;
      if (did_something) {
        led_state = led_state? LOW : HIGH;
        digitalWrite(BOARD_LED_PIN, led_state);
    // Signal_Abort - Fatal error,  show blink pattern of error number...
    void signal_abort(uint8_t error) {
      for (;;) {
        for (uint8_t i = 0; i < error; i++) {
          digitalWrite(BOARD_LED_PIN, HIGH);
          digitalWrite(BOARD_LED_PIN, LOW);
    I was then able to use Robotis DynamixelSDK on my UP board and compile their dxl_monitor program and was able to detect the three servos I had connected.

    How you connect servos up, depends. The test case I did this morning was with one of their RS485 expansion boards that also has AX like servo connectors. I have also used the 904A board and soldered in those type of connectors. In that case I use one of the Trossen DXL powered hubs to handle the power...

    As for your current setup and not seeing anything...
    Have you figured out where the problem is? That is have you configured the UART on the expansion port to be available and there is no debug monitor running on it and baud rate is set to match what you have on Arbotix...

    Again not sure what all you are asking here?

  4. Re: PhantomX controlled by a Raspberry Pi

    I configured minicom with these parameters: Serial device: /dev/ttyAMA0 and baud rate 38400, but the serial monitor is mute. Anyway, this is a secondary problem.

    I would send the signal from commander to arbotix through the raspberry. In order to do this, it's necessary to link the two boards to the raspberry and send the signal from a port to the other one, or is it possible to eliminate the geekduino board and rewrite the sketch commander to upload it directly on the raspberry?

  5. #245

    Re: PhantomX controlled by a Raspberry Pi

    I am sorry, I don't fully understand your question:

    First to configuring RPI to do Serial communications using the expansion connector. Some of this depends on which RPI you have. For example RPI3, the /dev/TTYAMA0 device I believe defaults to the Bluetooth onboard... and /dev/TTYS0 is the expansion connector...

    Again it is easiest to do a net search to configure...

    Example web page:

    I don't know which Geekduino board? I have never used one... What I have done in the past is to simply connect the XBEE up to the RPI, with something simple like:
    Which simply plugs into USB of RPI... It will create a /dev/ttyUSBn object...

    Then depending on how you wish to connect the Arbotix to RPI... Expansion connector (through level shifter) or simple FTDI cable (or other USB to serial adapter). again will create another /dev/ttyUSBx object... Note: In my code I would then typically setup to use udev rules to create an alias for each them as to not randomly use one or the other...
    Example create one /dev/ttyDXL for whatever actual device I have hooked up to have my code base output data to the servos...
    Likewise maybe create another one like /dev/ttyXBEE for the actual XBee.

    Again how I did some of this is in my random notes (Readme) of my Raspberry_pi project in the section: Setup tty Device on RPI

    But again your millage may differ.

  6. Re: PhantomX controlled by a Raspberry Pi

    Hi dear community,

    I don't know if somebody already created a topic to talk about the upgrade of Phantomx MK-III with AX12A servos with MK-IV functions.

    I purchased the U2D2 , a Raspberry pi 4B and than I followed the official guide to prepare the Raspberry Pi 4B and install the ROS Noetic and Interbotix X-Series Hexapod ROS Packages.

    When I try to execute the Quickstart
    $ roslaunch interbotix_xshexapod_control xshexapod_control.launch robot_model:=pxmark4
    this is the error result:

    Click image for larger version. 

Name:	termiuspi4_Tavola disegno 1.jpg 
Views:	41 
Size:	75.8 KB 
ID:	7704

    [email protected]:~$ roslaunch interbotix_xshexapod_control xshexapod_control.launch robot_model:=pxmark4... logging to /home/pibot/.ros/log/628392f4-e523-11ec-95c8-bbf407757888/roslaunch-ubuntu-1581.log
    Checking log directory for disk usage. This may take a while.
    Press Ctrl-C to interrupt
    Done checking log file disk usage. Usage is <1GB.
    started roslaunch server
     * /pxmark4/robot_description: <?xml version="1....
     * /pxmark4/xs_sdk/load_configs: True
     * /pxmark4/xs_sdk/mode_configs: /home/pibot/inter...
     * /pxmark4/xs_sdk/motor_configs: /home/pibot/inter...
     * /rosdistro: noetic
     * /rosversion: 1.15.14
        robot_state_publisher (robot_state_publisher/robot_state_publisher)
        xs_sdk (interbotix_xs_sdk/xs_sdk)
    process[pxmark4/robot_state_publisher-1]: started with pid [1631]
    process[pxmark4/xs_sdk-2]: started with pid [1632]
    [ WARN] [1654470169.017086585]: The root link pxmark4/base_link has an inertia specified in the URDF, but KDL does not support a root link with an inertia.  As a workaround, you can add an extra dummy link to your URDF.
    [ INFO] [1654470169.032662085]: [xs_sdk] Loaded mode configs from '/home/pibot/interbotix_ws/src/interbotix_ros_crawlers/interbotix_ros_xshexapods/interbotix_xshexapod_control/config/modes.yaml'.
    [ INFO] [1654470169.042577752]: [xs_sdk] Loaded motor configs from '/home/pibot/interbotix_ws/src/interbotix_ros_crawlers/interbotix_ros_xshexapods/interbotix_xshexapod_control/config/pxmark4.yaml'.
    [ INFO] [1654470169.047990326]: [xs_sdk] Found Dynamixel ID : '18',     Model : 'AX-12A',       Joint Name : 'right_back_tibia'.
    [ INFO] [1654470169.060862937]: [xs_sdk] Found Dynamixel ID : '17',     Model : 'AX-12A',       Joint Name : 'right_back_femur'.
    [ INFO] [1654470169.073893826]: [xs_sdk] Found Dynamixel ID : '15',     Model : 'AX-12A',       Joint Name : 'right_middle_tibia'.
    [ INFO] [1654470169.086896492]: [xs_sdk] Found Dynamixel ID : '1',      Model : 'AX-12A',       Joint Name : 'left_back_coxa'.
    [ INFO] [1654470169.099908752]: [xs_sdk] Found Dynamixel ID : '5',      Model : 'AX-12A',       Joint Name : 'left_middle_femur'.
    [ INFO] [1654470169.112861789]: [xs_sdk] Found Dynamixel ID : '7',      Model : 'AX-12A',       Joint Name : 'left_front_coxa'.
    [ INFO] [1654470169.125879104]: [xs_sdk] Found Dynamixel ID : '2',      Model : 'AX-12A',       Joint Name : 'left_back_femur'.
    [ INFO] [1654470169.138871307]: [xs_sdk] Found Dynamixel ID : '3',      Model : 'AX-12A',       Joint Name : 'left_back_tibia'.
    [ INFO] [1654470169.151831252]: [xs_sdk] Found Dynamixel ID : '14',     Model : 'AX-12A',       Joint Name : 'right_middle_femur'.
    [ INFO] [1654470169.164830641]: [xs_sdk] Found Dynamixel ID : '4',      Model : 'AX-12A',       Joint Name : 'left_middle_coxa'.
    [ INFO] [1654470169.177830381]: [xs_sdk] Found Dynamixel ID : '10',     Model : 'AX-12A',       Joint Name : 'right_front_coxa'.
    [ INFO] [1654470169.190822289]: [xs_sdk] Found Dynamixel ID : '6',      Model : 'AX-12A',       Joint Name : 'left_middle_tibia'.
    [ INFO] [1654470169.203821900]: [xs_sdk] Found Dynamixel ID : '8',      Model : 'AX-12A',       Joint Name : 'left_front_femur'.
    [ INFO] [1654470169.216812678]: [xs_sdk] Found Dynamixel ID : '16',     Model : 'AX-12A',       Joint Name : 'right_back_coxa'.
    [ INFO] [1654470169.229826881]: [xs_sdk] Found Dynamixel ID : '13',     Model : 'AX-12A',       Joint Name : 'right_middle_coxa'.
    [ INFO] [1654470169.244560529]: [xs_sdk] Found Dynamixel ID : '11',     Model : 'AX-12A',       Joint Name : 'right_front_femur'.
    [ INFO] [1654470169.257862066]: [xs_sdk] Found Dynamixel ID : '9',      Model : 'AX-12A',       Joint Name : 'left_front_tibia'.
    [ INFO] [1654470169.270839881]: [xs_sdk] Found Dynamixel ID : '12',     Model : 'AX-12A',       Joint Name : 'right_front_tibia'.
    [ INFO] [1654470169.283678455]: [xs_sdk] Writing startup register values to EEPROM.
    [ERROR] [1654470169.294858252]: [xs_sdk] Failed to write value[0] on items[Drive_Mode] to [ID : 1]
    [ERROR] [1654470169.294953178]: [xs_sdk] Failed to write configurations to all motors. Shutting down...
    [ERROR] [1654470169.295002992]: [xs_sdk] For troubleshooting, please see
    [pxmark4/xs_sdk-2] process has finished cleanly
    log file: /home/pibot/.ros/log/628392f4-e523-11ec-95c8-bbf407757888/pxmark4-xs_sdk-2*.log

    There's someone who has tried and succeeded in this project?

    Maybe there's an easier way to control the MK-III with the Raspberry Pi? Or I've to abandone this idea?

    Thanks to all !!!
    Last edited by minimalfra; 06-05-2022 at 06:04 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Question(s) Raspberry Pi
    By Robonaut in forum Robot Computers
    Replies: 20
    Last Post: 07-07-2013, 10:46 AM
  2. Raspberry Pi Camera coming soon
    By sarendt in forum Robotics General Discussion
    Replies: 1
    Last Post: 03-16-2013, 10:15 PM
  3. About to give up on the Raspberry Pi
    By jwatte in forum Software and Programming
    Replies: 5
    Last Post: 01-14-2013, 10:57 AM
  4. Just For Fun My Raspberry PI
    By rebel in forum Arbotix, Microcontrollers, Arduino
    Replies: 0
    Last Post: 12-31-2012, 05:57 PM
  5. For learning: PhantomX Hexapod vs PhantomX Quadruped
    By Leugim in forum Humanoids, Walkers & Crawlers
    Replies: 4
    Last Post: 10-26-2012, 08:50 AM

Tags for this Thread

Posting Permissions

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