Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
"**/ros_ws/install/**": true,
"**/ros_ws/log/**": true
},
"github.copilot.chat.codeGeneration.useInstructionFiles": true
"github.copilot.chat.codeGeneration.useInstructionFiles": true,
"ROS2.distro": "humble"
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,34 +23,28 @@ find_package(airstack_common REQUIRED)
find_package(airstack_msgs REQUIRED)
find_package(trajectory_library REQUIRED)

#add_executable(droan src/droan.cpp src/glad/src/glad.c)
#target_include_directories(droan PUBLIC
# $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
# $<INSTALL_INTERFACE:include>)
#target_compile_features(droan PUBLIC c_std_99 cxx_std_17) # Require C99 and C++17
#ament_target_dependencies(droan rclcpp sensor_msgs stereo_msgs nav_msgs visualization_msgs tf2 tf2_ros tf2_geometry_msgs cv_bridge ament_index_cpp pcl_conversions airstack_common airstack_msgs)
#target_link_libraries(droan glfw dl assimp EGL GL)


add_executable(expand src/expand.cpp src/gl_interface.cpp src/global_plan.cpp src/rewind_monitor.cpp src/glad/src/glad.c)
target_include_directories(expand PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)
target_compile_features(expand PUBLIC c_std_99 cxx_std_17) # Require C99 and C++17
target_compile_features(expand PUBLIC c_std_99 cxx_std_17) # Require C99 and C++17
ament_target_dependencies(expand rclcpp sensor_msgs stereo_msgs nav_msgs visualization_msgs tf2 tf2_ros tf2_geometry_msgs cv_bridge ament_index_cpp pcl_conversions airstack_common airstack_msgs trajectory_library)
target_link_libraries(expand glfw dl assimp EGL GL)

#install(TARGETS droan DESTINATION lib/${PROJECT_NAME})
# install(TARGETS droan DESTINATION lib/${PROJECT_NAME})
install(TARGETS expand DESTINATION lib/${PROJECT_NAME})
#install(DIRECTORY launch DESTINATION share/${PROJECT_NAME})

# install(DIRECTORY launch DESTINATION share/${PROJECT_NAME})
install(DIRECTORY config DESTINATION share/${PROJECT_NAME})
install(DIRECTORY shaders DESTINATION share/${PROJECT_NAME})

if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)

# the following line skips the linter which checks for copyrights
# comment the line when a copyright and license is added to all source files
set(ament_cmake_copyright_FOUND TRUE)

# the following line skips cpplint (only works in a git repo)
# comment the line when this package is in a git repo and when
# a copyright and license is added to all source files
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,13 @@ Trajectories are generated using snaps in different directions. Collision checki

`dt` - The increment in seconds for generating points along the trajectory.

`downsample_scale` - The factor by which the input disparity image will be downsampled.
`downsample_scale` - The factor by which the input disparity image will be downsampled.

`graph_nodes` - The number of expanded foreground and background disparity image pairs to do collision checking on.

`graph_distance_threshold` - The distance in meters after which a new node will be added to the list.
`graph_angle_threshold` - The angle in degrees that the drone has to yaw before a new node will be added to the list.


Rewinds are triggered by two events. When all trajectories are in collision from length of time the drone will rewind for a set duraiton. When the drone is considered to be staionary for too long, the drone will rewind for some distance or duration, whichever is satisfied first.

`all_in_collision_duration_threshold` - The amount of time in seconds all trajectories need to be in collision for a rewind to be triggered.
Expand Down
144 changes: 115 additions & 29 deletions robot/ros_ws/src/autonomy/3_local/b_planners/droan_gl/config/cone.dae

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
*/

#if defined(__SCITECH_SNAP__) && !defined(KHRONOS_STATIC)
# define KHRONOS_STATIC 1
#define KHRONOS_STATIC 1
#endif

/*-------------------------------------------------------------------------
Expand All @@ -100,17 +100,17 @@
* This precedes the return type of the function in the function prototype.
*/
#if defined(KHRONOS_STATIC)
/* If the preprocessor constant KHRONOS_STATIC is defined, make the
* header compatible with static linking. */
# define KHRONOS_APICALL
/* If the preprocessor constant KHRONOS_STATIC is defined, make the
* header compatible with static linking. */
#define KHRONOS_APICALL
#elif defined(_WIN32)
# define KHRONOS_APICALL __declspec(dllimport)
#elif defined (__SYMBIAN32__)
# define KHRONOS_APICALL IMPORT_C
#define KHRONOS_APICALL __declspec(dllimport)
#elif defined(__SYMBIAN32__)
#define KHRONOS_APICALL IMPORT_C
#elif defined(__ANDROID__)
# define KHRONOS_APICALL __attribute__((visibility("default")))
#define KHRONOS_APICALL __attribute__((visibility("default")))
#else
# define KHRONOS_APICALL
#define KHRONOS_APICALL
#endif

