Issue:
Hello! I am trying to make a control program using the GroupSyncRead function, but my compiler doesn´t seem to recognize the GroupSyncReadObject.
DYNAMIXEL Servo:
I am trying to use XH540-W240/T
DYNAMIXEL Controller:
This program is meant to run on an openCR
Software Interface:
I am writing the code on Visual Studio and testing both on arduino and VS
Error I´m getting:
error: ‘portHandler’ is not a type
dynamixel::GroupSyncRead groupSyncRead(portHandler, packetHandler, 200, 11);
***Code snipet of the .h file of the library I´m trying to make
#ifndef DXL_controller
#define DXL_controller
#include “Arduino.h”
#include “DynamixelSDK.h”
#define deviceName “DXL_PORT”
class Controller
{
private:
int protocol_version;
int baudrate = 57600;
dynamixel::PortHandler *portHandler = dynamixel::PortHandler::getPortHandler(deviceName);
dynamixel::PacketHandler *packetHandler = dynamixel::PacketHandler::getPacketHandler(protocol_version);
//Problematic Line
dynamixel::GroupSyncRead groupSyncRead(portHandler, packetHandler, 116, 4);
int dxl_comm_result = COMM_TX_FAIL; // Communication result
uint8_t dxl_error = 0; // Dynamixel error