Blog

  • eMixedNiteMC-Language-Pack

    Note: eMixedNiteMC Language Pack is no longer needed after eMixedNiteMC v3.5!

    eMixedNiteMC Language Pack Release Download Crowdin

    Provide the functionality to localize eMixedNiteMC v2.75+ in any language Playnite support. This extension is Needed to run eMixedNiteMC properly!

    Latest Update

    Link: eMixedNiteMC Language Pack 1.7

    Alt Text

    Changelog

    • Version: 1.7

      • Updated localization
        • Change both french localization “fois” to “sessions” and “session”
        • Portuguese, Brazilian 20% (Done by Lucoshi)
    • Version: 1.6

      • Updated localization
        • Added “LOCGameViewLastPlayedNotPlayed”
        • Added “LOCGameViewPlayCountNotPlayed”
        • Added “LOCGameViewPlayCountTimes”
        • Added “LOCGameViewPlayCountTime”
        • Spanish Updated (Done by BanCrash)
    • Version: 1.5

      • Updated localization
        • Arabic Updated (Done by X4lo)
        • Spanish Updated (Done by BanCrash)
    • Version: 1.4

      • Updated localization
        • Added “LOCGameViewPlayCountVisibility”
    • Version: 1.3

      • Updated localization
        • Correction of 4 translations in Spanish (Done by BanCrash)
        • Norwegian 5% (Done by MeatBoy)
        • Arabic 100% (Done by X4Lo)
    • Version: 1.2

      • Updated localization
        • Arabic ~80% (Done by X4Lo)
        • Spanish 100% (Done by BanCrash)
    • Version: 1.1

      • Updated localization
        • Localization files cleanup
        • Spanish done at ~50% (done by BanCrash)
    • Version: 1.0

      • First Release
      • Needed for the theme eMixedNiteMC to work properly
      • Add Localization to eMixedNiteMC v2.75+
        • Localized with Crowdin
        • You can help translate here
        • Only 100% localized in these language at the moment
          • English US
          • French FR

    Link: Forum

    You can help translate this extension on Crowdin

    Visit original content creator repository https://github.com/MCC321-QC/eMixedNiteMC-Language-Pack
  • California-House-Model

    🏡 California House Price Prediction

    Build Status Python Version Contributors License

    📌 Overview

    The California House Price Prediction project leverages machine learning to forecast house prices based on various factors such as location, median income, and average rooms per household. By building a comprehensive data pipeline, we aim to predict house prices with high accuracy and provide actionable insights.


    ✨ Key Features

    • 🔍 Data Preprocessing & Cleaning: Handle missing values, detect outliers, and normalize data for optimal model performance.
    • 📊 Exploratory Data Analysis (EDA): Visualize correlations and trends to extract meaningful insights.
    • 🛠 Machine Learning Pipeline: Automated feature engineering, model selection, and hyperparameter tuning.
    • 📈 Support for Multiple Regression Models: Compare different models to achieve the best prediction accuracy.

    📂 Project Structure

    california-house-price-prediction/
    │
    ├── data/                                 # Dataset files (raw and processed)
    ├── Notebooks/                            # Jupyter notebooks for analysis and experiments
    │   ├──California_house_model (1).ipynb   # Jupyter Notebook Code      
    ├── src/                                  # Source code for data processing and model training
    │   ├──california_house_model.py          # Python Code
    ├── requirements.txt                      # Python dependencies
    ├── .gitignore                            # Ignored files and directories
    └── README.md                             # Project documentation

    🚀 Installation & Setup

    1. Clone the Repository:
      git clone https://github.com/Fujelhrx/California-House-Model.git
      cd california-house-price-prediction
    2. Install Dependencies:
      pip install -r requirements.txt
    3. Run the Jupyter Notebook:
      jupyter notebook

    🛠 Usage

    • Open California_house_model.ipynb and run all cells to preprocess the data, train the model, and evaluate predictions.
    • For command-line usage, execute the training script:
      python src/california_house_model.py

    Custom Transformers Example

    The script demonstrates how to build custom transformers using BaseEstimator and TransformerMixin, such as:

    • StandardScalerClone: A custom standard scaler.
    • ClusterSimilarity: Computes RBF kernel similarity to cluster centers.

    Future Improvements

    • Add machine learning model training and evaluation.
    • Optimize the feature engineering process.
    • Implement hyperparameter tuning for better prediction accuracy.

    🤝 Contributing

    We welcome contributions from the community! Here’s how you can help:

    1. Fork the repository.
    2. Create a new branch for your feature or bugfix.
    3. Submit a pull request with a detailed explanation.

    📜 License

    This project is licensed under the MIT License. See the LICENSE file for details.


    🌟 Acknowledgments

    • scikit-learn: For providing the essential machine learning tools.
    • California Housing Dataset: The backbone of our data.
    • Open-source Contributors: For their continuous support and contributions.

    📬 Contact Us

    We’d love to hear from you! If you have any questions, feedback or suggestions, feel free to reach out:


    💡 FAQ

    Q: What dataset is used?
    A: The dataset is a publicly available California housing dataset that includes features such as median income, location, and the number of rooms.

    Q: Can I adapt this project for another region?
    A: Absolutely! Modify the preprocessing and data handling steps to fit your custom dataset.


    Visit original content creator repository https://github.com/Fujelhrx/California-House-Model
  • SegmentedControl-Demo-Qt-Python

    SegmentedControl-Demo-Qt-Python

    PyQt hasn’t included a “stock” segmented control (set of mutually-exclusive, visually abbutting buttons), so I wrote one in Python.

    Usage:

    #Disabled, Two Buttons:
    sc0 = SegmentedControl()
    sc0.AppendSegmentButton("No")
    sc0.AppendSegmentButton("Yes")
    sc0.setEnabled(False)
    
    #Enabled, Three Buttons:
    sc1 = SegmentedControl()
    sc1.AppendSegmentButton("No")
    sc1.AppendSegmentButton("Maybe")
    sc1.AppendSegmentButton("Yes")
    
    #Enabled, NOT Mutually Exclusive:
    sc2 = SegmentedControl(False)
    sc2.AppendSegmentButton("No")
    sc2.AppendSegmentButton("Maybe")
    sc2.AppendSegmentButton("Yes")
    
    #Text with Icon:
    sc3 = SegmentedControl()
    sc3.AppendSegmentButton("No", "./../Images/img20x20.png", QtCore.QSize(12, 12))
    sc3.AppendSegmentButton("Maybe", "./../Images/img20x20.png", QtCore.QSize(12, 12))
    sc3.AppendSegmentButton("Yes", "./../Images/img20x20.png", QtCore.QSize(12, 12))
    
    #Icon Only:
    sc4 = SegmentedControl()
    sc4.AppendSegmentButton("", "./../Images/img20x20.png", QtCore.QSize(14, 14))
    sc4.AppendSegmentButton("", "./../Images/img20x20.png", QtCore.QSize(14, 14))
    sc4.AppendSegmentButton("", "./../Images/img20x20.png", QtCore.QSize(14, 14))
    
    #Larger Icon:
    sc5 = SegmentedControl()
    sc5.AppendSegmentButton("", "./../Images/img30x30.png", QtCore.QSize(30, 30))
    sc5.AppendSegmentButton("", "./../Images/img30x30.png", QtCore.QSize(30, 30))
    sc5.AppendSegmentButton("", "./../Images/img30x30.png", QtCore.QSize(30, 30))
    
    #Mixed; Four Buttons, with an Initial Selection:
    sc6 = SegmentedControl()
    sc6.AppendSegmentButton("No")
    sc6.AppendSegmentButton("Yes", "./../Images/img10x10.png", QtCore.QSize(10, 10))
    sc6.AppendSegmentButton("", "./../Images/img20x20.png", QtCore.QSize(20, 20))
    sc6.AppendSegmentButton("", "./../Images/img30x30.png", QtCore.QSize(30, 30))
    sc6.setButtonState(1, True)
    
    #Setting up Button Callbacks
    #Clicked:
    sc0.buttonIdClicked.connect(firstRowClickedButtonId)
    #Pressed:
    sc0.buttonIdPressed.connect(firstRowPressedButtonId)
    #Released:
    sc0.buttonIdReleased.connect(firstRowReleasedButtonId)
    

    Visit original content creator repository
    https://github.com/kleydon/SegmentedControl-Demo-Qt-Python

  • rails_admin_yamap_field

    Gem Version

    RailsAdminYamapField

    Simple implementation of Yandex maps in rails admin.

    Inspired by these projects:

    Installation

    Add this line to your application’s Gemfile:

    gem 'rails_admin_yamap_field'

    And then execute:

    $ bundle

    Usage

    Add attr_accessor ya_map to you model for which you need to show the map or define ya_map and ya_map= methods as you wish, for example:

    class Address < ApplicationRecord
      # others methods
      def ya_map=(lat_lon)
        self[:lat], self[:lon] = lat_lon.split(",")
      end
      def ya_map
        [lat, lon].join(",")
      end
      # others methods
    end

    Available options for configure in rails_admin:

    • center_lat – map center latitude
    • center_long – map center longitude
    • zoom_level – map zoom level
    • map_html_width – width div map container: default ‘100%’
    • map_html_height – height div map container: default ‘500px’
    • map_lang – language map: default ‘ru_RU’, for other values see this ref
    • api_key – api key for enterprise version: default ‘nil’
    • latitude_field – latitude attribute name in you model: default ‘latitude’
    • longitude_field – longitude attribute name in you model: default ‘longitude’

    Example:

    class Address < ApplicationRecord
      attr_accessor :ya_map
    
      rails_admin do
        field :lat, :hidden
        field :lon, :hidden
        field :ya_map, :yamap_field do
          map_html_width "600px"
          latitude_field :lat
          longitude_field :lon
         end
      end
    end

    Screenshot

    Sample screenshot

    References

    Contributing

    Feel free to send pull requests or write issue.

    License

    The gem is available as open source under the terms of the MIT License.

    Visit original content creator repository https://github.com/Yegorov/rails_admin_yamap_field
  • locate_pixelcolor_cythonmulti

    Detects colors in images 5-10 x faster than Numpy

    pip install locate-pixelcolor-cythonmulti

    Tested+compiled against Windows 10 / Python 3.10 / Anaconda

    If you can’t import it, compile it on your system (code at the end of this page)

    How to use it in Python

    import numpy as np
    import cv2
    from locate_pixelcolor_cythonmulti import search_colors
    # 4525 x 6623 x 3 picture https://www.pexels.com/pt-br/foto/foto-da-raposa-sentada-no-chao-2295744/
    picx = r"C:\Users\hansc\Downloads\pexels-alex-andrews-2295744.jpg"
    pic = cv2.imread(picx)
    colors0 = np.array([[255, 255, 255]],dtype=np.uint8)
    resus0 = search_colors(pic=pic, colors=colors0)
    colors1=np.array([(66,  71,  69),(62,  67,  65),(144, 155, 153),(52,  57,  55),(127, 138, 136),(53,  58,  56),(51,  56,  54),(32,  27,  18),(24,  17,   8),],dtype=np.uint8)
    resus1 =  search_colors(pic=pic, colors=colors1)
    ####################################################################
    %timeit resus0=search_colors(pic,colors0)
    32.3 ms ± 279 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)
    
    b,g,r = pic[...,0],pic[...,1],pic[...,2]
    %timeit np.where(((b==255)&(g==255)&(r==255)))
    150 ms ± 209 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)
    ####################################################################
    %timeit resus1=search_colors(pic, colors1)
    151 ms ± 3.21 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)
    
    %timeit np.where(((b==66)&(g==71)&(r==69))|((b==62)&(g==67)&(r==65))|((b==144)&(g==155)&(r==153))|((b==52)&(g==57)&(r==55))|((b==127)&(g==138)&(r==136))|((b==53)&(g==58)&(r==56))|((b==51)&(g==56)&(r==54))|((b==32)&(g==27)&(r==18))|((b==24)&(g==17)&(r==8)))
    1 s ± 16.1 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
    ####################################################################

    The Cython Code

    # distutils: language = c++
    # cython: language_level=3
    # distutils: extra_compile_args = /openmp
    # distutils: extra_link_args = /openmp
    
    
    from cython.parallel cimport prange
    cimport cython
    import numpy as np
    cimport numpy as np
    import cython
    from collections import defaultdict
    
    @cython.boundscheck(False)
    @cython.wraparound(False)
    @cython.cdivision(True)
    cpdef searchforcolor(unsigned char[:] pic, unsigned char[:] colors, int width, int totallengthpic, int totallengthcolor):
        cdef my_dict = defaultdict(list)
        cdef int i, j
        cdef unsigned char r,g,b
        for i in prange(0, totallengthcolor, 3,nogil=True):
            r = colors[i]
            g = colors[i + 1]
            b = colors[i + 2]
            for j in range(0, totallengthpic, 3):
                if (r == pic[j]) and (g == pic[j+1]) and (b == pic[j+2]):
                    with gil:
                        my_dict[(r,g,b)].append(j )
    
        for key in my_dict.keys():
            my_dict[key] = np.dstack(np.divmod(np.array(my_dict[key]) // 3, width))[0]
        return my_dict

    setup.py to compile the code

    # distutils: language = c++
    # cython: language_level=3
    
    from setuptools import Extension, setup
    from Cython.Build import cythonize
    import numpy as np
    ext_modules = [
        Extension("colorsearchcythonmulti", ["colorsearchcythonmulti.pyx"], include_dirs=[np.get_include()],define_macros=[("NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION")])
    ]
    
    setup(
        name='colorsearchcythonmulti',
        ext_modules=cythonize(ext_modules),
    )
    
    
    # .\python.exe .\colorsearchcythonmultisetup.py build_ext --inplace

    Visit original content creator repository
    https://github.com/hansalemaos/locate_pixelcolor_cythonmulti

  • experiment-dynamic-dom

    Dynamic DOM experiment

    Project Status: playground, STOPPED

    A playground repository to reproduce RxJS-like behaviour with as goal to create a fully dynamic dependencyless DOM framework in vanilla JS.

    Conclusion

    Reactivity

    Bad idea to reinvent the RxJS wheel. Working on this codebase was a good learning experience to understand their design choices.

    Upon stumbling on issues, the workarounds make you automatically lean towards RxJS paradigms. Reproducing reactive logic would serve as a great lesson for advanced JS students to recognize memory leaks and zombie logic.

    Dynamic DOM

    The dyn(obj) syntax is AWESOME. It is very intuitive, but the elephant in the room is that your teardown logic will be inaccessible when Proxying setters using the a = b syntax. If the object is destroyed, the hooks/mutators (== RxJS subscriptions/pipes) will keep triggering.

    Proposed solution

    Teardown logic can be gathered in the return value of dyn(). An alternative is to automatically run teardown logic by using either custom elements like <dyn-div> which have access to HTMLElement lifecycle events or using hacks like animationstart to derive it from native HTML elements.

    In this sandbox, even reactive arguments were supported. It felt like a breakthrough to use them until combining two reactive arguments felt off. If you want to inject two reactive parameters and need them settled, you’d need to merge them beforehand and pass them as fn(...arguments), which will require some

    HTML/JS support

    Plain HTML starts to feel outdated. Where are the reactive programming languages? (angular somewhat solved it)

    Future

    Might come back to this later, but limitations of HTML5 let me down a bit too much to be sure.

    Visit original content creator repository
    https://github.com/toonvanvr/experiment-dynamic-dom

  • wpa-cracking-project-with-pwnagotchi

    WPA Cracking Project with Pwnagotchi

    Description

    This project is developed as part of a university thesis, focusing on creating a Pwnagotchi plugin that uploads WPA handshake captures. Additionally, a web application is implemented to process these handshakes using Hashcat.

    Pwnagotchi Plugin Installation and Configuration

    Installation

    First, you need to install the Pwnagotchi plugin. Download or place the plugin into the Pwnagotchi system, then follow the plugin installation instructions provided in the Pwnagotchi documentation or use the following command (replace plugin-name with the actual name of the plugin):

    sudo pwnagotchi plugins install plugin-name

    Configuration

    After installing the plugin, add the following configuration to your config.toml:

    main.plugins.pwnagotchi-plugin.enabled = true
    main.plugins.pwnagotchi-plugin.api_key = ""
    main.plugins.pwnagotchi-plugin.api_url = ""
    main.plugins.pwnagotchi-plugin.download_results = false
    main.plugins.pwnagotchi-plugin.whitelist = []

    You will receive the api_key when you register on the web application. This key is necessary for the plugin to authenticate and communicate with the backend.

    pwny

    Backend

    The backend is built using Node.js.

    Tools needed

    • Hashcat

    • hcxpcapngtool

    Databases

    • MongoDB

    • Redis

    .env example

    Create a .env file with the following environment variables:

    PORT=3000
    WORDLIST_PATH='wordlist.txt'
    MONGO_URI='mongodb://yourmongohost:27017/yourdatabase'
    REDIS_HOST='yourredishost'
    REDIS_PORT=6379
    JWT_SECRET='yoursecret'
    

    Frontend

    The frontend is built using React.

    .env example

    Create a .env file with the following environment variables:

    PORT=4000
    REACT_APP_BACKEND_URL='yourbackendurl'
    

    front

    Visit original content creator repository https://github.com/energydrinksjunkie/wpa-cracking-project-with-pwnagotchi
  • rt_usb_9axisimu_driver

    日本語 | English

    rt_usb_9axisimu_driver

    industrial_ci

    株式会社アールティが販売しているUSB出力9軸IMUセンサモジュール用のROS 2パッケージです。

    usb-9axisimu

    現在、以下のROSのディストリビューションに対応しております。

    1. 概要

    rt_usb_9axisimu_driverは株式会社アールティが販売している USB出力9軸IMUセンサモジュール のROS 2パッケージです。

    株式会社アールティによって開発、メンテナンスがなされています。

    1.1 座標軸について

    USB出力9軸IMUセンサモジュールは、センサとしてInvenSense社のMPU9250を使用しております。 このセンサの磁気センサの座標系はNED座標系(x-north, y-east, z-down)ですが、 モジュール内のマイコン(LPC1343)においてENU座標系(x-east, y-north, z-up)に変換され、 ジャイロセンサおよび加速度センサの座標系と揃えられております。 これはROSで使われる座標系のルールにも適合しています。詳しくは、REP-0103をご覧ください。

    1.2 ファームウェア開発について

    USB出力9軸IMUセンサモジュールはオープンハード・オープンソースのため、モジュール内のマイコンのファームウェアの変更が可能です。 このROSパッケージはデフォルトのファームウェアにのみ対応しております。ファームウェアを変更された場合、正常な動作ができなくなる恐れがございますので、ご了承ください。

    1.3 ver2.0でのご利用について

    2020年8月現在、販売されているUSB出力9軸IMUセンサモジュールはver2.0となります。 このバージョンのデフォルトのファームウェアには、ASCII出力とBinary出力の2つのデータ出力形式があります。 センサ出荷時点ではASCII出力に設定されています。出力形式の切り替え方法は、以下のリポジトリにあるマニュアルをご参照ください。 https://github.com/rt-net/RT-USB-9AXIS-00

    [ERROR] Error opening sensor device, please re-check your devices. が発生する場合

    ポートの権限を変更してください。

    $ sudo chmod 666 /dev/ttyACM0

    2. インストール

    2.1 バイナリをインストールする場合

    # ROS 2 Humble
    $ sudo apt install ros-humble-rt-usb-9axisimu-driver
    # ROS 2 Jazzy (ToDo)
    $

    2.2 ソースからインストールする場合

    $ cd ~/ros2_ws/src
    # Clone package & checkout ROS 2 branch
    $ git clone -b $ROS_DISTRO https://github.com/rt-net/rt_usb_9axisimu_driver
    
    # Install dependencies
    $ rosdep install -r -y -i --from-paths .
    
    # Build & Install
    $ cd ~/ros2_ws
    $ colcon build --symlink-install
    $ source ~/ros2_ws/install/setup.bash

    2.3 クイックスタート

    # Terminal 1
    $ source ~/ros2_ws/install/setup.bash
    $ ros2 run rt_usb_9axisimu_driver rt_usb_9axisimu_driver
    # Terminal 2
    $ source ~/ros2_ws/install/setup.bash
    $ ros2 lifecycle set rt_usb_9axisimu_driver configure
    $ ros2 lifecycle set rt_usb_9axisimu_driver activate
    # Echo topics (Press Ctrl+C for exit)
    $ ros2 topic echo /imu/data_raw
    $ ros2 topic echo /imu/mag
    $ ros2 topic echo /imu/temperature

    3. ノード

    3.1 rt_usb_9axisimu_driver

    rt_usb_9axisimu_driverはUSB出力9軸IMUセンサモジュールの出力を受信し、角速度と並進加速度・磁束密度をパブリッシュします。

    3.1.1 パブリッシュされるトピック

    3.1.2 パラメータ

    • ~frame_id (string, default: imu_link)

      • IMUデータのヘッダーにセットされるフレーム名
    • ~port (string, default: /dev/ttyACM0)

      • モジュールが接続されているポート名
    • ~linear_acceleration_stddev (double, default: 0.023145)

      • 並進加速度の共分散行列の対角成分の平方根(m/s^2)
    • ~angular_velocity_stddev (double, default: 0.0010621)

      • 角速度の共分散行列の対角成分の平方根(rad/s)
    • ~magnetic_field_stddev (double, default: 0.00000080786)

      • 磁束密度の共分散行列の対角成分の平方根(T)

    4. ROS 2 特有の使い方

    4.1 Lifecycle

    Lifecycle 機能を使うことで、ノード実行中にUSBの抜き差しや、 トピックのパブリッシュを稼働/停止できます。

    各状態での動作内容は次のとおりです。

    4.1.1 Unconfigured state

    • USBポート(~port)にアクセスしません
    • トピックをパブリッシュしません

    4.1.2 Configuring transition

    • パラメータを反映します
    • USBポート(~port)をオープンし9軸IMUセンサと通信します
      • 9軸IMUセンサの認識に失敗したらUnconfigured stateに遷移します

    4.1.3 Inactive state

    • トピックをパブリッシュしません

    4.1.4 Activating transition

    • 9軸IMUセンサと定期通信を開始します
      • 9軸IMUセンサとの通信に失敗したらUnconfigured stateに遷移します
    • トピックのパブリッシュを開始します

    4.1.5 Active state

    • トピックをパブリッシュします
    • 9軸IMUセンサとの通信に失敗しても状態遷移しません

    4.1.6 Deactivating transition

    • 9軸IMUセンサとの定期通信を停止します
    • トピックのパブリッシュを停止します

    4.1.7 CleaningUp transition

    • USBポート(~port)をクローズし9軸IMUセンサと通信を終了します

    4.1.8 Example

    # Terminal 1
    $ source ~/ros2_ws/install/setup.bash
    $ ros2 run rt_usb_9axisimu_driver rt_usb_9axisimu_driver
    # Terminal 2
    $ source ~/ros2_ws/install/setup.bash
    
    # User can plug-in/out the IMU module at unconfigure state.
    
    $ ros2 lifecycle set rt_usb_9axisimu_driver configure
    $ ros2 lifecycle set rt_usb_9axisimu_driver activate
    # The node start publishing the topics.
    
    # Stop publishing
    $ ros2 lifecycle set rt_usb_9axisimu_driver deactivate
    $ ros2 lifecycle set rt_usb_9axisimu_driver cleanup
    
    # User can plug-in/out the IMU module at unconfigure state.
    # User can set parameters of the node.
    $ ros2 param set /rt_usb_9axisimu_driver frame_id "imu2-link"
    $ ros2 param set /rt_usb_9axisimu_driver port "/dev/ttyACM1"
    
    $ ros2 lifecycle set rt_usb_9axisimu_driver configure
    $ ros2 lifecycle set rt_usb_9axisimu_driver activate
    # The node start publishing the topics.

    4.2 Component

    rt_usb_9axisimu_driver::Driverは Component として実装されているため、共有ライブラリとして実行できます。

    4.2.1 Example

    # Terminal 1
    $ source ~/ros2_ws/install/setup.bash
    $ ros2 run rclcpp_components component_container
    # Terminal 2
    $ source ~/ros2_ws/install/setup.bash
    $ ros2 component load /ComponentManager rt_usb_9axisimu_driver rt_usb_9axisimu_driver::Driver
    
    $ ros2 lifecycle set rt_usb_9axisimu_driver configure
    $ ros2 lifecycle set rt_usb_9axisimu_driver activate
    # The node start publishing the topics.
    Visit original content creator repository https://github.com/rt-net/rt_usb_9axisimu_driver
  • rt_usb_9axisimu_driver

    日本語 | English

    rt_usb_9axisimu_driver

    industrial_ci

    株式会社アールティが販売しているUSB出力9軸IMUセンサモジュール用のROS 2パッケージです。

    usb-9axisimu

    現在、以下のROSのディストリビューションに対応しております。

    1. 概要

    rt_usb_9axisimu_driverは株式会社アールティが販売している
    USB出力9軸IMUセンサモジュール
    のROS 2パッケージです。

    株式会社アールティによって開発、メンテナンスがなされています。

    1.1 座標軸について

    USB出力9軸IMUセンサモジュールは、センサとしてInvenSense社のMPU9250を使用しております。
    このセンサの磁気センサの座標系はNED座標系(x-north, y-east, z-down)ですが、
    モジュール内のマイコン(LPC1343)においてENU座標系(x-east, y-north, z-up)に変換され、
    ジャイロセンサおよび加速度センサの座標系と揃えられております。
    これはROSで使われる座標系のルールにも適合しています。詳しくは、REP-0103をご覧ください。

    1.2 ファームウェア開発について

    USB出力9軸IMUセンサモジュールはオープンハード・オープンソースのため、モジュール内のマイコンのファームウェアの変更が可能です。
    このROSパッケージはデフォルトのファームウェアにのみ対応しております。ファームウェアを変更された場合、正常な動作ができなくなる恐れがございますので、ご了承ください。

    1.3 ver2.0でのご利用について

    2020年8月現在、販売されているUSB出力9軸IMUセンサモジュールはver2.0となります。
    このバージョンのデフォルトのファームウェアには、ASCII出力とBinary出力の2つのデータ出力形式があります。
    センサ出荷時点ではASCII出力に設定されています。出力形式の切り替え方法は、以下のリポジトリにあるマニュアルをご参照ください。
    https://github.com/rt-net/RT-USB-9AXIS-00

    [ERROR] Error opening sensor device, please re-check your devices. が発生する場合

    ポートの権限を変更してください。

    $ sudo chmod 666 /dev/ttyACM0

    2. インストール

    2.1 バイナリをインストールする場合

    # ROS 2 Humble
    $ sudo apt install ros-humble-rt-usb-9axisimu-driver
    # ROS 2 Jazzy (ToDo)
    $

    2.2 ソースからインストールする場合

    $ cd ~/ros2_ws/src
    # Clone package & checkout ROS 2 branch
    $ git clone -b $ROS_DISTRO https://github.com/rt-net/rt_usb_9axisimu_driver
    
    # Install dependencies
    $ rosdep install -r -y -i --from-paths .
    
    # Build & Install
    $ cd ~/ros2_ws
    $ colcon build --symlink-install
    $ source ~/ros2_ws/install/setup.bash

    2.3 クイックスタート

    # Terminal 1
    $ source ~/ros2_ws/install/setup.bash
    $ ros2 run rt_usb_9axisimu_driver rt_usb_9axisimu_driver

    # Terminal 2
    $ source ~/ros2_ws/install/setup.bash
    $ ros2 lifecycle set rt_usb_9axisimu_driver configure
    $ ros2 lifecycle set rt_usb_9axisimu_driver activate
    # Echo topics (Press Ctrl+C for exit)
    $ ros2 topic echo /imu/data_raw
    $ ros2 topic echo /imu/mag
    $ ros2 topic echo /imu/temperature

    3. ノード

    3.1 rt_usb_9axisimu_driver

    rt_usb_9axisimu_driverはUSB出力9軸IMUセンサモジュールの出力を受信し、角速度と並進加速度・磁束密度をパブリッシュします。

    3.1.1 パブリッシュされるトピック

    3.1.2 パラメータ

    • ~frame_id (string, default: imu_link)

      • IMUデータのヘッダーにセットされるフレーム名
    • ~port (string, default: /dev/ttyACM0)

      • モジュールが接続されているポート名
    • ~linear_acceleration_stddev (double, default: 0.023145)

      • 並進加速度の共分散行列の対角成分の平方根(m/s^2)
    • ~angular_velocity_stddev (double, default: 0.0010621)

      • 角速度の共分散行列の対角成分の平方根(rad/s)
    • ~magnetic_field_stddev (double, default: 0.00000080786)

      • 磁束密度の共分散行列の対角成分の平方根(T)

    4. ROS 2 特有の使い方

    4.1 Lifecycle

    Lifecycle
    機能を使うことで、ノード実行中にUSBの抜き差しや、
    トピックのパブリッシュを稼働/停止できます。

    各状態での動作内容は次のとおりです。

    4.1.1 Unconfigured state

    • USBポート(~port)にアクセスしません
    • トピックをパブリッシュしません

    4.1.2 Configuring transition

    • パラメータを反映します
    • USBポート(~port)をオープンし9軸IMUセンサと通信します
      • 9軸IMUセンサの認識に失敗したらUnconfigured stateに遷移します

    4.1.3 Inactive state

    • トピックをパブリッシュしません

    4.1.4 Activating transition

    • 9軸IMUセンサと定期通信を開始します
      • 9軸IMUセンサとの通信に失敗したらUnconfigured stateに遷移します
    • トピックのパブリッシュを開始します

    4.1.5 Active state

    • トピックをパブリッシュします
    • 9軸IMUセンサとの通信に失敗しても状態遷移しません

    4.1.6 Deactivating transition

    • 9軸IMUセンサとの定期通信を停止します
    • トピックのパブリッシュを停止します

    4.1.7 CleaningUp transition

    • USBポート(~port)をクローズし9軸IMUセンサと通信を終了します

    4.1.8 Example

    # Terminal 1
    $ source ~/ros2_ws/install/setup.bash
    $ ros2 run rt_usb_9axisimu_driver rt_usb_9axisimu_driver

    # Terminal 2
    $ source ~/ros2_ws/install/setup.bash
    
    # User can plug-in/out the IMU module at unconfigure state.
    
    $ ros2 lifecycle set rt_usb_9axisimu_driver configure
    $ ros2 lifecycle set rt_usb_9axisimu_driver activate
    # The node start publishing the topics.
    
    # Stop publishing
    $ ros2 lifecycle set rt_usb_9axisimu_driver deactivate
    $ ros2 lifecycle set rt_usb_9axisimu_driver cleanup
    
    # User can plug-in/out the IMU module at unconfigure state.
    # User can set parameters of the node.
    $ ros2 param set /rt_usb_9axisimu_driver frame_id "imu2-link"
    $ ros2 param set /rt_usb_9axisimu_driver port "/dev/ttyACM1"
    
    $ ros2 lifecycle set rt_usb_9axisimu_driver configure
    $ ros2 lifecycle set rt_usb_9axisimu_driver activate
    # The node start publishing the topics.

    4.2 Component

    rt_usb_9axisimu_driver::Driverは
    Component
    として実装されているため、共有ライブラリとして実行できます。

    4.2.1 Example

    # Terminal 1
    $ source ~/ros2_ws/install/setup.bash
    $ ros2 run rclcpp_components component_container

    # Terminal 2
    $ source ~/ros2_ws/install/setup.bash
    $ ros2 component load /ComponentManager rt_usb_9axisimu_driver rt_usb_9axisimu_driver::Driver
    
    $ ros2 lifecycle set rt_usb_9axisimu_driver configure
    $ ros2 lifecycle set rt_usb_9axisimu_driver activate
    # The node start publishing the topics.

    Visit original content creator repository
    https://github.com/rt-net/rt_usb_9axisimu_driver

  • CodeAlpha_simple_chatbot

    AI Chatbot with Flask

    A modern, responsive chatbot application built with Flask, featuring an iOS-style UI design and dynamic theme switching.

    Features

    • 🤖 Intelligent conversation handling with natural language processing
    • 🎨 Modern iOS-style user interface
    • 🌓 Dynamic dark/light theme switching
    • 🌈 Animated gradient backgrounds
    • 📱 Fully responsive design
    • ✨ Smooth animations and transitions
    • 💬 Real-time chat interactions

    Technical Stack

    • Backend: Python Flask
    • Frontend: HTML5, CSS3, JavaScript
    • Styling: Custom CSS with iOS-inspired design
    • Animations: CSS animations and transitions
    • Theme Management: JavaScript-based theme switching

    Areas of Expertise

    The chatbot is knowledgeable in various technical domains:

    • Data Science & Analytics
    • Machine Learning
    • Artificial Intelligence
    • Full Stack Development
    • Cybersecurity

    Installation

    1. Clone the repository:

    git clone https://github.com/Tony-Stone-Code/CodeAlpha_simple_chatbot.git
    cd simple-chatbot
    1. Install the required dependencies:
    pip install -r requirements.txt
    1. Run the application:
    python3 app.py
    1. Open your browser and navigate to:
    http://localhost:5001
    

    Features in Detail

    Intelligent Conversation

    • Natural language processing for understanding user queries
    • Context-aware responses
    • Expertise in multiple technical domains
    • Friendly and engaging conversation style

    Modern UI/UX

    • iOS-inspired design elements
    • Smooth message animations
    • Interactive button effects
    • Dynamic message bubbles
    • Responsive layout for all devices

    Theme System

    • Automatic system theme detection
    • Manual theme toggle
    • Smooth theme transitions
    • Animated gradient backgrounds
    • Backdrop blur effects

    Responsive Design

    • Mobile-first approach
    • Adapts to all screen sizes
    • Touch-friendly interface
    • Optimized for both desktop and mobile

    Project Structure

    Basic chatbot/
    ├── app.py              # Flask application and routing
    ├── static/
    │   ├── style.css      # CSS styles and animations
    │   └── script.js      # Frontend JavaScript
    ├── templates/
    │   └── index.html     # Main HTML template
    └── README.md          # Project documentation
    

    Contributing

    Contributions are welcome! Feel free to submit pull requests or open issues for any improvements or bug fixes.

    License

    This project is licensed under the MIT License – see the LICENSE file for details.

    Author

    Anthony Opoku-Achempong (Tony-Stone-Code) – Data Scientist & Full Stack Developer

    • Expertise in Data Science, ML, AI
    • Full Stack Development
    • Cybersecurity Focus

    Acknowledgments

    • Inspired by modern iOS design principles
    • Built with best practices in web development
    • Focused on user experience and accessibility

    Visit original content creator repository
    https://github.com/Tony-Stone-Code/CodeAlpha_simple_chatbot