Migrate Python bindings from SWIG to nanobind
This commit is contained in:
@@ -94,7 +94,10 @@ Tested with a _Jetson AGX Orin Developer Kit_ module.
|
||||
- Build _rpt_ package inside container:
|
||||
|
||||
```bash
|
||||
cd /RapidPoseTriangulation/swig/ && make all && cd ../tests/ && python3 test_interface.py && cd ..
|
||||
cd /RapidPoseTriangulation/
|
||||
uv sync --group dev
|
||||
uv run pytest tests/test_interface.py
|
||||
uv build
|
||||
|
||||
cd /RapidPoseTriangulation/scripts/ && \
|
||||
g++ -std=c++2a -fPIC -O3 -march=native -Wall -Werror -flto=auto \
|
||||
|
||||
@@ -12,10 +12,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends libatlas-base-d
|
||||
# Show matplotlib images
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends python3-tk
|
||||
|
||||
# Install swig and later dependencies
|
||||
# Install build dependencies
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends build-essential
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends swig
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends libopencv-dev
|
||||
RUN pip3 install --no-cache-dir uv
|
||||
|
||||
RUN pip3 install --no-cache-dir scipy
|
||||
COPY ./skelda/ /skelda/
|
||||
|
||||
@@ -239,8 +239,9 @@ void Rpt3DWrapperNode::call_model()
|
||||
// Since the prediction is very fast, parallel callback threads only need to wait a short time
|
||||
cams_mutex.lock();
|
||||
pose_mutex.lock();
|
||||
const auto poses_3d = tri_model->triangulate_poses(
|
||||
all_poses, all_cameras, roomparams, joint_names);
|
||||
PoseBatch2D pose_batch_2d = PoseBatch2D::from_nested(all_poses);
|
||||
auto poses_3d = tri_model->triangulate_poses(
|
||||
pose_batch_2d, all_cameras, roomparams, joint_names).to_nested();
|
||||
|
||||
double min_ts = *std::min_element(all_timestamps.begin(), all_timestamps.end());
|
||||
this->all_poses_set = std::vector<bool>(cam_ids.size(), false);
|
||||
|
||||
Reference in New Issue
Block a user