Dynamixel  2.9.5
RoadNarrows Robotics Dynamixel Package
botsensetest.cxx
1 #include "Dynamixel/Dynamixel.h"
3 #include "Dynamixel/DynaChain.h"
4 #include "botsense/libBotSense.h"
5 #include "botsense/BotSense.h"
6 
7 int main()
8 {
9  BsClient_P bsClient;
10  DynaCommBotSense* com;
11  com = new DynaCommBotSense("/dev/ttyUSB0",1000000,"localhost",9195);
12  //com = DynaComm::New("botsense://localhost:9195:/dev/ttyUSB0",1000000);
13  DynaChain* chain;
14 
15  bsClient = com->GetProxyClient();
16  printf("client: %s\n",bsClientAttrGetName(bsClient));
17  chain = new DynaChain(*com);
18 
19 
20  //int rc = com->Open();
21 
22  printf("chain size: %d\n",chain->GetNumberInChain());
23  chain->AddNewServosByScan();
24  printf("chain size: %d\n",chain->GetNumberInChain());
25 
26  com->Close();
27 }
RoadNarrows Dynamixel Servo Chain Container Base Class Interface.
int main(int argc, char *argv[])
Example main.
virtual uint_t GetNumberInChain() const
Get the number of servos currently in chain.
Definition: DynaChain.h:140
virtual int AddNewServosByScan()
Scan and add all discovered and created servos to the Dynamixel chain.
Definition: DynaChain.cxx:229
const BsClient_P GetProxyClient() const
Get this BotSense proxy client.
Dynamixel Chain Container Base Class.
Definition: DynaChain.h:75
BotSense IP Proxied Dynamixel Bus Communications Class.
RoadNarrows Dynamixel Top-Level Package Header File.
virtual int Close()
Close serial communication to dynamixel bus and connection to BotSense proxy server.
RoadNarrows Botsene IP Proxied Dynamixel Bus Communication Class Interface.