Skip to content

Commit

Permalink
Update notes
Browse files Browse the repository at this point in the history
  • Loading branch information
griswaldbrooks committed Sep 22, 2024
1 parent 28a8575 commit 19ce8a9
Show file tree
Hide file tree
Showing 5 changed files with 100 additions and 55 deletions.
58 changes: 3 additions & 55 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# spanny2
Robot arm project for CppCon 2024 presentation.

# Development Container
# development container
Build a new development image
```shell
mkdir -p ~/.spanny2/ccache
Expand All @@ -18,64 +18,12 @@ cmake -S src/spanny2/ -B build
cmake --build build
```

# Run
# run
```shell
username@spanny-dev:~/ws$ ./build/mappy
```

# Orphans
# remove orphaned containers
```shell
docker compose -f compose.dev.yml down --remove-orphans
```

# Title
spanny 2: rise of std::mdspan
# Abstract
C++23 introduced std::mdspan, a multi-dimensional view type that expanded on the capabilities of its predecessors, std::span and std::string_view, by eliminating the restriction to view into contiguous blocks of memory. Multidimensional array-type data structures are commonly used in robotics applications such as RGB and depth images, as well as occupancy grids for navigation. While these alone present a compelling alternative to hand-rolled data structures, this talk will illustrate the flexibility of the layout and accessor policy customization points included in std::mdspan, demonstrating its potential through various examples, including helping a robot arm inventory beer bottles.
This talk will review conventional use cases of std::mdspan in robotics, such as occupancy grids and submaps for determining obstacles and collision checking with polygonal footprints, as well as handling camera images retrieved after deep learning inference. Additionally, we will discuss commanding single and dual robot arms for inventory inspection using synchronous and asynchronous strategies via the std::mdspan accessor policy and std::future.

While these toy examples may have speculative applications, they highlight the flexibility and extensibility of this new data structure for novel use cases.

# Outline
## Introduction
- Brief overview of the presentation
- Introduction to std::mdspan in C++23

## Motivations for std::mdspan
- Historical background: limitations of previous non-owning types (std::span, std::string_view)
- The need for more flexible view types in C++

## Features of std::mdspan
- Multi-dimensional view type without memory layout restrictions
- Customization points: layout and accessor policies

## Conventional Use Cases in Robotics
- Occupancy grids and cost-maps
- Submaps for navigation and localization
- Polygonal views and arbitrary layouts for collision checking
- Accessor policies interfacing with GPUs (e.g., CUDA calls)

## Beer Inspection Use Cases
- Synchronous command of a single robot arm
- Synchronous command of dual robot arms
- Asynchronous command of dual robot arms for optimized path planning

## Conclusion
- Summary of mdspan features and benefits
- Discussion of use cases in fleet management and warehouse inventory control
- Using std::mdspan to access cloud resources asynchronously
- Potential impact on robotics and other fields
- Speculation on future applications and developments

## References
mdspan proposal
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p0009r18.html

Timur Doumler talk
https://youtu.be/eD-ceG-oByA?si=FYk_cG3dNPIHiF2h

Bryce Lelback talk
https://youtu.be/aFCLmQEkPUw?si=zWybvW7JAOO33yVV

Three skew rotation
https://youtu.be/1LCEiVDHJmc?si=kjbLFjp8XldHnzO1
51 changes: 51 additions & 0 deletions presentation/ABSTRACT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Title
spanny 2: rise of std::mdspan
# Abstract
C++23 introduced std::mdspan, a multi-dimensional view type that expanded on the capabilities of its predecessors, std::span and std::string_view, by eliminating the restriction to view into contiguous blocks of memory. Multidimensional array-type data structures are commonly used in robotics applications such as RGB and depth images, as well as occupancy grids for navigation. While these alone present a compelling alternative to hand-rolled data structures, this talk will illustrate the flexibility of the layout and accessor policy customization points included in std::mdspan, demonstrating its potential through various examples, including helping a robot arm inventory beer bottles.
This talk will review conventional use cases of std::mdspan in robotics, such as occupancy grids and submaps for determining obstacles and collision checking with polygonal footprints, as well as handling camera images retrieved after deep learning inference. Additionally, we will discuss commanding single and dual robot arms for inventory inspection using synchronous and asynchronous strategies via the std::mdspan accessor policy and std::future.

While these toy examples may have speculative applications, they highlight the flexibility and extensibility of this new data structure for novel use cases.

# Outline
## Introduction
- Brief overview of the presentation
- Introduction to std::mdspan in C++23

## Motivations for std::mdspan
- Historical background: limitations of previous non-owning types (std::span, std::string_view)
- The need for more flexible view types in C++

## Features of std::mdspan
- Multi-dimensional view type without memory layout restrictions
- Customization points: layout and accessor policies

## Conventional Use Cases in Robotics
- Occupancy grids and cost-maps
- Submaps for navigation and localization
- Polygonal views and arbitrary layouts for collision checking
- Accessor policies interfacing with GPUs (e.g., CUDA calls)

## Beer Inspection Use Cases
- Synchronous command of a single robot arm
- Synchronous command of dual robot arms
- Asynchronous command of dual robot arms for optimized path planning

## Conclusion
- Summary of mdspan features and benefits
- Discussion of use cases in fleet management and warehouse inventory control
- Using std::mdspan to access cloud resources asynchronously
- Potential impact on robotics and other fields
- Speculation on future applications and developments

## References
mdspan proposal
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p0009r18.html

Timur Doumler talk
https://youtu.be/eD-ceG-oByA?si=FYk_cG3dNPIHiF2h

Bryce Lelback talk
https://youtu.be/aFCLmQEkPUw?si=zWybvW7JAOO33yVV

Three skew rotation
https://youtu.be/1LCEiVDHJmc?si=kjbLFjp8XldHnzO1
File renamed without changes.
File renamed without changes.
46 changes: 46 additions & 0 deletions presentation/TODO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
## spanny2 improvements
- [ ] Upload cad files to printables
- [ ] Revise cad to be fully printable without supports
- [ ] Make easier to assembly
- [ ] Design and make boards
- [ ] Make BOM
- [ ] Make assembly instructions
- [ ] Add unit tests
- [ ] Make youtube videos
- [ ] ie, make 5 minute videos on each of the examples and pieces of the talk

## mdspan examples
- [ ] Molton/zed curve
- [ ] Fractal for Jason
- [ ] Zoom into area

## spanny3 ideas
Add unit tests
Benchmark
Add costmap layers where multi layer pixels are more local
Real path planner
Segment anything... plus voxels?
The laser scans and polygonal should be transformable after instantition...?
Try to write more constexpr and compile time code
Don't return an mdspan
frameless torque motors
simplefoc
index of mdspan representing a state, returning a set of next states
what would happen if you extended mdspan to accept an std::dextents<double, 3> (doesn't compile)

## general
ClangBuildAnalyzer
Perfetto
Lessons learned from the last decade of performance portability, Christian Trott
Try mp-units again
https://en.cppreference.com/w/cpp/memory/polymorphic_allocator
Deducing this
Crtp
Perfect forwarding
std forward_like
std println
https://github.com/getml/reflect-cpp
Email Fillipe and ask him if things are ok

## presentation
Context, motivation, light theory, example, more theory, more examples

0 comments on commit 19ce8a9

Please sign in to comment.