diff --git a/README.md b/README.md index d60fc7db..a6c69497 100755 --- a/README.md +++ b/README.md @@ -8,8 +8,8 @@ This software package provides a C++ interface to communicate with the mobile platforms, for sending commands to the robot and receiving the latest robot state. The repository is a joint effort by the development teams at Weston Robot (Singapore) and AgileX Robotics (China). -- Copyright (c) 2020-2023 [Weston Robot](https://www.westonrobot.com/) -- Copyright (c) 2020-2023 [AgileX Robotics](http://www.agilex.ai/?lang=zh-cn) +- Copyright (c) 2020-2024 [Weston Robot](https://www.westonrobot.com/) +- Copyright (c) 2020-2024 [AgileX Robotics](http://www.agilex.ai/?lang=zh-cn) Please create an issue on Github at https://github.com/westonrobot/ugv_sdk/issues if you encounter any problems when using the packages. @@ -62,6 +62,42 @@ $ cd .. $ catkin_make ``` +### Build the package as a CMake project + +``` +$ git clone https://github.com/westonrobot/ugv_sdk.git +$ cd ugv_sdk +$ mkdir build && cd build +$ cmake .. && make +``` + +If you need Python binding, you can build the package with the following command + +``` +$ cmake -DENABLE_PYTHON_BINDING=ON .. && make +``` + +### Build the package as a Python package + +For development and testing, you can use inplace build + +```bash +$ python setup.py build_ext --inplace +``` + +It will generate library files in build/temp.linux-x86_64-3.10/lib (the name could be different based on your system). +You can add the path to the PYTHONPATH environment variable to use the library. + +```bash +$ export PYTHONPATH=$PYTHONPATH:/build/temp.linux-x86_64-3.10/lib +``` + +You can also install the package to your Python environment using + +```bash +$ python setup.py install +``` + ## Setup CAN-To-USB Adapter 1. Enable gs_usb kernel module diff --git a/setup.py b/setup.py index 75966501..f08c0787 100644 --- a/setup.py +++ b/setup.py @@ -44,11 +44,19 @@ def build_extension(self, ext): setup( name='ugv_sdk_py', - version='0.1.1', + version='0.2.0', author='Ruixiang Du', author_email='ruixiang.du@westonrobot.com', description='Python bindings for the ugv_sdk library using pybind11', - long_description='', + long_description='ugv_sdk C++ library: https://github.com/westonrobot/ugv_sdk, by Weston Robot & AgileX Robotics', + classifiers=[ + 'Operating System :: POSIX :: Linux', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.10', + ], + platforms=['Linux'], + python_requires='>=3.8', ext_modules=[CMakeExtension('ugv_sdk_bindings')], cmdclass=dict(build_ext=CMakeBuild), zip_safe=False,