/*-------------------------------------------------------------------------
Expand All @@ -120,18 +120,18 @@
* name in the function prototype.
*/
#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__)
/* Win32 but not WinCE */
# define KHRONOS_APIENTRY __stdcall
/* Win32 but not WinCE */
#define KHRONOS_APIENTRY __stdcall
#else
# define KHRONOS_APIENTRY
#define KHRONOS_APIENTRY
#endif

/*-------------------------------------------------------------------------
* Definition of KHRONOS_APIATTRIBUTES
*-------------------------------------------------------------------------
* This follows the closing parenthesis of the function prototype arguments.
*/
#if defined (__ARMCC_2__)
#if defined(__ARMCC_2__)
#define KHRONOS_APIATTRIBUTES __softfp
#else
#define KHRONOS_APIATTRIBUTES
Expand All @@ -142,17 +142,16 @@
*-----------------------------------------------------------------------*/
#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__)


/*
* Using <stdint.h>
*/
#include <stdint.h>
typedef int32_t khronos_int32_t;
typedef uint32_t khronos_uint32_t;
typedef int64_t khronos_int64_t;
typedef uint64_t khronos_uint64_t;
#define KHRONOS_SUPPORT_INT64 1
#define KHRONOS_SUPPORT_FLOAT 1
typedef int32_t khronos_int32_t;
typedef uint32_t khronos_uint32_t;
typedef int64_t khronos_int64_t;
typedef uint64_t khronos_uint64_t;
#define KHRONOS_SUPPORT_INT64 1
#define KHRONOS_SUPPORT_FLOAT 1
/*
* To support platform where unsigned long cannot be used interchangeably with
* inptr_t (e.g. CHERI-extended ISAs), we can use the stdint.h intptr_t.
Expand All @@ -168,111 +167,110 @@ typedef uint64_t khronos_uint64_t;
#endif
#endif

#elif defined(__VMS ) || defined(__sgi)
#elif defined(__VMS) || defined(__sgi)

/*
* Using <inttypes.h>
*/
#include <inttypes.h>
typedef int32_t khronos_int32_t;
typedef uint32_t khronos_uint32_t;
typedef int64_t khronos_int64_t;
typedef uint64_t khronos_uint64_t;
#define KHRONOS_SUPPORT_INT64 1
#define KHRONOS_SUPPORT_FLOAT 1
typedef int32_t khronos_int32_t;
typedef uint32_t khronos_uint32_t;
typedef int64_t khronos_int64_t;
typedef uint64_t khronos_uint64_t;
#define KHRONOS_SUPPORT_INT64 1
#define KHRONOS_SUPPORT_FLOAT 1

#elif defined(_WIN32) && !defined(__SCITECH_SNAP__)

/*
* Win32
*/
typedef __int32 khronos_int32_t;
typedef unsigned __int32 khronos_uint32_t;
typedef __int64 khronos_int64_t;
typedef unsigned __int64 khronos_uint64_t;
#define KHRONOS_SUPPORT_INT64 1
#define KHRONOS_SUPPORT_FLOAT 1
typedef __int32 khronos_int32_t;
typedef unsigned __int32 khronos_uint32_t;
typedef __int64 khronos_int64_t;
typedef unsigned __int64 khronos_uint64_t;
#define KHRONOS_SUPPORT_INT64 1
#define KHRONOS_SUPPORT_FLOAT 1

#elif defined(__sun__) || defined(__digital__)

/*
* Sun or Digital
*/
typedef int khronos_int32_t;
typedef unsigned int khronos_uint32_t;
typedef int khronos_int32_t;
typedef unsigned int khronos_uint32_t;
#if defined(__arch64__) || defined(_LP64)
typedef long int khronos_int64_t;
typedef unsigned long int khronos_uint64_t;
typedef long int khronos_int64_t;
typedef unsigned long int khronos_uint64_t;
#else
typedef long long int khronos_int64_t;
typedef unsigned long long int khronos_uint64_t;
typedef long long int khronos_int64_t;
typedef unsigned long long int khronos_uint64_t;
#endif /* __arch64__ */
#define KHRONOS_SUPPORT_INT64 1
#define KHRONOS_SUPPORT_FLOAT 1
#define KHRONOS_SUPPORT_INT64 1
#define KHRONOS_SUPPORT_FLOAT 1

