876
This commit is contained in:
parent
7629d6876d
commit
b54b9dab5b
Binary file not shown.
24
Makefile
24
Makefile
|
|
@ -2,24 +2,6 @@
|
|||
#$ g++ -c -I./toolkit-dynamixel/include main.cpp
|
||||
#$ g++ DynamixelHandler.o main.o –L/usr/local/lib –ldxl_x64_cpp -lrt
|
||||
|
||||
CC = g++
|
||||
CFLAGS = -Wall -Werror -std=c++11
|
||||
|
||||
SRCDIR = src
|
||||
OBJDIR = obj
|
||||
BINDIR = bin
|
||||
|
||||
SOURCES := $(wildcard $(SRCDIR)/*.cpp)
|
||||
OBJECTS := $(patsubst $(SRCDIR)/%.cpp,$(OBJDIR)/%.o,$(SOURCES))
|
||||
EXECUTABLE := $(BINDIR)/main.cpp
|
||||
|
||||
all: $(EXECUTABLE)
|
||||
|
||||
$(EXECUTABLE): $(OBJECTS)
|
||||
$(CC) $(CFLAGS) $(OBJECTS) -o $@
|
||||
|
||||
$(OBJDIR)/%.o: $(SRCDIR)/%.cpp
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
clean:
|
||||
rm -f $(EXECUTABLE) $(OBJECTS)
|
||||
all: g++ -c -I./toolkit-dynamixel/include toolkit-dynamixel/src/DynamixelHandler.cpp
|
||||
dynamixel: g++ -c -I./toolkit-dynamixel/include toolkit-dynamixel/src/DynamixelHandler.cpp
|
||||
main: g++ -c -I./toolkit-dynamixel/include main.cpp
|
||||
|
|
|
|||
6
main.cpp
6
main.cpp
|
|
@ -24,10 +24,10 @@ std::cout << std::endl;
|
|||
std::vector<uint16_t> l_vCurrentJointPosition;
|
||||
_oDxlHandler.readCurrentJointPosition(l_vCurrentJointPosition);
|
||||
// display current joint position
|
||||
std::cout << “vCurrentJointPosition= (” << std::endl;
|
||||
std::cout << "vCurrentJointPosition= (" << std::endl;
|
||||
for (int l_joint=0; l_joint < l_vCurrentJointPosition.size(); l_joint++)
|
||||
std::cout << l_vCurrentJointPosition[l_joint] << “, “;
|
||||
std::cout << “)” << std::endl;
|
||||
std::cout << l_vCurrentJointPosition[l_joint] << ", ";
|
||||
std::cout << ")" << std::endl;
|
||||
// wait 1s
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
|
||||
std::cout << "===Closing the Dynamixel Motor communication====" << std::endl;
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 94e8849aa1dce1c20b6ef1d0245d06a765cccaca
|
||||
Loading…
Reference in New Issue