Skip to content

Commit 8eb6595

Browse files
committed
fix multi-robots control bug
1 parent 7cf9f61 commit 8eb6595

File tree

8 files changed

+6
-7
lines changed

8 files changed

+6
-7
lines changed

Diff for: CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
1717
add_executable(z1_ctrl main.cpp)
1818
target_link_libraries(z1_ctrl libZ1_${CMAKE_HOST_SYSTEM_PROCESSOR}.so)
1919

20-
find_package(gazebo)
21-
if(${gazebo_FOUND})
20+
find_package(catkin)
21+
if(${catkin_FOUND})
2222
add_subdirectory(sim)
2323
endif()

Diff for: include/FSM/State_TeachRepeat.h

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ class State_TeachRepeat : public FSMState{
1818
bool _reachedStart = false;
1919
bool _finishedRepeat = false;
2020
size_t _index = 0;
21-
size_t _indexPast;
2221
Vec6 _trajStartQ, _trajStartQd;
2322
double _trajStartGripperQ, _trajStartGripperQd;
2423

Diff for: include/control/armSDK.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
class ARMSDK : public CmdPanel{
88
public:
99
ARMSDK(std::vector<KeyAction*> events,
10-
EmptyAction emptyAction, const char* IP, uint port, double dt = 0.002);
10+
EmptyAction emptyAction, const char* sdkIP, uint sdkPort, uint ownPort, double dt = 0.002);
1111
~ARMSDK();
1212
SendCmd getSendCmd();
1313
int getState(size_t channelID = 0);

Diff for: include/message/LowlevelState.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ struct LowlevelState{
5353
double getGripperTauFiltered();
5454
private:
5555
size_t _dof = 6;
56-
int temporatureLimit = 80.0;// centigrade
56+
int temporatureLimit = 80;// centigrade
5757
std::vector<int> _isMotorConnectedCnt;
5858
std::vector<bool> _isMotorLostConnection;
5959
};

Diff for: lib/libZ1_aarch64.so

12.3 KB
Binary file not shown.

Diff for: lib/libZ1_x86_64.so

0 Bytes
Binary file not shown.

Diff for: main.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ int main(int argc, char **argv){
4545
ctrlComp->ioInter = new IOUDP(ctrlComp->ctrl_IP.c_str(), ctrlComp->ctrl_port);
4646
ctrlComp->geneObj();
4747
if(ctrlComp->ctrl == Control::SDK){
48-
ctrlComp->cmdPanel = new ARMSDK(events, emptyAction, "127.0.0.1", 8072, 0.002);
48+
ctrlComp->cmdPanel = new ARMSDK(events, emptyAction, "127.0.0.1", 8072, 8071, 0.002);
4949
}else if(ctrlComp->ctrl == Control::KEYBOARD){
5050
events.push_back(new StateAction("`", (int)ArmFSMStateName::BACKTOSTART));
5151
events.push_back(new StateAction("1", (int)ArmFSMStateName::PASSIVE));

Diff for: sim/sim_ctrl.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ int main(int argc, char **argv){
4848
ctrlComp->ioInter = new IOROS();
4949
ctrlComp->geneObj();
5050
if(ctrlComp->ctrl == Control::SDK){
51-
ctrlComp->cmdPanel = new ARMSDK(events, emptyAction, "127.0.0.1", 8072, 0.002);
51+
ctrlComp->cmdPanel = new ARMSDK(events, emptyAction, "127.0.0.1", 8072, 8071, 0.002);
5252
}else if(ctrlComp->ctrl == Control::KEYBOARD){
5353
events.push_back(new StateAction("`", (int)ArmFSMStateName::BACKTOSTART));
5454
events.push_back(new StateAction("1", (int)ArmFSMStateName::PASSIVE));

0 commit comments

Comments
 (0)