Skip to content

Commit

Permalink
support fire and tablebot
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeferguson committed Apr 2, 2024
1 parent 02c2e97 commit 74761e6
Show file tree
Hide file tree
Showing 4 changed files with 981 additions and 182 deletions.
2 changes: 1 addition & 1 deletion projects/tablebot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ OD := arm-none-eabi-objdump
SIZE := arm-none-eabi-size

# Flags
INCLUDES := -I. -I$(LIB_PATH)/CMSIS/Include -I$(LIB_PATH)/ST/inc
INCLUDES := -I. -I$(LIB_PATH)/CMSIS/Include -I$(LIB_PATH)/ST/inc -I../etherbotix
CFLAGS := -c -D$(MCU) $(MCU_FLAGS) -fno-common -g3 -Os -ffunction-sections -fno-builtin
ifdef USE_BOOTLOADER
CFLAGS += -DUSE_BOOTLOADER
Expand Down
8 changes: 4 additions & 4 deletions projects/tablebot/behaviors.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ void run_behavior(uint16_t id, uint32_t stamp)
if (points_ct > 0)
{
// Send those points for debugging
udp_send_packet((unsigned char *) &line_points, points_ct * 12, return_port, PACKET_PROJECTED_POINTS);
udp_send_packet((unsigned char *) &line_points, points_ct * 12, return_port, TABLEBOT_PACKET_PROJECTED_POINTS);
}
else
{
Expand Down Expand Up @@ -525,7 +525,7 @@ void run_behavior(uint16_t id, uint32_t stamp)
int points_ct = project_points(line_points, MAX_POINTS, true, 0.0f, 3.0f, 0.5f, 0.0f, 0.2f);

// Send those points for debugging
udp_send_packet((unsigned char *) &line_points, points_ct * 12, return_port, PACKET_PROJECTED_POINTS);
udp_send_packet((unsigned char *) &line_points, points_ct * 12, return_port, TABLEBOT_PACKET_PROJECTED_POINTS);

// Now process segments
int segment_ct = extract_segments(line_points, points_ct,
Expand Down Expand Up @@ -713,7 +713,7 @@ void run_behavior(uint16_t id, uint32_t stamp)
int points_ct = project_points(line_points, MAX_POINTS, true, 0.15f, 3.0f, 0.5f, 0.0f, 0.2f);

// Send those points for debugging
udp_send_packet((unsigned char *) &line_points, points_ct * 12, return_port, PACKET_PROJECTED_POINTS);
udp_send_packet((unsigned char *) &line_points, points_ct * 12, return_port, TABLEBOT_PACKET_PROJECTED_POINTS);

// Now process segments
int segment_ct = extract_segments(line_points, points_ct,
Expand Down Expand Up @@ -744,7 +744,7 @@ void run_behavior(uint16_t id, uint32_t stamp)
{
// Send those points for debugging
line_segment_t & s = segments[selected_segment];
udp_send_packet((unsigned char *) &line_points[s.start_idx], s.points * 12, return_port, PACKET_SEGMENT_POINTS);
udp_send_packet((unsigned char *) &line_points[s.start_idx], s.points * 12, return_port, TABLEBOT_PACKET_SEGMENT_POINTS);

// Transform goal to global coordinates
transform_to_global(&goal_pose, &candidates[0]);
Expand Down
Loading

0 comments on commit 74761e6

Please sign in to comment.