Giter Club home page Giter Club logo

rofi's People

Contributors

ficap avatar hmichelova avatar jajik avatar jaromel-tuzerad avatar jsfpdn avatar jtojnar avatar marketanausova avatar ondraceq avatar trphajzlik avatar vikivozarova avatar xbarnat avatar xondika avatar yaqwsx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

rofi's Issues

Configuration -- use matricesVal

Configuration has unused attribute matricesVal, which should tell us if we have to compute matrices or they have not changed since the last time we computed them.

Also consider changing it to just boolean instead of ternary logic.

build: Build does not work with CMAKE_GENERATOR=Ninja in ENV

EDIT: see comment below, these are probably not correct steps to reproduce.

exporting CMAKE_GENERATOR=Ninja into shell which is used to build RoFI breaks the build

$ export CMAKE_GENERATOR=Ninja
$ . setup.sh -f Release
$ rcfg doc
$ rmake doc
Compiling suite doc
make: *** No targets specified and no makefile found.  Stop.
Build of suite doc failed. See output above

Either rmake should respect the generator used in CMake, or make sure CMAKE_GENERATOR is not set when rcfg invokes cmake.

Hardware issues of universal module control board v0.1

  • main switch transistor Q2 is flipped and therefore always conducts
  • the CHG_OK and CHG_AC_OK LEDs should be powered from 3V3, not INT
  • J21 and J22 (connector for the interface board) should have pitch 1.27mm to match flat cable pitch
  • USB-C footprint has slightly off mounting holes
  • D6 (diode for charger enable) should be omitted
  • The USB to BUS and BATTERY to BUS converters leak source voltage when turned off. No idea if it can cause trouble. Consider adding a transistor to completely switch them off.
  • Battery charging current sensing resistor (R23) should be 100m instead of 50m (problems with delivering enough power)
  • USB_TO_BUS_EN should be connected to MCU via a diode (to prevent power leaking in a disabled system)
  • Add some capacity to motor power bus
  • Connector 4 chip select is connected to the input-only pin of ESP32
  • Connect connectors on high-speed SPI pins

Passive conterparts should have sensing resistors

Currently, it is hard to detect if RoFICoM connected to the passive counterpart or not. But it has an easy solution - the passive counterpart should have pins with orientation sensing resistors. In that way, we can check if the connection was successful or not.

Design the PCB and mount it on passive connectors.

Fix roficom tests in gazebosim

Target failing_test-gazebosimRoficom in softwareComponents/gazebosim/roficom/tests/ is failing.
The problem seems to be with EAST and WEST orientation.

