Skip to content

Commit

Permalink
Merge pull request #71 from liufang-robot/master
Browse files Browse the repository at this point in the history
feat: lebai python to pylebai
  • Loading branch information
liufang-robot authored Jun 3, 2024
2 parents 722e98f + be54c0b commit c2ec71e
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
option(CMAKE_EXPORT_COMPILE_COMMANDS "Export compile command" TRUE)


project(lebai VERSION 1.1.17 LANGUAGES CXX)
project(lebai VERSION 1.1.18 LANGUAGES CXX)
set(PROJECT_NAMESPACE lebai)
message(STATUS "${PROJECT_NAME} version: ${PROJECT_VERSION}")
# message(STATUS "major: ${PROJECT_VERSION_MAJOR}")
Expand Down
2 changes: 1 addition & 1 deletion Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = "lebai sdk"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 1.1.17
PROJECT_NUMBER = 1.1.18

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
2 changes: 1 addition & 1 deletion cmake/python.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ function(search_python_internal_module)
endif()
endfunction()

set(PYTHON_PROJECT lebai)
set(PYTHON_PROJECT pylebai)
set(PYTHON_PROJECT_DIR ${PROJECT_BINARY_DIR}/python/${PYTHON_PROJECT})
message(STATUS "Python project build path: ${PYTHON_PROJECT_DIR}")

Expand Down
4 changes: 4 additions & 0 deletions doc/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# ChangeLog

## 1.1.18

调整python包名字为pylebai。

## 1.1.17

修正python不能捕获异常的问题。
Expand Down
4 changes: 2 additions & 2 deletions doc/python.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ cmake --build build --target python_package
构建完成后,在`build/python/dist/`目录下会生成python的whl包,可以直接使用pip进行安装。

```bash
pip3 install build/python/dist/pylebai-xxx.whl
pip3 install build/python/dist/pypylebai-xxx.whl
```

您可以通过如下命令来查看安装的包的信息。
Expand All @@ -44,7 +44,7 @@ sudo pip3 uninstall pylebai
安装完成后可以直接使用lebai包。

```python
from lebai import l_master
from pylebai import l_master
robot = l_master.Robot("172.17.0.5",True)
robot.movej({"j1": 1.0,"j2": -1.0471975511965976,"j3": 1.3962634015954636,"j4": -0.17453292519943295,"j5": -1.0471975511965976,"j6": 0.0},1.0,1.0,0.0,0.0)
```
Expand Down
4 changes: 2 additions & 2 deletions examples/example.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from lebai import zeroconf
from pylebai import zeroconf
## Try to find the l_master
d = zeroconf.Discovery()
controllers = d.resolve()
## Robot instance
from lebai import l_master
from pylebai import l_master
import time
robot = l_master.Robot(controllers[0].ip_address)
time.sleep(2)
Expand Down

0 comments on commit c2ec71e

Please sign in to comment.