Macros | Functions | Variables
sync_read_write_node.cpp File Reference
#include <ros/ros.h>
#include "std_msgs/String.h"
#include "dynamixel_sdk_examples/SyncGetPosition.h"
#include "dynamixel_sdk_examples/SyncSetPosition.h"
#include "dynamixel_sdk/dynamixel_sdk.h"
Include dependency graph for sync_read_write_node.cpp:

Go to the source code of this file.

Macros

#define ADDR_GOAL_POSITION   116
 
#define ADDR_PRESENT_POSITION   132
 
#define ADDR_TORQUE_ENABLE   64
 
#define BAUDRATE   57600
 
#define DEVICE_NAME   "/dev/ttyUSB0"
 
#define DXL1_ID   1
 
#define DXL2_ID   2
 
#define PROTOCOL_VERSION   2.0
 

Functions

int main (int argc, char **argv)
 
bool syncGetPresentPositionCallback (dynamixel_sdk_examples::SyncGetPosition::Request &req, dynamixel_sdk_examples::SyncGetPosition::Response &res)
 
void syncSetPositionCallback (const dynamixel_sdk_examples::SyncSetPosition::ConstPtr &msg)
 

Variables

GroupSyncRead groupSyncRead (portHandler, packetHandler, ADDR_PRESENT_POSITION, 4)
 
GroupSyncWrite groupSyncWrite (portHandler, packetHandler, ADDR_GOAL_POSITION, 4)
 
PacketHandlerpacketHandler = PacketHandler::getPacketHandler(PROTOCOL_VERSION)
 
PortHandlerportHandler = PortHandler::getPortHandler(DEVICE_NAME)
 

Macro Definition Documentation

#define ADDR_GOAL_POSITION   116

Definition at line 46 of file sync_read_write_node.cpp.

#define ADDR_PRESENT_POSITION   132

Definition at line 45 of file sync_read_write_node.cpp.

#define ADDR_TORQUE_ENABLE   64

Definition at line 44 of file sync_read_write_node.cpp.

#define BAUDRATE   57600

Definition at line 54 of file sync_read_write_node.cpp.

#define DEVICE_NAME   "/dev/ttyUSB0"

Definition at line 55 of file sync_read_write_node.cpp.

#define DXL1_ID   1

Definition at line 52 of file sync_read_write_node.cpp.

#define DXL2_ID   2

Definition at line 53 of file sync_read_write_node.cpp.

#define PROTOCOL_VERSION   2.0

Definition at line 49 of file sync_read_write_node.cpp.

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 149 of file sync_read_write_node.cpp.

bool syncGetPresentPositionCallback ( dynamixel_sdk_examples::SyncGetPosition::Request &  req,
dynamixel_sdk_examples::SyncGetPosition::Response &  res 
)

Definition at line 63 of file sync_read_write_node.cpp.

void syncSetPositionCallback ( const dynamixel_sdk_examples::SyncSetPosition::ConstPtr &  msg)

Definition at line 106 of file sync_read_write_node.cpp.

Variable Documentation

PacketHandler* packetHandler = PacketHandler::getPacketHandler(PROTOCOL_VERSION)

Definition at line 58 of file sync_read_write_node.cpp.

PortHandler* portHandler = PortHandler::getPortHandler(DEVICE_NAME)

Definition at line 57 of file sync_read_write_node.cpp.



dynamixel_sdk_examples
Author(s): zerom
autogenerated on Fri Apr 16 2021 02:25:58