Skip to content

Lidar hw merge #213

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 27 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
6720621
Update dockerfile, add livox node + initial fixes
AndBondStyle Nov 2, 2024
3a7fdc5
Update lidar config, add macvlan docker config
AndBondStyle Nov 2, 2024
bd1b96a
Update driver node
AndBondStyle Nov 24, 2024
3b55f3b
Remove PCL dependency
AndBondStyle Nov 24, 2024
c14524f
Fix launch + macvlan config
AndBondStyle Nov 24, 2024
ebe7a2d
Add rapidjson to dockerfile
AndBondStyle Nov 24, 2024
5f54923
Remove APR references
AndBondStyle Nov 24, 2024
c7eb7e0
Rename network
AndBondStyle Nov 24, 2024
75d18c0
Fix lidar rotation
AndBondStyle Feb 2, 2025
8dc22a7
Fix number format
AndBondStyle Feb 2, 2025
c951d08
Basic platformio configuration
AndBondStyle Nov 18, 2023
1e60018
feat: Initial commit for hardware v2
zhora15 Aug 18, 2024
71bef27
Refactor and fix hardware modules
zhora15 Dec 12, 2024
c9187d9
feat: first working version
zhora15 Jan 19, 2025
62c1d85
Servo test
AndBondStyle Jan 25, 2025
3f9f2d5
Add ADC to servo-test
zhora15 Jan 29, 2025
658e093
Remove SimpleFOC
zhora15 Feb 2, 2025
9d9ba47
feat: occupancy grid for 3d lidar
AndBondStyle Feb 2, 2025
4307f44
Fix toolchain version
AndBondStyle Feb 3, 2025
24f0b1a
Merge remote-tracking branch 'origin/livox-lidar-3d-occupancy-grid' i…
AndBondStyle Feb 3, 2025
51c145e
feat: Add ADS1115 support for servo feedback
zhora15 Feb 3, 2025
7d54e93
Container 1.1.0
AndBondStyle Feb 3, 2025
0d17f9b
force initialize servo
zhora15 Feb 4, 2025
1b86467
Merge commit '0d17f9b37cf16978f16b2fb9b0bf9d6db5719946' into lidar-hw…
AndBondStyle Feb 4, 2025
b244687
fix: i2c ads1115 init
zhora15 Feb 4, 2025
ff263e9
Merge remote-tracking branch 'origin/hardware-v2' into lidar-hw-merge
AndBondStyle Feb 9, 2025
4a0c577
upload latest ver from jetson-nx-3
AndBondStyle May 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
COMPOSE_PROJECT_NAME=truck-abs-new
CONTAINER_NAME=truck-abs-new
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ packages/navigation/test/data
packages/simulator_2d/test/data
packages/svg_debug_drawer/test/data/im*_out.svg
packages/lidar_map/data

# Platformio
.pio
7 changes: 7 additions & 0 deletions .tmux.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
set -g default-terminal "screen-256color" # Поддержка цветов
set -g base-index 1 # Нумерация окон с 1
set -g pane-base-index 1 # Нумерация панелей с 1
set -g renumber-windows on # Автоперенумерация окон
set -g history-limit 10000 # Увеличиваем историю прокрутки
set -g mouse on # Включаем мышь (переключение, ресайз)
set -g focus-events on # Для совместимости с vim/nvim
20 changes: 19 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,6 @@ ENV ROS_PYTHON_VERSION=3

RUN wget -q https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -O /usr/share/keyrings/ros-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/ros2.list \

ENV RMW_IMPLEMENTATION="rmw_cyclonedds_cpp"

