Merge branch 'master' of https://github.com/Bytelogics/z1_controller
# Conflicts: # README.md
This commit is contained in:
commit
997bf824cb
|
@ -0,0 +1,2 @@
|
||||||
|
build/**
|
||||||
|
build
|
|
@ -0,0 +1,4 @@
|
||||||
|
.vscode
|
||||||
|
/build
|
||||||
|
/cmake-build*
|
||||||
|
.idea
|
|
@ -5,9 +5,10 @@ set(PACKAGE_NAME z1_controller)
|
||||||
set(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} -O3")
|
set(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} -O3")
|
||||||
|
|
||||||
# ----------------------options----------------------
|
# ----------------------options----------------------
|
||||||
|
if (NOT COMMUNICATION)
|
||||||
set(COMMUNICATION UDP) # UDP
|
set(COMMUNICATION UDP) # UDP
|
||||||
# set(COMMUNICATION ROS) # ROS
|
# set(COMMUNICATION ROS) # ROS
|
||||||
|
endif()
|
||||||
|
|
||||||
# ----------------------configurations----------------------
|
# ----------------------configurations----------------------
|
||||||
# COMMUNICATION
|
# COMMUNICATION
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
FROM osrf/ros:noetic-desktop-full
|
||||||
|
|
||||||
|
RUN apt-get update
|
||||||
|
RUN apt-get -y install python3-catkin-tools
|
||||||
|
|
||||||
|
ADD . / data/
|
||||||
|
WORKDIR data
|
||||||
|
RUN mkdir build
|
||||||
|
WORKDIR build
|
||||||
|
ENV CMAKE_PREFIX_PATH=/opt/ros/noetic
|
||||||
|
RUN bash -c 'cmake ..'
|
||||||
|
RUN make
|
||||||
|
|
||||||
|
CMD ./z1_ctrl
|
|
@ -3,10 +3,11 @@ documentation
|
||||||
[unitree-z1-docs-english](http://dev-z1.unitree.com)
|
[unitree-z1-docs-english](http://dev-z1.unitree.com)
|
||||||
|
|
||||||
[unitree-z1-docs-chinese](http://dev-z1.cn.unitree.com)
|
[unitree-z1-docs-chinese](http://dev-z1.cn.unitree.com)
|
||||||
Documentation:
|
|
||||||
|
|
||||||
[unitree-z1-docs-en](http://dev-z1.unitree.com)
|
see [unitree-z1-docs](http://dev-z1.unitree.com)
|
||||||
|
|
||||||
[unitree-z1-docs-cn](http://dev-z1.cn.unitree.com)
|
|
||||||
|
|
||||||
|
## Build docker image
|
||||||
|
docker build . -t bytelogics:z1_controller
|
||||||
|
|
||||||
|
## Run the docker instance
|
||||||
|
docker run -ti --rm --network host -p 8071:8071 bytelogics:z1_controller
|
||||||
|
|
|
@ -16,7 +16,7 @@ private:
|
||||||
double _posSpeed = 0.2;
|
double _posSpeed = 0.2;
|
||||||
double oriSpeedLimit = 0.5;// limits in SDK
|
double oriSpeedLimit = 0.5;// limits in SDK
|
||||||
double posSpeedLimit = 0.5;
|
double posSpeedLimit = 0.5;
|
||||||
VecX _changeDirections;
|
VecX _changeDirectionsf;
|
||||||
|
|
||||||
Vec6 _twist;
|
Vec6 _twist;
|
||||||
HomoMat _endHomoGoal, _endHomoPast, _endHomoDelta;
|
HomoMat _endHomoGoal, _endHomoPast, _endHomoDelta;
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
class ARMSDK : public CmdPanel{
|
class ARMSDK : public CmdPanel{
|
||||||
public:
|
public:
|
||||||
ARMSDK(std::vector<KeyAction*> events,
|
ARMSDK(std::vector<KeyAction*> events,
|
||||||
EmptyAction emptyAction, const char* IP, uint toport, uint ownport, double dt = 0.002);
|
EmptyAction emptyAction, const char* IP, uint port, double dt = 0.002);
|
||||||
~ARMSDK();
|
~ARMSDK();
|
||||||
SendCmd getSendCmd();
|
SendCmd getSendCmd();
|
||||||
int getState(size_t channelID = 0);
|
int getState(size_t channelID = 0);
|
||||||
|
|
|
@ -76,7 +76,7 @@ private:
|
||||||
double _dV = 0.0; //delta value per delta time
|
double _dV = 0.0; //delta value per delta time
|
||||||
double _dt = 0.0;
|
double _dt = 0.0;
|
||||||
double _dVdt = 0.0; // delta value per second
|
double _dVdt = 0.0; // delta value per second
|
||||||
double _dVdtf = 0.0; // delta value per second after filter
|
double _dVdtf = 0.0; // delta value per second after fliter
|
||||||
double _lim1, _lim2;
|
double _lim1, _lim2;
|
||||||
bool _hasLim = false;
|
bool _hasLim = false;
|
||||||
bool _hasGoZero = false;
|
bool _hasGoZero = false;
|
||||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -48,7 +48,7 @@ int main(int argc, char **argv){
|
||||||
ctrlComp->stateCSV = new CSVTool("../config/savedArmStates.csv");
|
ctrlComp->stateCSV = new CSVTool("../config/savedArmStates.csv");
|
||||||
ctrlComp->geneObj();
|
ctrlComp->geneObj();
|
||||||
if(ctrlComp->ctrl == Control::SDK){
|
if(ctrlComp->ctrl == Control::SDK){
|
||||||
ctrlComp->cmdPanel = new ARMSDK(events, emptyAction, "127.0.0.1", 8072, 8071, 0.002);
|
ctrlComp->cmdPanel = new ARMSDK(events, emptyAction, "127.0.0.1", 8072, 0.002);
|
||||||
}else if(ctrlComp->ctrl == Control::KEYBOARD){
|
}else if(ctrlComp->ctrl == Control::KEYBOARD){
|
||||||
events.push_back(new StateAction("`", (int)ArmFSMStateName::BACKTOSTART));
|
events.push_back(new StateAction("`", (int)ArmFSMStateName::BACKTOSTART));
|
||||||
events.push_back(new StateAction("1", (int)ArmFSMStateName::PASSIVE));
|
events.push_back(new StateAction("1", (int)ArmFSMStateName::PASSIVE));
|
||||||
|
|
Loading…
Reference in New Issue