Skip to content

Commit c97fb51

Browse files
committed
trying to do all in one script
1 parent 90228d4 commit c97fb51

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

.github/workflows/build_wheels.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@ jobs:
1414
uses: docker/setup-buildx-action@v1
1515

1616
- name: Build wheel
17+
env:
18+
TWINE_USERNAME: "__token__"
19+
TWINE_PASSWORD: ${{ secrets.PYPI_API_KEY }}
1720
run: |
18-
sudo docker run --rm -v $(pwd):/io quay.io/pypa/manylinux2014_x86_64 /bin/bash -c "
21+
sudo docker run --rm -v -e TWINE_USERNAME -e TWINE_PASSWORD $(pwd):/io quay.io/pypa/manylinux2014_x86_64 /bin/bash -c "
1922
yum install -y epel-release &&
2023
yum-config-manager --add-repo=https://download.opensuse.org/repositories/science:/dlr/CentOS_7/ &&
2124
yum install -y --nogpgcheck eigen3-devel &&
@@ -27,4 +30,6 @@ jobs:
2730
cd /io &&
2831
/opt/python/cp311-cp311/bin/pip install setuptools wheel --root-user-action=ignore &&
2932
/opt/python/cp311-cp311/bin/python setup.py bdist_wheel &&
30-
auditwheel repair dist/ismpc-0.1-cp311-cp311-linux_x86_64.whl --plat manylinux2014_x86_64"
33+
auditwheel repair dist/ismpc-0.1-cp311-cp311-linux_x86_64.whl --plat manylinux2014_x86_64 &&
34+
/opt/python/cp311-cp311/bin/pip install twine --root-user-action=ignore &&
35+
/opt/python/cp311-cp311/bin/twine upload /io/wheelhouse/*.whl "

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ find_package(Python 3.11 COMPONENTS Interpreter ${DEV_MODULE} REQUIRED)
199199
execute_process(
200200
COMMAND "${Python_EXECUTABLE}" -m nanobind --cmake_dir
201201
OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE nanobind_ROOT
202-
)
202+
)
203203

204204
execute_process(
205205
COMMAND ${Python_EXECUTABLE} -c "import sysconfig; print(sysconfig.get_path('purelib'))"
@@ -216,7 +216,7 @@ nanobind_add_module(${ISMPC_PY_LIBRARY} ${PROJECT_SOURCE_DIR}/src/bindings.cpp)
216216
target_include_directories(${ISMPC_PY_LIBRARY} PUBLIC ${eigen_SOURCE_DIR} ${ISMPC_INCLUDE_DIR})
217217
target_link_libraries(${ISMPC_PY_LIBRARY} PUBLIC ${ISMPC_CPP_LIBRARY})
218218

219-
install(
219+
install(
220220
TARGETS ${ISMPC_PY_LIBRARY}
221221
EXPORT ${ISMPC_PY_LIBRARY}Targets
222222
LIBRARY DESTINATION ${PYTHON_SITE_PACKAGES}

src/modules/foot_trajectory_generator.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,20 @@ void FootTrajectoryGenerator::update(State& state) {
3131
Scalar desired_theta = start_theta + (end_theta - start_theta) * cubic(time_in_step);
3232
swing_foot.pose = Pose3(RotationMatrix::aroundZ(desired_theta), Vector3(desired_pos(0), desired_pos(1), 0));
3333
swing_foot.pose.euler = Vector3(0, 0, desired_theta);
34-
34+
3535
// Linear Velocity with cubic polynomial interpolation
3636
swing_foot.lin_vel.segment(0, 2) = (end_pos - start_pos) * cubic_dot(time_in_step) / ss_duration;
37-
swing_foot.lin_acc.segment(0, 2) = (end_pos - start_pos) * cubic_ddot(time_in_step) / (std::pow(ss_duration, 2));
37+
swing_foot.lin_acc.segment(0, 2) =
38+
(end_pos - start_pos) * cubic_ddot(time_in_step) / (std::pow(ss_duration, 2));
3839
// Height with quartic polynomial interpolation
3940
swing_foot.pose.translation(2) = step_height * quartic(time_in_step);
4041
swing_foot.lin_vel(2) = step_height * quartic_dot(time_in_step) / ss_duration;
4142
swing_foot.lin_acc(2) = step_height * quartic_ddot(time_in_step) / (ss_duration * ss_duration);
4243

4344
// Angular Velocity with cubic polynomial interpolation
4445
swing_foot.ang_vel = Vector3(0, 0, (end_theta - start_theta) * cubic_dot(time_in_step) / ss_duration);
45-
swing_foot.ang_acc = Vector3(0, 0, (end_theta - start_theta) * cubic_ddot(time_in_step) / (std::pow(ss_duration, 2)));
46+
swing_foot.ang_acc =
47+
Vector3(0, 0, (end_theta - start_theta) * cubic_ddot(time_in_step) / (std::pow(ss_duration, 2)));
4648
}
4749

4850
state.setDesiredSwingFoot(swing_foot);

0 commit comments

Comments
 (0)