#elif 0

/*
* Hypothetical platform with no float or int64 support
*/
typedef int khronos_int32_t;
typedef unsigned int khronos_uint32_t;
#define KHRONOS_SUPPORT_INT64 0
#define KHRONOS_SUPPORT_FLOAT 0
typedef int khronos_int32_t;
typedef unsigned int khronos_uint32_t;
#define KHRONOS_SUPPORT_INT64 0
#define KHRONOS_SUPPORT_FLOAT 0

#else

/*
* Generic fallback
*/
#include <stdint.h>
typedef int32_t khronos_int32_t;
typedef uint32_t khronos_uint32_t;
typedef int64_t khronos_int64_t;
typedef uint64_t khronos_uint64_t;
#define KHRONOS_SUPPORT_INT64 1
#define KHRONOS_SUPPORT_FLOAT 1
typedef int32_t khronos_int32_t;
typedef uint32_t khronos_uint32_t;
typedef int64_t khronos_int64_t;
typedef uint64_t khronos_uint64_t;
#define KHRONOS_SUPPORT_INT64 1
#define KHRONOS_SUPPORT_FLOAT 1

#endif


/*
* Types that are (so far) the same on all platforms
*/
typedef signed char khronos_int8_t;
typedef unsigned char khronos_uint8_t;
typedef signed short int khronos_int16_t;
typedef unsigned short int khronos_uint16_t;
typedef signed char khronos_int8_t;
typedef unsigned char khronos_uint8_t;
typedef signed short int khronos_int16_t;
typedef unsigned short int khronos_uint16_t;

/*
* Types that differ between LLP64 and LP64 architectures - in LLP64,
* pointers are 64 bits, but 'long' is still 32 bits. Win64 appears
* to be the only LLP64 architecture in current use.
*/
#ifdef KHRONOS_USE_INTPTR_T
typedef intptr_t khronos_intptr_t;
typedef uintptr_t khronos_uintptr_t;
typedef intptr_t khronos_intptr_t;
typedef uintptr_t khronos_uintptr_t;
#elif defined(_WIN64)
typedef signed long long int khronos_intptr_t;
typedef signed long long int khronos_intptr_t;
typedef unsigned long long int khronos_uintptr_t;
#else
typedef signed long int khronos_intptr_t;
typedef unsigned long int khronos_uintptr_t;
typedef signed long int khronos_intptr_t;
typedef unsigned long int khronos_uintptr_t;
#endif

#if defined(_WIN64)
typedef signed long long int khronos_ssize_t;
typedef signed long long int khronos_ssize_t;
typedef unsigned long long int khronos_usize_t;
#else
typedef signed long int khronos_ssize_t;
typedef unsigned long int khronos_usize_t;
typedef signed long int khronos_ssize_t;
typedef unsigned long int khronos_usize_t;
#endif

#if KHRONOS_SUPPORT_FLOAT
/*
* Float type
*/
typedef float khronos_float_t;
typedef float khronos_float_t;
#endif

#if KHRONOS_SUPPORT_INT64
Expand All @@ -285,8 +283,8 @@ typedef float khronos_float_t;
* 64 bit value that wraps back to 0 every 584 years. Time intervals
* may be either signed or unsigned.
*/
typedef khronos_uint64_t khronos_utime_nanoseconds_t;
typedef khronos_int64_t khronos_stime_nanoseconds_t;
typedef khronos_uint64_t khronos_utime_nanoseconds_t;
typedef khronos_int64_t khronos_stime_nanoseconds_t;
#endif

/*
Expand All @@ -302,9 +300,10 @@ typedef khronos_int64_t khronos_stime_nanoseconds_t;
* Values other than zero should be considered to be true. Therefore
* comparisons should not be made against KHRONOS_TRUE.
*/
typedef enum {
typedef enum
{
KHRONOS_FALSE = 0,
KHRONOS_TRUE = 1,
KHRONOS_TRUE = 1,
KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM
} khronos_boolean_enum_t;

Expand Down
Loading