docs: Update compilation

  • Reflect possible configurations in the docs.
  • rcfg --all is no longer available
  • Quick start example shows Debug configuration, but the letter on next lines is R (Also before the letter there should be a space, but that's a minor thing.)
  • Add an example on how to use Build options in desktop suite
  • In Project structure, the software components are not indented

The `generate` tool lacks CLI

The generate tool is rather a hacky "script in C++" than a full-featured tool. The tool should present a CLI interface to specify parameters of configuration. No hardcoded values.

build: Documentation successfully configures but build fails if missing doxygen

It seems rcfg doc does not properly check if dependencies are available:

$ rcfg doc
Configuring suite doc
-- The C compiler identification is GNU 11.1.0
-- The CXX compiler identification is GNU 11.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/xstill/repo/rofi/build.Release/doc

$ rmake doc
Compiling suite doc
[1/5] Extracting Doxygen for sim
FAILED: doc/doxygen/sim/xml/index.xml /home/xstill/repo/rofi/build.Release/doc/doc/doxygen/sim/xml/index.xml 
cd /home/xstill/repo/rofi/build.Release/doc/doc && /home/xstill/repo/rofi/releng/doc/extractDoxygen.sh sim /home/xstill/repo/rofi/softwareComponents/rofiHalSim /home/xstill/repo/rofi/build.Release/doc/doc/doxygen/sim
/home/xstill/repo/rofi/releng/doc/extractDoxygen.sh: line 36: doxygen: command not found
/home/xstill/repo/rofi/releng/doc/extractDoxygen.sh: line 37: doxygen: command not found
[2/5] Extracting Doxygen for lib
FAILED: doc/doxygen/lib/xml/index.xml /home/xstill/repo/rofi/build.Release/doc/doc/doxygen/lib/xml/index.xml 
cd /home/xstill/repo/rofi/build.Release/doc/doc && /home/xstill/repo/rofi/releng/doc/extractDoxygen.sh lib /home/xstill/repo/rofi/softwareComponents /home/xstill/repo/rofi/build.Release/doc/doc/doxygen/lib
/home/xstill/repo/rofi/releng/doc/extractDoxygen.sh: line 36: doxygen: command not found
/home/xstill/repo/rofi/releng/doc/extractDoxygen.sh: line 37: doxygen: command not found
[3/5] Extracting Doxygen for driver
FAILED: doc/doxygen/driver/xml/index.xml /home/xstill/repo/rofi/build.Release/doc/doc/doxygen/driver/xml/index.xml 
cd /home/xstill/repo/rofi/build.Release/doc/doc && /home/xstill/repo/rofi/releng/doc/extractDoxygen.sh driver /home/xstill/repo/rofi/softwareComponents/rofiHalPhys /home/xstill/repo/rofi/build.Release/doc/doc/doxygen/driver
/home/xstill/repo/rofi/releng/doc/extractDoxygen.sh: line 36: doxygen: command not found
/home/xstill/repo/rofi/releng/doc/extractDoxygen.sh: line 37: doxygen: command not found
[4/5] Extracting Doxygen for roficom
FAILED: doc/doxygen/roficom/xml/index.xml /home/xstill/repo/rofi/build.Release/doc/doc/doxygen/roficom/xml/index.xml 
cd /home/xstill/repo/rofi/build.Release/doc/doc && /home/xstill/repo/rofi/releng/doc/extractDoxygen.sh roficom /home/xstill/repo/rofi/hardwareModules/RoFICoM/software/control_board /home/xstill/repo/rofi/build.Release/doc/doc/doxygen/roficom
/home/xstill/repo/rofi/releng/doc/extractDoxygen.sh: line 36: doxygen: command not found
/home/xstill/repo/rofi/releng/doc/extractDoxygen.sh: line 37: doxygen: command not found
ninja: build stopped: subcommand failed.
Build of suite doc failed with Command '['ninja']' returned non-zero exit status 1.. See output above

(the build also reports exitcode 0 as in the case reported in #132)

Hardware issues of RoFICoM Control Board v0.4

  • After changing voltage regulator (U4) to a different chip, VIN is connected to GND instead of VCC
  • The voltage regulator should be moved closer to the center of the board - currently it in the way of the shaft ring.
  • There should be no copper under the screw countersinks
  • Mark plus pole of the motor
  • The interface board creates a possible short-circuit with the skirt pads

configuration: Improve encapsulation

It shouldn't be possible to violate the invariants of the configuration from the user.
parent and type in Module are exposed and can be modified by the user.
Generally only thinks that don't have any constraints should be available as public attributes (also, clang-tidy will warn about public attributes except when all attributes are public).

Hardware issues of RoFICoM Debug Interface v0.1

  • The SWD connectors are mirrored (on the other side of the UART pin headers)

  • The SWD connectors are too close to each other

  • Consider a single large board with mounting holes and both, regular and debug, connectors

Configurable build system

I believe we need to add some configuration to the build system. So that user may set up installation dir, or enable/disable components to be built. I would appreciate a single directory with binaries so that I can add that path to my $PATH environment variable.

Github CI fails on download

Github CI sometimes fails on the setup phase of rofiFirmware (for me it happened twice on the Release compilation).

WARNING: Download failure HTTP Error 503: Backend unavailable, connection timeout
Extracting /work/build.deps/esp-tools/dist/xtensa-esp32-elf-gcc8_4_0-esp-2021r2-linux-amd64.tar.gz to /work/build.deps/esp-tools/tools/xtensa-esp32-elf/esp-2021r2-8.4.0
WARNING: Failed to download https://github.com/espressif/crosstool-NG/releases/download/esp-2021r2/xtensa-esp32s2-elf-gcc8_4_0-esp-2021r2-linux-amd64.tar.gz to /work/build.deps/esp-tools/dist/xtensa-esp32s2-elf-gcc8_4_0-esp-2021r2-linux-amd64.tar.gz.tmp
Installing [email protected]
Downloading xtensa-esp32s2-elf-gcc8_4_0-esp-2021r2-linux-amd64.tar.gz to /work/build.deps/esp-tools/dist/xtensa-esp32s2-elf-gcc8_4_0-esp-2021r2-linux-amd64.tar.gz.tmp
WARNING: Download failure HTTP Error 503: Backend unavailable, connection timeout
WARNING: Failed to download https://github.com/espressif/crosstool-NG/releases/download/esp-2021r2/xtensa-esp32s2-elf-gcc8_4_0-esp-2021r2-linux-amd64.tar.gz to /work/build.deps/esp-tools/dist/xtensa-esp32s2-elf-gcc8_4_0-esp-2021r2-linux-amd64.tar.gz.tmp
Downloading xtensa-esp32s2-elf-gcc8_4_0-esp-2021r2-linux-amd64.tar.gz to /work/build.deps/esp-tools/dist/xtensa-esp32s2-elf-gcc8_4_0-esp-2021r2-linux-amd64.tar.gz.tmp
WARNING: Download failure HTTP Error 503: Backend unavailable, connection timeout
Downloading xtensa-esp32s2-elf-gcc8_4_0-esp-2021r2-linux-amd64.tar.gz to /work/build.deps/esp-tools/dist/xtensa-esp32s2-elf-gcc8_4_0-esp-2021r2-linux-amd64.tar.gz.tmp
WARNING: Failed to download https://github.com/espressif/crosstool-NG/releases/download/esp-2021r2/xtensa-esp32s2-elf-gcc8_4_0-esp-2021r2-linux-amd64.tar.gz to /work/build.deps/esp-tools/dist/xtensa-esp32s2-elf-gcc8_4_0-esp-2021r2-linux-amd64.tar.gz.tmp
ERROR: Failed to download, and retry count has expired
Traceback (most recent call last):
  File "/work/build.deps/esp-idf/tools/idf_tools.py", line 1818, in <module>
    main(sys.argv[1:])
  File "/work/build.deps/esp-idf/tools/idf_tools.py", line 1814, in main
    action_func(args)
  File "/work/build.deps/esp-idf/tools/idf_tools.py", line 1461, in action_install
    tool_obj.download(tool_version)
  File "/work/build.deps/esp-idf/tools/idf_tools.py", line 714, in download
    raise DownloadError()

Checks in setup.sh

When calling source setup.sh, it doesn't check if the build configuration exists. Some check is already being made in configurationDesc, but only if the user uses the alter prompt version.

When calling source setup.sh, it doesn't check if you are in the right directory, but instead it says that some file is missing - and then appears as success. Either check if it was called in the right directory and fail - or allow the call to be made from any directory.

build: Config and build errors not properly propagated from rcfg/rmake

Neither rcfg nor rnake propagates error exitocode

$ export CMAKE_GENERATOR=Ninja  # might be irrelevant
$ . setup.sh -f Release
$ rcfg desktop
Configuring suite desktop
-- The C compiler identification is GNU 11.1.0
-- The CXX compiler identification is GNU 11.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Version: 6.1.2
-- Build type: Release
-- CXX_STANDARD: 20
-- Performing Test has_std_20_flag
-- Performing Test has_std_20_flag - Success
-- Performing Test has_std_2a_flag
-- Performing Test has_std_2a_flag - Success
-- Performing Test SUPPORTS_VARIADIC_TEMPLATES
-- Performing Test SUPPORTS_VARIADIC_TEMPLATES - Success
-- Performing Test SUPPORTS_USER_DEFINED_LITERALS
-- Performing Test SUPPORTS_USER_DEFINED_LITERALS - Success
-- Performing Test FMT_HAS_VARIANT
-- Performing Test FMT_HAS_VARIANT - Success
-- Looking for strtod_l
-- Looking for strtod_l - not found
-- pybind11 v2.6.2 
CMake Warning (dev) at /usr/share/cmake/Modules/CMakeDependentOption.cmake:84 (message):
  Policy CMP0127 is not set: cmake_dependent_option() supports full Condition
  Syntax.  Run "cmake --help-policy CMP0127" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.
Call Stack (most recent call first):
  /home/xstill/repo/rofi/build.Release/desktop/_deps/pybind11-src/CMakeLists.txt:98 (cmake_dependent_option)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found PythonInterp: /usr/bin/python3.10 (found version "3.10.2") 
-- Found PythonLibs: /usr/lib/libpython3.10.so
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
-- cxxopts version 2.2.0
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Armadillo (missing: ARMADILLO_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake/Modules/FindArmadillo.cmake:117 (find_package_handle_standard_args)
  CMakeLists.txt:107 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/xstill/repo/rofi/build.Release/desktop/CMakeFiles/CMakeOutput.log".
See also "/home/xstill/repo/rofi/build.Release/desktop/CMakeFiles/CMakeError.log".

CMake invocation for suite desktop failed. See output above

# → EXITCODE 0 !

$ rmake desktop 
Compiling suite desktop
ninja: error: loading 'build.ninja': No such file or directory
Build of suite desktop failed with Command '['ninja']' returned non-zero exit status 1.. See output above

# → EXITCODE 0 !

I would expect exitcode indicates if the command was actually successful.

configuration: `const`-correctness

From const objects from the configuration, the user shouldn't be able to modify the configuration in any way
Now, it's possible to do this:

Module & removeConst( const Module & mod ) {
    return *mod.parent->getModule( mod.getId() );
}

In general, pointers shouldn't be public - even for simple structure types. (except when you really think it through, never return it the wrong way etc.)

Update configuration

QoL improvements:

  • Move to a more precise namespace (rofi::configuration)
  • Make the header names more precise (e.g. use the configuration/rofibot.hpp pattern as in atoms)
  • Use ModuleHandle for internal representation (which is not just a typedef) and export ModuleId for external usage
  • Rename Orientation to be more specific, or move it to a nested namespace
  • Move angle manipulating functions to detail namespace
  • Rename makeJoint to be more precise (e.g. makeComponentJoint)
  • I'm not sure how std::vector< int > exactly match joints in Component. Maybe use a typedef JointId or something
  • bodies in Module can be written as components().subspan( _connectorCount ). (Similar for connectors.)
  • In component, body and connector, I would like to have an assert
  • I don't think that Module::clone should be there like this - at least make it return a unique_ptr
  • The Rofibot::getModule method makes no sense (dereferencing and then taking the address). With that said, I feel like returning a reference would be better.

Configuration — improve computeMatrices

Usually after executing action we don’t have to recompute all the matrices.

We should recompute positions of shoes of modules only if they have changed their position.

Consider building ESP32 images on the fly in `rflash`

There is often the use case to flash firmware into devices with variable flash size. The esptool.py can detect the flash size. We could use this inside rflash to build the correct-size image from the .elf file and flash it.

Hardware issues of RoFICoM v2.5

  • there is a wrong cutout on the floor for the voltage regulator

  • shaft should provide more clearance for the motor shaft & pinion

  • The hole for the connector in the motor clamp is small - there are some pin headers that do not fit.

  • Fix analog MCU pin mismatch

  • Change sense pull resistors on skirt to around 6k

  • There is a problem with the SPI & debug connectors. They seem unreliable:

    • Check the datasheet & verify footprint
    • Find suitable replacement
  • Add bigger input capacitors on the control board

  • Increase thickness of motor clip - there is enough space and it could improve overall stiffness of the mechanism

  • Make shaft taller. The reason is the same as in the previous point

  • Lidar enable resistor is reversed - it makes the chip sleep

stm32cxx: Use double buffered interupt handlers

Currently, the interrupt handlers are represented by std::function or funtion2. This, however, presents a problem when the interrupt handler should be changed inside the interrupt handler. It yields undefined behavior - an object is deleted from within its method.

The solution is to use double-buffered interrupt handlers. Basically introduce a an object that stores two instances and upon writing, it swaps them.

Compiling without Gazebo

  • Add switch to rcfg to allow compilation without the need to install gazebo libraries
  • Remove global linking of gazebo libraries and directories

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.