RUN apt-get update -q \
Expand Down Expand Up @@ -528,6 +527,25 @@ RUN wget -qO - https://github.com/borglab/gtsam/archive/refs/tags/${GTSAM_VERSIO
&& make -j$(nproc) install \
&& rm -rf /tmp/*

### INSTALL LIVOX SDK2

ARG LIVOX_VERSION="1.2.5"

RUN wget -qO - https://github.com/Livox-SDK/Livox-SDK2/archive/refs/tags/v${LIVOX_VERSION}.tar.gz | tar -xz \
&& cd Livox-SDK2-${LIVOX_VERSION} && mkdir build && cd build \
&& cmake .. && make -j$(nproc) && make install \
&& rm -rf /tmp/*

### INSTALL RAPIDJSON

ARG RAPIDJSON_VERSION="1.1.0"

RUN wget -qO - https://github.com/Tencent/rapidjson/archive/refs/tags/v${RAPIDJSON_VERSION}.tar.gz | tar -xz \
&& cd rapidjson-${RAPIDJSON_VERSION} && mkdir build && cd build \
&& cmake .. -DRAPIDJSON_BUILD_DOC=OFF -DRAPIDJSON_BUILD_EXAMPLES=OFF -DRAPIDJSON_BUILD_TESTS=OFF \
&& make -j$(nproc) && make install \
&& rm -rf /tmp/*

### INSTALL DEV PKGS

COPY requirements.txt /tmp/requirements.txt
Expand Down
18 changes: 16 additions & 2 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
services:
truck:
container_name: "${CONTAINER_NAME:-truck-${USER}}"
image: "registry.robotics-lab.ru/truck:1.0.0"
image: "registry.robotics-lab.ru/truck:1.1.0"
privileged: true
runtime: "${DOCKER_RUNTIME:-runc}"
build:
Expand All @@ -19,11 +19,25 @@ services:
# - type=registry,ref=registry.robotics-lab.ru/truck:cache-amd64
ports:
- "${FOXGLOVE_PORT:-8765}:8765"
- "${VIDEO_STREAMING_PORT:-8889}:8889"
- "${MEDIAMTX_HTTP_PORT:-8889}:8889"
- "${MEDIAMTX_WEBRTC_PORT:-8189}:${MEDIAMTX_WEBRTC_PORT:-8189}/udp"
volumes:
- "${PWD}:/truck"
- "/dev:/dev"
# networks:
# default:
# z-lidar-net:

networks:
default:
name: "${CONTAINER_NAME:-truck-${USER}}"
# z-lidar-net:
# name: z-lidar-net
# driver: macvlan
# driver_opts:
# parent: eth0
# ipam:
# config:
# - subnet: 192.168.3.0/24
# gateway: 192.168.3.1
# ip_range: 192.168.3.2/32
189 changes: 189 additions & 0 deletions firmware/STM32G431CBUx_FLASH.ld
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
/*
******************************************************************************
**

** File : LinkerScript.ld
**
** Author : STM32CubeMX
**
** Abstract : Linker script for STM32G431CBUx series
** 128Kbytes FLASH and 32Kbytes RAM
**
** Set heap size, stack size and stack location according
** to application requirements.
**
** Set memory bank area and size if external memory is used.
**
** Target : STMicroelectronics STM32
**
** Distribution: The file is distributed “as is,” without any warranty
** of any kind.
**
*****************************************************************************
** @attention
**
** <h2><center>&copy; COPYRIGHT(c) 2019 STMicroelectronics</center></h2>
**
** Redistribution and use in source and binary forms, with or without modification,
** are permitted provided that the following conditions are met:
** 1. Redistributions of source code must retain the above copyright notice,
** this list of conditions and the following disclaimer.
** 2. Redistributions in binary form must reproduce the above copyright notice,
** this list of conditions and the following disclaimer in the documentation
** and/or other materials provided with the distribution.
** 3. Neither the name of STMicroelectronics nor the names of its contributors
** may be used to endorse or promote products derived from this software
** without specific prior written permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
** SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**
*****************************************************************************
*/

/* Entry Point */
ENTRY(Reset_Handler)

/* Highest address of the user mode stack */
_estack = ORIGIN(RAM) + LENGTH(RAM); /* end of RAM */
/* Generate a link error if heap and stack don't fit into RAM */
_Min_Heap_Size = 0x200; /* required amount of heap */
_Min_Stack_Size = 0x400; /* required amount of stack */

/* Specify the memory areas */
MEMORY
{
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 32K
FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 128K
}

/* Define output sections */
SECTIONS
{
/* The startup code goes first into FLASH */
.isr_vector :
{
. = ALIGN(4);
KEEP(*(.isr_vector)) /* Startup code */
. = ALIGN(4);
} >FLASH

/* The program code and other data goes into FLASH */
.text :
{
. = ALIGN(4);
*(.text) /* .text sections (code) */
*(.text*) /* .text* sections (code) */
*(.glue_7) /* glue arm to thumb code */
*(.glue_7t) /* glue thumb to arm code */
*(.eh_frame)

KEEP (*(.init))
KEEP (*(.fini))

. = ALIGN(4);
_etext = .; /* define a global symbols at end of code */
} >FLASH

/* Constant data goes into FLASH */
.rodata :
{
. = ALIGN(4);
*(.rodata) /* .rodata sections (constants, strings, etc.) */
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
. = ALIGN(4);
} >FLASH

.ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >FLASH
.ARM : {
__exidx_start = .;
*(.ARM.exidx*)
__exidx_end = .;
} >FLASH

.preinit_array :
{
PROVIDE_HIDDEN (__preinit_array_start = .);
KEEP (*(.preinit_array*))
PROVIDE_HIDDEN (__preinit_array_end = .);
} >FLASH
.init_array :
{
PROVIDE_HIDDEN (__init_array_start = .);
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array*))
PROVIDE_HIDDEN (__init_array_end = .);
} >FLASH
.fini_array :
{
PROVIDE_HIDDEN (__fini_array_start = .);
KEEP (*(SORT(.fini_array.*)))
KEEP (*(.fini_array*))
PROVIDE_HIDDEN (__fini_array_end = .);
} >FLASH

/* used by the startup to initialize data */
_sidata = LOADADDR(.data);

/* Initialized data sections goes into RAM, load LMA copy after code */
.data :
{
. = ALIGN(4);
_sdata = .; /* create a global symbol at data start */
*(.data) /* .data sections */
*(.data*) /* .data* sections */

. = ALIGN(4);
_edata = .; /* define a global symbol at data end */
} >RAM AT> FLASH


/* Uninitialized data section */
. = ALIGN(4);
.bss :
{
/* This is used by the startup in order to initialize the .bss secion */
_sbss = .; /* define a global symbol at bss start */
__bss_start__ = _sbss;
*(.bss)
*(.bss*)
*(COMMON)

. = ALIGN(4);
_ebss = .; /* define a global symbol at bss end */
__bss_end__ = _ebss;
} >RAM

/* User_heap_stack section, used to check that there is enough RAM left */
._user_heap_stack :
{
. = ALIGN(8);
PROVIDE ( end = . );
PROVIDE ( _end = . );
. = . + _Min_Heap_Size;
. = . + _Min_Stack_Size;
. = ALIGN(8);
} >RAM



/* Remove information from the standard libraries */
/DISCARD/ :
{
libc.a ( * )
libm.a ( * )
libgcc.a ( * )
}

.ARM.attributes 0 : { *(.ARM.attributes) }
}


Loading