Skip to content

Commit

Permalink
Merge pull request #5 from ManifoldFR/topic/rename-package
Browse files Browse the repository at this point in the history
Rename the package from "septum" to "pinocchio_rerun"
  • Loading branch information
ManifoldFR authored May 15, 2024
2 parents 363ea93 + 49b29b8 commit c1f3e4e
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 21 deletions.
10 changes: 6 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
cmake_minimum_required(VERSION 3.18)
set(PROJECT_NAME septum)
set(PROJECT_NAME pinocchio_rerun)
set(PROJECT_URL "https://github.com/ManifoldFR/pinocchio-rerun")
set(PROJECT_DESCRIPTION "A C++-based visualizer for Pinocchio using rerun")
set(PROJECT_CUSTOM_HEADER_EXTENSION "hpp")
set(PROJECT_CUSTOM_HEADER_DIR ${PROJECT_NAME})
set(PROJECT_VERSION 0.1.0)

set(CMAKE_CXX_STANDARD 17)
Expand Down Expand Up @@ -60,9 +61,10 @@ file(GLOB lib_HEADERS CONFIGURE_DEPENDS "src/*.hpp")
add_library(${LIB_NAME} SHARED "${lib_SRC}")
set_standard_output_directory(${LIB_NAME})

set(SEPTUM_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src")
target_include_directories(${LIB_NAME} PUBLIC $<BUILD_INTERFACE:${SEPTUM_SRC_DIR}>
$<INSTALL_INTERFACE:include>)
set(pinocchio_rerun_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src")
target_include_directories(
${LIB_NAME} PUBLIC $<BUILD_INTERFACE:${pinocchio_rerun_SRC_DIR}>
$<INSTALL_INTERFACE:include>)
set(_build_dir_includes ${CMAKE_CURRENT_BINARY_DIR}/include/${PROJECT_NAME})
target_include_directories(${LIB_NAME} PUBLIC $<BUILD_INTERFACE:${_build_dir_includes}>)
target_link_libraries(${LIB_NAME} PUBLIC rerun_sdk)
Expand Down
4 changes: 2 additions & 2 deletions examples/solo8.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import pyseptum
import pinocchio_rerun
import example_robot_data as erd
import pinocchio as pin
import numpy as np
Expand All @@ -7,7 +7,7 @@
robot = erd.load("solo8")
model = robot.model
visual_model = robot.visual_model
rr = pyseptum.RerunVisualizer(model, visual_model)
rr = pinocchio_rerun.RerunVisualizer(model, visual_model)
rr.loadViewerModel()
assert rr.initialized
q0 = pin.neutral(model)
Expand Down
4 changes: 2 additions & 2 deletions examples/talos.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import pyseptum
import pinocchio_rerun
import example_robot_data as erd
import pinocchio as pin
import numpy as np
Expand All @@ -7,7 +7,7 @@
robot = erd.load("talos")
model = robot.model
visual_model = robot.visual_model
rr = pyseptum.RerunVisualizer(model, visual_model)
rr = pinocchio_rerun.RerunVisualizer(model, visual_model)
rr.initViewer()
assert rr.initialized
q0 = pin.neutral(model)
Expand Down
4 changes: 2 additions & 2 deletions examples/ur5.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import pyseptum
import pinocchio_rerun
import example_robot_data as erd
import pinocchio as pin
import numpy as np
Expand All @@ -7,7 +7,7 @@
robot = erd.load("ur5")
model = robot.model
visual_model = robot.visual_model
rr = pyseptum.RerunVisualizer(model, visual_model)
rr = pinocchio_rerun.RerunVisualizer(model, visual_model)
rr.loadViewerModel()
q0 = pin.neutral(model)
rr.display(q0)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[tool.ruff.per-file-ignores]
"python/pyseptum/__init__.py" = ["F401", "F403"]
"python/pinocchio_rerun/__init__.py" = ["F401", "F403"]
10 changes: 5 additions & 5 deletions python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,30 @@ find_package(eigenpy REQUIRED)

file(GLOB py_SRC CONFIGURE_DEPENDS "*.cpp")

set(PYLIB "py${LIB_NAME}")
set(PYLIB "${LIB_NAME}_pywrap")
add_library(${PYLIB} SHARED ${py_SRC})

target_link_libraries(${PYLIB} PUBLIC ${LIB_NAME} eigenpy::eigenpy)
target_compile_definitions(${PYLIB} PRIVATE MODULE_NAME=${PYLIB})

set(PYLIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${PYTHON_SITELIB}/${PYLIB}")
set(PYLIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${PYTHON_SITELIB}/${LIB_NAME}")
get_relative_rpath(${PYLIB_INSTALL_DIR} PYLIB_INSTALL_RPATH)

set_target_properties(
${PYLIB}
PROPERTIES PREFIX ""
SUFFIX ${PYTHON_EXT_SUFFIX}
LIBRARY_OUTPUT_DIRECTORY ${PYLIB}
LIBRARY_OUTPUT_DIRECTORY ${LIB_NAME}
INSTALL_RPATH "${PYLIB_INSTALL_RPATH}")

install(TARGETS ${PYLIB} DESTINATION ${PYLIB_INSTALL_DIR})

python_install_on_site(${PYLIB} __init__.py)
python_install_on_site(${LIB_NAME} __init__.py)

# Generate stubs

if(GENERATE_PYTHON_STUBS)
load_stubgen()
generate_stubs(${CMAKE_CURRENT_BINARY_DIR} ${PYLIB}
generate_stubs(${CMAKE_CURRENT_BINARY_DIR} ${LIB_NAME}
${CMAKE_INSTALL_PREFIX}/${PYTHON_SITELIB} ${PYLIB})
endif(GENERATE_PYTHON_STUBS)
2 changes: 1 addition & 1 deletion python/module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <eigenpy/std-vector.hpp>
#include <pinocchio_visualizers/python/visitor.hpp>

#include "septum.hpp"
#include "pinocchio_rerun.hpp"

#define PYMODULE() BOOST_PYTHON_MODULE(MODULE_NAME)

Expand Down
2 changes: 2 additions & 0 deletions python/pinocchio_rerun/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from .pinocchio_rerun_pywrap import *
from .pinocchio_rerun_pywrap import __version__
2 changes: 0 additions & 2 deletions python/pyseptum/__init__.py

This file was deleted.

5 changes: 3 additions & 2 deletions src/septum.hpp → src/pinocchio_rerun.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ namespace pinrerun {

inline std::string printVersion(const char *delimiter = ".") {
std::ostringstream oss;
oss << SEPTUM_MAJOR_VERSION << delimiter << SEPTUM_MINOR_VERSION << delimiter
<< SEPTUM_PATCH_VERSION;
oss << PINOCCHIO_RERUN_MAJOR_VERSION << delimiter
<< PINOCCHIO_RERUN_MINOR_VERSION << delimiter
<< PINOCCHIO_RERUN_PATCH_VERSION;
return oss.str();
}

Expand Down

0 comments on commit c1f3e4e

Please sign in to comment.