Skip to content

Update CMakeLists.txt #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 28 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
8318d35
Update README.md
Agnel-Wang Mar 9, 2023
0ded261
Update README.md
Agnel-Wang Mar 9, 2023
aebf9e5
fix cartesian path bug
Agnel-Wang Apr 18, 2023
3deba33
Update CMakeLists.txt
siilats Apr 23, 2023
281dc5f
feat: added docker
dmi3coder Apr 25, 2023
0868169
chore: remove unused command
dmi3coder Apr 25, 2023
5fbfef0
Merge branch 'master' of https://github.com/unitreerobotics/z1_contro…
siilats Apr 25, 2023
997bf82
Merge branch 'master' of https://github.com/Bytelogics/z1_controller
siilats Apr 25, 2023
0bb74ee
10.0.0.250 robot ip
siilats Apr 29, 2023
2f90b69
enable collision
siilats Apr 29, 2023
3e9c3ad
matchbox is 20 grams
siilats Apr 29, 2023
236a160
Update README.md
siilats May 2, 2023
8ad93fd
Update README.md
siilats May 2, 2023
467b4a3
Update README.md
siilats May 2, 2023
6e1f46a
Update README.md
siilats May 2, 2023
3c505ea
Update README.md
siilats May 3, 2023
e196554
Update README.md
siilats May 3, 2023
ab427d2
feat: update docker to build with ROS
dmi3coder May 3, 2023
e1e1b13
Merge remote-tracking branch 'origin/master'
dmi3coder May 3, 2023
35b2714
feat: splitted z1 world and spawn
dmi3coder May 7, 2023
0be1248
feat: added script for preparing unitree_ws folder
dmi3coder May 7, 2023
541b8a2
docker
siilats May 9, 2023
f0d8980
Merge branch 'master' of https://github.com/Bytelogics/z1_controller
siilats May 9, 2023
c4c093f
Merge branch 'master' of https://github.com/unitreerobotics/z1_contro…
siilats May 9, 2023
77780b9
bytelogics dockerfile
siilats May 31, 2023
11463ab
Merge branch 'master' of https://github.com/unitreerobotics/z1_contro…
siilats May 31, 2023
ba1b0ac
bytelogics dockerfile
siilats Jun 1, 2023
80a44bd
bytelogics dockerfile
siilats Jun 1, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
build/**
build
unitree_ws
unitree_ws/**
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
.vscode
/build
/cmake-build*
.idea
build
unitree_ws
2 changes: 2 additions & 0 deletions Bytelogics.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FROM siilats/z1_controller
CMD ./z1_ctrl
35 changes: 35 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
FROM kstein/noetic-arm-desktop-full

RUN apt-get update
RUN apt-get -y install python3-catkin-tools ninja-build git telnet

ADD . / data/
WORKDIR data
RUN mkdir build
WORKDIR build
ENV CMAKE_PREFIX_PATH=/opt/ros/noetic
RUN bash -c 'cmake ..'
RUN make
WORKDIR ..
RUN ./prepare_unitree_ws.sh
SHELL ["/bin/bash", "-c"]
WORKDIR unitree_ws
RUN source /ros_entrypoint.sh && /opt/ros/noetic/bin/catkin_make
RUN source devel/setup.bash
# WORKDIR ../build
#CMD roslaunch unitree_gazebo z1_spawn.launch

#CMD ./z1_ctrl
#docker tag bytelogics:z1_controller siilats/z1_controller
#docker push siilats/z1_controller:latest
#xhost +localhost
#defaults read org.xquartz.X11 enable_iglx

#defaults write org.xquartz.X11 enable_iglx -bool YES
#defaults read org.xquartz.X11 enable_iglx


#docker run -ti -v /tmp/.X11-unix:/tmp/.X11-unix -e "DISPLAY=host.docker.internal:0" pstoll/emacs-cross emacs
# docker run -it -p 11311:11311 --env="ROS_MASTER_URI=http://localhost:11311" bytelogics:z1_controller roslaunch unitree_gazebo z1_spawn.launch

#docker run -p 6080:80 --shm-size=512m tiryoh/ros-desktop-vnc:melodic
62 changes: 59 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,63 @@
Documentation:
documentation

[unitree-z1-docs-en](http://dev-z1.unitree.com)
[unitree-z1-docs-english](http://dev-z1.unitree.com)

[unitree-z1-docs-cn](http://dev-z1.cn.unitree.com)
[unitree-z1-docs-chinese](http://dev-z1.cn.unitree.com)

see [unitree-z1-docs](http://dev-z1.unitree.com)

## Build docker image
```shell
docker build . -t bytelogics:z1_controller
```

## Run the docker instance
For python connection:
```shell
docker run -ti --rm --network host bytelogics:z1_controller

```

For manual build within a docker:
Make sure you are not in build folder but in the parent then run
docker run -it --net=host --env="ROS_MASTER_URI=http://host.docker.internal:11311" bytelogics:z1_controller bash
`docker run -ti --rm --network host bytelogics:z1_controller bash`
`cmake .. -DCOMMUNICATION=ROS`
`make`
`./z1_ctrl`
you can try with
`./z1_ctrl k` for keyboard

Cmake command you can do catkin_make -DCOMMUNICATION=ROS
then you dont need to edit the cmake.txt file
## old docker run -ti --rm --network host --env="DISPLAY" -e DISPLAY=${HOSTNAME}:0 --env="QT_X11_NO_MITSHM=1" --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" --volume="/Users/keithsiilats/overlay_ws:/data/overlay_ws" --volume="/Users/keithsiilats/unitree_ws:/data/unitree_ws" -p 8071:8071 -p 11311:11311 bytelogics:z1_controller bash
docker run -ti --rm --network host --env="DISPLAY=novnc:0.0" --env="QT_X11_NO_MITSHM=1" --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" --volume="/Users/keithsiilats/overlay_ws:/data/overlay_ws" --volume="/Users/keithsiilats/unitree_ws:/data/unitree_ws" -p 8071:8071 -p 11311:11311 bytelogics:z1_controller bash
docker run -d --rm --network host --env="DISPLAY_WIDTH=3000" --env="DISPLAY_HEIGHT=1800" --env="RUN_XTERM=no" \
--name=novnc -p=8080:8080 theasp/novnc:latest

## on mac setup
https://gist.github.com/cschiewek/246a244ba23da8b9f0e7b11a68bf3285
cd /data/unitree_ws
source devel/setup.bash
roslaunch unitree_gazebo z1.launch

## macos v2
brew install --cask mambaforge
mamba create -n ros_env
mamba init
mamba activate ros_env
conda config --env --add channels robostack-staging
mamba install ros-noetic-desktop-full
mamba install compilers cmake pkg-config make ninja colcon-common-extensions catkin_tools
./prepare_unitree_ws.sh
cd unitree_ws
rm -Rf src/unitree_controller
rm -Rf src/z1_controller
rm -Rf src/unitree_legged_control

catkin_make
source devel/setup.bash
roslaunch unitree_gazebo z1_empty.launch
# go to dockcker and run
# roslaunch unitree_gazebo z1_spawn.launch

8 changes: 4 additions & 4 deletions config/config.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<configurartion>
<!-- lower computer communication -->
<IP>192.168.123.110</IP>
<IP>10.0.0.250</IP>
<Port>8881</Port>

<collision>
<open>N</open> <!-- Y or N -->
<limitT>10.0</limitT> <!-- N*M -->
<load>0.0</load><!-- kg-->
<open>Y</open> <!-- Y or N -->
<limitT>20.0</limitT> <!-- N*M -->
<load>0.02</load><!-- kg-->
</collision>

<grasp_max_torque>10.0</grasp_max_torque>
Expand Down
8 changes: 8 additions & 0 deletions prepare_unitree_ws.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
mkdir unitree_ws
cd unitree_ws
mkdir src
mkdir build
cd src
git clone https://github.com/Bytelogics/unitree_ros.git
git clone https://github.com/Bytelogics/unitree_ros_to_real.git
rm -rf unitree_ros_to_real/unitree_legged_real
12 changes: 12 additions & 0 deletions z1_simulator_gui.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM osrf/ros:noetic-desktop-full

RUN apt-get update
RUN apt-get -y install python3-catkin-tools ros-noetic-catkin

ADD unitree_ws /data/unitree_ws
SHELL ["/bin/bash", "-c"]
WORKDIR data/unitree_ws/
RUN source /ros_entrypoint.sh && /opt/ros/noetic/bin/catkin_make
ENV CMAKE_PREFIX_PATH=/opt/ros/noetic

CMD source devel/setup.bash && roslaunch unitree_gazebo z1.launch