Skip to content

Commit

Permalink
Merge branch 'main' into test
Browse files Browse the repository at this point in the history
  • Loading branch information
haiwei-luo authored Jun 5, 2024
2 parents f627362 + 2d3cb76 commit 1318992
Show file tree
Hide file tree
Showing 116 changed files with 3,389 additions and 4,756 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "common/third_party/leg_tracker"]
path = common/third_party/leg_tracker
url = [email protected]:angusleigh/leg_tracker.git
11 changes: 11 additions & 0 deletions common/helpers/cv2_pcl/src/cv2_pcl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,23 @@
from sensor_msgs.msg import PointCloud2
import ros_numpy as rnp
import cv2
from cv2_img import cv2_img_to_msg

from typing import Tuple, Union

Mat = np.ndarray


def pcl_to_img_msg(pcl: PointCloud2) -> Mat:
"""
Convert a given PointCloud2 message to img_msg
"""
# keep the same timestamp
cv2 = pcl_to_cv2(pcl)

return cv2_img_to_msg(cv2, pcl.header.stamp)


def pcl_to_cv2(
pcl: PointCloud2, height: Union[int, None] = None, width: Union[int, None] = None
) -> Mat:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,20 @@ import { SetStateAction, useState } from "react";
type State = "edit" | "confirm";

type Item =
| "coffee"
| "biscuits"
| "sandwich"
| "orange_juice"
| "smoothie"
| "granola";
| "cup"
// | "banana"
| "bottle";

const items: Item[] = [
"coffee",
"biscuits",
"sandwich",
"orange_juice",
"smoothie",
"granola",
"cup",
// "banana",
"bottle",
];

const NAMES: { [key in Item]: string } = {
coffee: 'Coffee',
biscuits: 'Biscuits',
sandwich: 'Sandwich',
orange_juice: 'Juice',
smoothie: 'Smoothie',
granola: 'Granola'
cup: 'Coffee',
// banana: 'Banana',
bottle: 'Coca Cola'
}

export function CreateOrder({ finish }: { finish: (order: Item[]) => void }) {
Expand Down Expand Up @@ -118,14 +109,9 @@ function EditMode({
return (
<>
<div className="flex flex-row gap-4 flex-[2] min-h-0">
<Card item="coffee" order={order} setOrder={setOrder} />
<Card item="sandwich" order={order} setOrder={setOrder} />
<Card item="smoothie" order={order} setOrder={setOrder} />
</div>
<div className="flex flex-row gap-4 flex-[2] min-h-0">
<Card item="orange_juice" order={order} setOrder={setOrder} />
<Card item="granola" order={order} setOrder={setOrder} />
<Card item="biscuits" order={order} setOrder={setOrder} />
<Card item="cup" order={order} setOrder={setOrder} />
{/* <Card item="banana" order={order} setOrder={setOrder} /> */}
<Card item="bottle" order={order} setOrder={setOrder} />
</div>
<div className="flex flex-row gap-4 flex-1">
<div
Expand Down
Loading

0 comments on commit 1318992

Please sign in to comment.