mirror of
https://git.ti.com/git/mmwave_radar/mmwave_ti_ros.git
synced 2026-05-21 09:22:15 +00:00
complete merged source of turtlebot labs
This commit is contained in:
1
autonomous_robotics_ros/src/CMakeLists.txt
Symbolic link
1
autonomous_robotics_ros/src/CMakeLists.txt
Symbolic link
@@ -0,0 +1 @@
|
||||
/opt/ros/kinetic/share/catkin/cmake/toplevel.cmake
|
||||
0
autonomous_robotics_ros/navigation/move_base/CHANGELOG.rst → autonomous_robotics_ros/src/navigation/move_base/CHANGELOG.rst
Normal file → Executable file
0
autonomous_robotics_ros/navigation/move_base/CHANGELOG.rst → autonomous_robotics_ros/src/navigation/move_base/CHANGELOG.rst
Normal file → Executable file
0
autonomous_robotics_ros/navigation/move_base/CMakeLists.txt → autonomous_robotics_ros/src/navigation/move_base/CMakeLists.txt
Normal file → Executable file
0
autonomous_robotics_ros/navigation/move_base/CMakeLists.txt → autonomous_robotics_ros/src/navigation/move_base/CMakeLists.txt
Normal file → Executable file
0
autonomous_robotics_ros/navigation/move_base/package.xml → autonomous_robotics_ros/src/navigation/move_base/package.xml
Normal file → Executable file
0
autonomous_robotics_ros/navigation/move_base/package.xml → autonomous_robotics_ros/src/navigation/move_base/package.xml
Normal file → Executable file
1
autonomous_robotics_ros/src/serial
Submodule
1
autonomous_robotics_ros/src/serial
Submodule
Submodule autonomous_robotics_ros/src/serial added at cbcca7c837
462
autonomous_robotics_ros/ti_mmwave_rospkg/CMakeLists.txt → autonomous_robotics_ros/src/ti_mmwave_rospkg/CMakeLists.txt
Normal file → Executable file
462
autonomous_robotics_ros/ti_mmwave_rospkg/CMakeLists.txt → autonomous_robotics_ros/src/ti_mmwave_rospkg/CMakeLists.txt
Normal file → Executable file
@@ -1,230 +1,232 @@
|
||||
cmake_minimum_required(VERSION 2.8.3)
|
||||
project(ti_mmwave_rospkg)
|
||||
|
||||
## Add support for C++11, supported in ROS Kinetic and newer
|
||||
add_definitions(-std=c++11)
|
||||
|
||||
## Find catkin macros and libraries
|
||||
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
|
||||
## is used, also find other catkin packages
|
||||
find_package(catkin REQUIRED COMPONENTS
|
||||
nodelet
|
||||
roscpp
|
||||
serial
|
||||
std_msgs
|
||||
sensor_msgs
|
||||
message_generation
|
||||
pluginlib
|
||||
)
|
||||
|
||||
find_package(Boost REQUIRED )
|
||||
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
find_package(PCL 1.7.2 REQUIRED)
|
||||
|
||||
## System dependencies are found with CMake's conventions
|
||||
# find_package(Boost REQUIRED COMPONENTS system)
|
||||
|
||||
|
||||
## Uncomment this if the package has a setup.py. This macro ensures
|
||||
## modules and global scripts declared therein get installed
|
||||
## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html
|
||||
# catkin_python_setup()
|
||||
|
||||
################################################
|
||||
## Declare ROS messages, services and actions ##
|
||||
################################################
|
||||
|
||||
## To declare and build messages, services or actions from within this
|
||||
## package, follow these steps:
|
||||
## * Let MSG_DEP_SET be the set of packages whose message types you use in
|
||||
## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...).
|
||||
## * In the file package.xml:
|
||||
## * add a build_depend tag for "message_generation"
|
||||
## * add a build_depend and a run_depend tag for each package in MSG_DEP_SET
|
||||
## * If MSG_DEP_SET isn't empty the following dependency has been pulled in
|
||||
## but can be declared for certainty nonetheless:
|
||||
## * add a run_depend tag for "message_runtime"
|
||||
## * In this file (CMakeLists.txt):
|
||||
## * add "message_generation" and every package in MSG_DEP_SET to
|
||||
## find_package(catkin REQUIRED COMPONENTS ...)
|
||||
## * add "message_runtime" and every package in MSG_DEP_SET to
|
||||
## catkin_package(CATKIN_DEPENDS ...)
|
||||
## * uncomment the add_*_files sections below as needed
|
||||
## and list every .msg/.srv/.action file to be processed
|
||||
## * uncomment the generate_messages entry below
|
||||
## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...)
|
||||
|
||||
## Generate messages in the 'msg' folder
|
||||
# add_message_files(
|
||||
# FILES
|
||||
# RadarScan.msg
|
||||
#)
|
||||
|
||||
## Generate services in the 'srv' folder
|
||||
add_service_files(
|
||||
FILES
|
||||
mmWaveCLI.srv
|
||||
)
|
||||
|
||||
## Generate actions in the 'action' folder
|
||||
# add_action_files(
|
||||
# FILES
|
||||
# Action1.action
|
||||
# Action2.action
|
||||
# )
|
||||
|
||||
## Generate added messages and services with any dependencies listed here
|
||||
generate_messages(
|
||||
DEPENDENCIES
|
||||
std_msgs
|
||||
sensor_msgs
|
||||
)
|
||||
|
||||
################################################
|
||||
## Declare ROS dynamic reconfigure parameters ##
|
||||
################################################
|
||||
|
||||
## To declare and build dynamic reconfigure parameters within this
|
||||
## package, follow these steps:
|
||||
## * In the file package.xml:
|
||||
## * add a build_depend and a run_depend tag for "dynamic_reconfigure"
|
||||
## * In this file (CMakeLists.txt):
|
||||
## * add "dynamic_reconfigure" to
|
||||
## find_package(catkin REQUIRED COMPONENTS ...)
|
||||
## * uncomment the "generate_dynamic_reconfigure_options" section below
|
||||
## and list every .cfg file to be processed
|
||||
|
||||
## Generate dynamic reconfigure parameters in the 'cfg' folder
|
||||
# generate_dynamic_reconfigure_options(
|
||||
# cfg/DynReconf1.cfg
|
||||
# cfg/DynReconf2.cfg
|
||||
# )
|
||||
|
||||
###################################
|
||||
## catkin specific configuration ##
|
||||
###################################
|
||||
## The catkin_package macro generates cmake config files for your package
|
||||
## Declare things to be passed to dependent projects
|
||||
## INCLUDE_DIRS: uncomment this if you package contains header files
|
||||
## LIBRARIES: libraries you create in this project that dependent projects also need
|
||||
## CATKIN_DEPENDS: catkin_packages dependent projects also need
|
||||
## DEPENDS: system dependencies of this project that dependent projects also need
|
||||
catkin_package(
|
||||
INCLUDE_DIRS include
|
||||
LIBRARIES mmwave
|
||||
#CATKIN_DEPENDS nodelet roscpp serial std_msgs
|
||||
DEPENDS system_lib
|
||||
)
|
||||
|
||||
###########
|
||||
## Build ##
|
||||
###########
|
||||
|
||||
## Specify additional locations of header files
|
||||
## Your package locations should be listed before other locations
|
||||
# include_directories(include)
|
||||
include_directories( include
|
||||
${catkin_INCLUDE_DIRS}
|
||||
${ti_mmwave_rospkg_INCLUDE_DIRS}
|
||||
${PCL_INCLUDE_DIRS}
|
||||
${pthread_INCLUDE_DIRS}
|
||||
${rt_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
link_directories( ${Boost_LIBRARIES_DIRS} )
|
||||
|
||||
link_directories( ${PCL_LIBRARY_DIRS} )
|
||||
|
||||
add_definitions(${PCL_DEFINITIONS})
|
||||
|
||||
## Declare a C++ library
|
||||
add_library(mmwave
|
||||
src/mmWaveDataHdl.cpp
|
||||
src/mmWaveCommSrv.cpp
|
||||
src/DataHandlerClass.cpp
|
||||
)
|
||||
|
||||
## Add cmake target dependencies of the library
|
||||
## as an example, code may need to be generated before libraries
|
||||
## either from message generation or dynamic reconfigure
|
||||
add_dependencies(mmwave ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
|
||||
|
||||
## Declare a C++ executable
|
||||
## With catkin_make all packages are built within a single CMake context
|
||||
## The recommended prefix ensures that target names across packages don't collide
|
||||
# add_executable(${PROJECT_NAME}_node src/ti_mmwave_rospkg_node.cpp)
|
||||
|
||||
## Rename C++ executable without prefix
|
||||
## The above recommended prefix causes long target names, the following renames the
|
||||
## target back to the shorter version for ease of user use
|
||||
## e.g. "rosrun someones_pkg node" instead of "rosrun someones_pkg someones_pkg_node"
|
||||
# set_target_properties(${PROJECT_NAME}_node PROPERTIES OUTPUT_NAME node PREFIX "")
|
||||
|
||||
## Add cmake target dependencies of the executable
|
||||
## same as for the library above
|
||||
# add_dependencies(${PROJECT_NAME}_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
|
||||
|
||||
## Specify libraries to link a library or executable target against
|
||||
# target_link_libraries(${PROJECT_NAME}_node
|
||||
# ${catkin_LIBRARIES}
|
||||
# )
|
||||
|
||||
#############
|
||||
## Install ##
|
||||
#############
|
||||
|
||||
# all install targets should use catkin DESTINATION variables
|
||||
# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html
|
||||
|
||||
## Mark executable scripts (Python etc.) for installation
|
||||
## in contrast to setup.py, you can choose the destination
|
||||
# install(PROGRAMS
|
||||
# scripts/my_python_script
|
||||
# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
|
||||
# )
|
||||
|
||||
## Mark executables and/or libraries for installation
|
||||
# install(TARGETS ${PROJECT_NAME} ${PROJECT_NAME}_node
|
||||
# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
|
||||
# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
|
||||
# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
|
||||
# )
|
||||
|
||||
## Mark cpp header files for installation
|
||||
# install(DIRECTORY include/${PROJECT_NAME}/
|
||||
# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
|
||||
# FILES_MATCHING PATTERN "*.h"
|
||||
# PATTERN ".svn" EXCLUDE
|
||||
# )
|
||||
|
||||
## Mark other files for installation (e.g. launch and bag files, etc.)
|
||||
# install(FILES
|
||||
# # myfile1
|
||||
# # myfile2
|
||||
# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
|
||||
# )
|
||||
set (CMAKE_CXX_STANDARD 11)
|
||||
|
||||
add_executable(${PROJECT_NAME} src/mmWaveLoader.cpp)
|
||||
target_link_libraries(mmwave ${serial_LIBRARIES})
|
||||
target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES} mmwave ${serial_LIBRARIES})
|
||||
add_dependencies(${PROJECT_NAME} ${catkin_EXPORTED_TARGETS} mmwave ${serial_EXPORTED_TARGETS})
|
||||
|
||||
add_executable(mmWaveQuickConfig src/mmWaveQuickConfig.cpp)
|
||||
target_link_libraries(mmWaveQuickConfig ${catkin_LIBRARIES} mmwave)
|
||||
add_dependencies(mmWaveQuickConfig ${catkin_EXPORTED_TARGETS} mmwave)
|
||||
|
||||
#############
|
||||
## Testing ##
|
||||
#############
|
||||
|
||||
## Add gtest based cpp test target and link libraries
|
||||
# catkin_add_gtest(${PROJECT_NAME}-test test/test_ti_mmwave_rospkg.cpp)
|
||||
# if(TARGET ${PROJECT_NAME}-test)
|
||||
# target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME})
|
||||
# endif()
|
||||
|
||||
## Add folders to be run by python nosetests
|
||||
# catkin_add_nosetests(test)
|
||||
cmake_minimum_required(VERSION 2.8.3)
|
||||
project(ti_mmwave_rospkg)
|
||||
|
||||
## Add support for C++11, supported in ROS Kinetic and newer
|
||||
add_definitions(-std=c++11)
|
||||
|
||||
## Find catkin macros and libraries
|
||||
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
|
||||
## is used, also find other catkin packages
|
||||
find_package(catkin REQUIRED COMPONENTS
|
||||
nodelet
|
||||
roscpp
|
||||
serial
|
||||
std_msgs
|
||||
sensor_msgs
|
||||
message_generation
|
||||
pluginlib
|
||||
)
|
||||
|
||||
find_package(Boost REQUIRED)
|
||||
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
find_package(PCL 1.7.2 REQUIRED)
|
||||
|
||||
## System dependencies are found with CMake's conventions
|
||||
# find_package(Boost REQUIRED COMPONENTS system)
|
||||
|
||||
|
||||
## Uncomment this if the package has a setup.py. This macro ensures
|
||||
## modules and global scripts declared therein get installed
|
||||
## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html
|
||||
# catkin_python_setup()
|
||||
|
||||
################################################
|
||||
## Declare ROS messages, services and actions ##
|
||||
################################################
|
||||
|
||||
## To declare and build messages, services or actions from within this
|
||||
## package, follow these steps:
|
||||
## * Let MSG_DEP_SET be the set of packages whose message types you use in
|
||||
## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...).
|
||||
## * In the file package.xml:
|
||||
## * add a build_depend tag for "message_generation"
|
||||
## * add a build_depend and a run_depend tag for each package in MSG_DEP_SET
|
||||
## * If MSG_DEP_SET isn't empty the following dependency has been pulled in
|
||||
## but can be declared for certainty nonetheless:
|
||||
## * add a run_depend tag for "message_runtime"
|
||||
## * In this file (CMakeLists.txt):
|
||||
## * add "message_generation" and every package in MSG_DEP_SET to
|
||||
## find_package(catkin REQUIRED COMPONENTS ...)
|
||||
## * add "message_runtime" and every package in MSG_DEP_SET to
|
||||
## catkin_package(CATKIN_DEPENDS ...)
|
||||
## * uncomment the add_*_files sections below as needed
|
||||
## and list every .msg/.srv/.action file to be processed
|
||||
## * uncomment the generate_messages entry below
|
||||
## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...)
|
||||
|
||||
## Generate messages in the 'msg' folder
|
||||
add_message_files(
|
||||
FILES
|
||||
RadarScan.msg
|
||||
)
|
||||
|
||||
## Generate services in the 'srv' folder
|
||||
add_service_files(
|
||||
FILES
|
||||
mmWaveCLI.srv
|
||||
)
|
||||
|
||||
## Generate actions in the 'action' folder
|
||||
# add_action_files(
|
||||
# FILES
|
||||
# Action1.action
|
||||
# Action2.action
|
||||
# )
|
||||
|
||||
## Generate added messages and services with any dependencies listed here
|
||||
generate_messages(
|
||||
DEPENDENCIES
|
||||
std_msgs
|
||||
sensor_msgs
|
||||
)
|
||||
|
||||
################################################
|
||||
## Declare ROS dynamic reconfigure parameters ##
|
||||
################################################
|
||||
|
||||
## To declare and build dynamic reconfigure parameters within this
|
||||
## package, follow these steps:
|
||||
## * In the file package.xml:
|
||||
## * add a build_depend and a run_depend tag for "dynamic_reconfigure"
|
||||
## * In this file (CMakeLists.txt):
|
||||
## * add "dynamic_reconfigure" to
|
||||
## find_package(catkin REQUIRED COMPONENTS ...)
|
||||
## * uncomment the "generate_dynamic_reconfigure_options" section below
|
||||
## and list every .cfg file to be processed
|
||||
|
||||
## Generate dynamic reconfigure parameters in the 'cfg' folder
|
||||
# generate_dynamic_reconfigure_options(
|
||||
# cfg/DynReconf1.cfg
|
||||
# cfg/DynReconf2.cfg
|
||||
# )
|
||||
|
||||
###################################
|
||||
## catkin specific configuration ##
|
||||
###################################
|
||||
## The catkin_package macro generates cmake config files for your package
|
||||
## Declare things to be passed to dependent projects
|
||||
## INCLUDE_DIRS: uncomment this if you package contains header files
|
||||
## LIBRARIES: libraries you create in this project that dependent projects also need
|
||||
## CATKIN_DEPENDS: catkin_packages dependent projects also need
|
||||
## DEPENDS: system dependencies of this project that dependent projects also need
|
||||
catkin_package(
|
||||
INCLUDE_DIRS include
|
||||
LIBRARIES mmwave
|
||||
#CATKIN_DEPENDS nodelet roscpp serial std_msgs
|
||||
DEPENDS system_lib
|
||||
)
|
||||
|
||||
###########
|
||||
## Build ##
|
||||
###########
|
||||
|
||||
## Specify additional locations of header files
|
||||
## Your package locations should be listed before other locations
|
||||
# include_directories(include)
|
||||
include_directories( include
|
||||
${catkin_INCLUDE_DIRS}
|
||||
${ti_mmwave_rospkg_INCLUDE_DIRS}
|
||||
${PCL_INCLUDE_DIRS}
|
||||
${pthread_INCLUDE_DIRS}
|
||||
${rt_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
link_directories( ${Boost_LIBRARIES_DIRS} )
|
||||
|
||||
link_directories( ${PCL_LIBRARY_DIRS} )
|
||||
|
||||
add_definitions(${PCL_DEFINITIONS})
|
||||
|
||||
## Declare a C++ library
|
||||
add_library(mmwave
|
||||
src/mmWaveDataHdl.cpp
|
||||
src/mmWaveCommSrv.cpp
|
||||
src/DataHandlerClass.cpp
|
||||
src/mmWaveQuickConfig.cpp
|
||||
src/ParameterParser.cpp
|
||||
)
|
||||
|
||||
## Add cmake target dependencies of the library
|
||||
## as an example, code may need to be generated before libraries
|
||||
## either from message generation or dynamic reconfigure
|
||||
add_dependencies(mmwave ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
|
||||
|
||||
## Declare a C++ executable
|
||||
## With catkin_make all packages are built within a single CMake context
|
||||
## The recommended prefix ensures that target names across packages don't collide
|
||||
# add_executable(${PROJECT_NAME}_node src/ti_mmwave_rospkg_node.cpp)
|
||||
|
||||
## Rename C++ executable without prefix
|
||||
## The above recommended prefix causes long target names, the following renames the
|
||||
## target back to the shorter version for ease of user use
|
||||
## e.g. "rosrun someones_pkg node" instead of "rosrun someones_pkg someones_pkg_node"
|
||||
# set_target_properties(${PROJECT_NAME}_node PROPERTIES OUTPUT_NAME node PREFIX "")
|
||||
|
||||
## Add cmake target dependencies of the executable
|
||||
## same as for the library above
|
||||
# add_dependencies(${PROJECT_NAME}_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
|
||||
|
||||
## Specify libraries to link a library or executable target against
|
||||
# target_link_libraries(${PROJECT_NAME}_node
|
||||
# ${catkin_LIBRARIES}
|
||||
# )
|
||||
|
||||
#############
|
||||
## Install ##
|
||||
#############
|
||||
|
||||
# all install targets should use catkin DESTINATION variables
|
||||
# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html
|
||||
|
||||
## Mark executable scripts (Python etc.) for installation
|
||||
## in contrast to setup.py, you can choose the destination
|
||||
# install(PROGRAMS
|
||||
# scripts/my_python_script
|
||||
# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
|
||||
# )
|
||||
|
||||
## Mark executables and/or libraries for installation
|
||||
# install(TARGETS ${PROJECT_NAME} ${PROJECT_NAME}_node
|
||||
# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
|
||||
# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
|
||||
# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
|
||||
# )
|
||||
|
||||
## Mark cpp header files for installation
|
||||
# install(DIRECTORY include/${PROJECT_NAME}/
|
||||
# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
|
||||
# FILES_MATCHING PATTERN "*.h"
|
||||
# PATTERN ".svn" EXCLUDE
|
||||
# )
|
||||
|
||||
## Mark other files for installation (e.g. launch and bag files, etc.)
|
||||
# install(FILES
|
||||
# # myfile1
|
||||
# # myfile2
|
||||
# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
|
||||
# )
|
||||
set (CMAKE_CXX_STANDARD 11)
|
||||
|
||||
add_executable(${PROJECT_NAME} src/mmWaveLoader.cpp)
|
||||
target_link_libraries(mmwave ${serial_LIBRARIES})
|
||||
target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES} mmwave ${serial_LIBRARIES})
|
||||
add_dependencies(${PROJECT_NAME} ${catkin_EXPORTED_TARGETS} mmwave ${serial_EXPORTED_TARGETS})
|
||||
|
||||
add_executable(mmWaveQuickConfig src/mmWaveQuickConfig.cpp)
|
||||
target_link_libraries(mmWaveQuickConfig ${catkin_LIBRARIES} mmwave)
|
||||
add_dependencies(mmWaveQuickConfig ${catkin_EXPORTED_TARGETS} mmwave)
|
||||
|
||||
#############
|
||||
## Testing ##
|
||||
#############
|
||||
|
||||
## Add gtest based cpp test target and link libraries
|
||||
# catkin_add_gtest(${PROJECT_NAME}-test test/test_ti_mmwave_rospkg.cpp)
|
||||
# if(TARGET ${PROJECT_NAME}-test)
|
||||
# target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME})
|
||||
# endif()
|
||||
|
||||
## Add folders to be run by python nosetests
|
||||
# catkin_add_nosetests(test)
|
||||
183
autonomous_robotics_ros/src/ti_mmwave_rospkg/README.md
Executable file
183
autonomous_robotics_ros/src/ti_mmwave_rospkg/README.md
Executable file
@@ -0,0 +1,183 @@
|
||||
# TI mmWave ROS Package (Customized)
|
||||
|
||||
#### Auhor and Maintainer: Leo Zhang
|
||||
#### Organization: University of Arizona
|
||||
#### Email: dr.leo.zhang@outlook.com
|
||||
---
|
||||
### Most recent change:
|
||||
|
||||
Add support for XWR18XX devices. SDK version: 3.2.0.4.
|
||||
|
||||
---
|
||||
Initially derived from TI's origin ROS package in Industrial Toolbox 2.3.0 (new version available [Industrial Toolbox 2.5.2](http://dev.ti.com/tirex/#/?link=Software%2FmmWave%20Sensors%2FIndustrial%20Toolbox)).
|
||||
|
||||
### Differences from origin TI's version:
|
||||
1. Added all radar parameters from calculations and can be read from `rosparam get`.
|
||||
2. Added Doppler data from detecting targets and form a customized ROS message `/ti_mmwave/radar_scan`.
|
||||
3. Added support for multiple radars working together.
|
||||
4. Added support for camera overlay (for sensor fusion).
|
||||
5. Working with xWR1443 and xWR1642 ES1.0 and ES2.0 (ES1.0 is deprecated from TI)
|
||||
---
|
||||
### Available devices:
|
||||
```
|
||||
TI mmWave AWR1443BOOST
|
||||
TI mmWave AWR1642BOOST
|
||||
TI mmWave AWR1642BOOST ES2.0/3.0 EVM (not tested)
|
||||
TI mmWave AWR1642BOOST ES2.0 EVM
|
||||
TI mmWave AWR1843BOOST ES1.0 EVM
|
||||
```
|
||||
---
|
||||
### Quick start guide (AWR1642BOOST ES2.0 EVM):
|
||||
1. Mount AWR1642BOOST ES2.0 EVM (as below), connect 5V/2.5A power supply and connect a micro-USB cable to host Ubuntu 16.04 LTS with [ROS Kinetic](http://wiki.ros.org/kinetic).
|
||||
|
||||

|
||||
|
||||
Note: Tested with Ubuntu 16.04 LTS with ROS Kinectic and Ubuntu 18.04 LTS with [ROS Melodic](http://wiki.ros.org/melodic)
|
||||
|
||||
2. Download SDK 2.0 or above (suggested SDK 2.1) from [here](http://www.ti.com/tool/MMWAVE-SDK) and use [UNIFLASH](http://www.ti.com/tool/UNIFLASH) to flash xwr16xx_mmw_demo.bin to your device. **Do not forget SOP2 jumper when flashing.**
|
||||
|
||||
Note:
|
||||
AWR1642 ES1.0 (usually purchased before May 2018) uses SDK 1.2. AWR1642 ES2.0 (usually purchased after May 2018) uses SDK 2.0. Same applies to AWR1443. (You can refer to [this thread](https://e2e.ti.com/support/sensors/f/1023/t/692195?tisearch=e2e-sitesearch&keymatch=%20user:356347))
|
||||
|
||||
3. Clone this repo and ROS serial onto your `<workspace dir>/src`:
|
||||
|
||||
```
|
||||
git clone https://github.com/radar-lab/ti_mmwave_rospkg.git
|
||||
git clone https://github.com/wjwwood/serial.git
|
||||
```
|
||||
4. Go back to `<workspace dir>`:
|
||||
|
||||
```
|
||||
catkin_make && source devel/setup.bash
|
||||
echo "source <workspace_dir>/devel/setup.bash" >> ~/.bashrc
|
||||
```
|
||||
|
||||
5. Enable command and data ports on Linux:
|
||||
```
|
||||
sudo chmod 666 /dev/ttyACM0
|
||||
sudo chmod 666 /dev/ttyACM1
|
||||
```
|
||||
Note: If multiple sensors are used, enable additional ports `/dev/ttyACM2` and `/dev/ttyACM3`, etc. the same as this step.
|
||||
|
||||
6. Launch AWR1642 short range config:
|
||||
```
|
||||
roslaunch ti_mmwave_rospkg 1642es2_short_range.launch
|
||||
```
|
||||
|
||||
Note: If you want to build your own config, use [mmWave Demo Visualizer](https://dev.ti.com/mmwavedemovisualizer) and link the launch file to the config.
|
||||
|
||||
7. ROS topics can be accessed as follows:
|
||||
```
|
||||
rostopic list
|
||||
rostopic echo /ti_mmwave/radar_scan
|
||||
```
|
||||
8. ROS parameters can be accessed as follows:
|
||||
```
|
||||
rosparam list
|
||||
rosparam get /ti_mmwave/max_doppler_vel
|
||||
```
|
||||
|
||||
Note: AWR1843 requires SDK 3.2.0.4, which has different output format. The later release will improve this part.
|
||||
|
||||
---
|
||||
### Message format:
|
||||
```
|
||||
header:
|
||||
seq: 6264
|
||||
stamp:
|
||||
secs: 1538888235
|
||||
nsecs: 712113897
|
||||
frame_id: "ti_mmwave" # Frame ID used for multi-sensor scenarios
|
||||
point_id: 17 # Point ID of the detecting frame (Every frame starts with 0)
|
||||
x: 8.650390625 # Point x coordinates in m (front from antenna)
|
||||
y: 6.92578125 # Point y coordinates in m (left/right from antenna, right positive)
|
||||
z: 0.0 # Point z coordinates in m (up/down from antenna, up positive)
|
||||
range: 11.067276001 # Radar measured range in m
|
||||
velocity: 0.0 # Radar measured range rate in m/s
|
||||
doppler_bin: 8 # Doppler bin location of the point (total bins = num of chirps)
|
||||
bearing: 38.6818885803 # Radar measured angle in degrees (right positive)
|
||||
intensity: 13.6172780991 # Radar measured intensity in dB
|
||||
```
|
||||
---
|
||||
### Troubleshooting
|
||||
1.
|
||||
```
|
||||
mmWaveCommSrv: Failed to open User serial port with error: IO Exception (13): Permission denied
|
||||
mmWaveCommSrv: Waiting 20 seconds before trying again...
|
||||
```
|
||||
This happens when serial port is called without superuser permission, do the following steps:
|
||||
```
|
||||
sudo chmod 666 /dev/ttyACM0
|
||||
sudo chmod 666 /dev/ttyACM1
|
||||
```
|
||||
2.
|
||||
```
|
||||
mmWaveQuickConfig: Command failed (mmWave sensor did not respond with 'Done')
|
||||
mmWaveQuickConfig: Response: 'sensorStop
|
||||
'?`????`????`???~' is not recognized as a CLI command
|
||||
mmwDemo:/>'
|
||||
```
|
||||
When this happens, re-run the command you send to sensor. If it continues, shut down and restart the sensor.
|
||||
|
||||
---
|
||||
### Multiple devices support (dual AWR1642 ES2.0 EVM):
|
||||
1. Connect two devices and try `ll /dev/serial/by-id` or `ls /dev`. In this case, `/dev/ttyACM0` to `/dev/ttyACM3` should shown.
|
||||
2. To avoid serial port confliction, you need to launch devices separately. So for first device (it will open rviz):
|
||||
|
||||
```
|
||||
roslaunch ti_mmwave_rospkg multi_1642_0.launch
|
||||
```
|
||||
3. Change radars' location in first three arguments `<node pkg="tf" type="static_transform_publisher" name="radar_baselink_0" args="0 -1 0 0 0 0 ti_mmwave_pcl ti_mmwave_0 100"/>` (stands for x,y,z for positions) in launch file `multi_1642_1.launch`. And launch second device:
|
||||
|
||||
```
|
||||
roslaunch ti_mmwave_rospkg multi_1642_1.launch
|
||||
```
|
||||
|
||||
Note: As serial connection and the original code, you need to launch devices separately using different launch files.
|
||||
|
||||
---
|
||||
### Camera overlay support (working with USB camera or CV camera):
|
||||
1. Download and build USB camera repo [here](https://github.com/radar-lab/usb_webcam`). And set parameters of camera in `<usb_webcam dir>/launch/usb_webcam.launch`.
|
||||
2. To test the device image working, try:
|
||||
```
|
||||
roslaunch usb_webcam usb_webcam.launch
|
||||
rosrun rqt_image_view rqt_image_view
|
||||
```
|
||||
3. Make sure you have done [ROS camera calibration](http://wiki.ros.org/camera_calibration) and create a `*.yaml` configuration file accordingly.
|
||||
4. Launch radar-camera system using:
|
||||
```
|
||||
roslaunch ti_mmwave_rospkg camera_overlay.launch
|
||||
```
|
||||
|
||||
---
|
||||
### Changelog:
|
||||
|
||||
```
|
||||
v3.3.0
|
||||
|
||||
Add support for XWR18XX devices. SDK version: 3.2.0.4.
|
||||
|
||||
v3.2.2
|
||||
Fix bugs and update README.
|
||||
|
||||
v3.2.1
|
||||
Support camera overlay over 3D 1443s.
|
||||
|
||||
v3.2.0
|
||||
Added camera overlay support.
|
||||
|
||||
v3.1.0
|
||||
Strengthened code.
|
||||
|
||||
v3.0.0
|
||||
Added README.
|
||||
Improved rviz looking for point cloud data.
|
||||
Added support for multiple radars working together.
|
||||
Improved radar's all around working conditions.
|
||||
|
||||
v2.0.0
|
||||
Added support for ES2.0 EVM devices.
|
||||
|
||||
v1.0.0
|
||||
Added Doppler from TI's mmWave radars.
|
||||
```
|
||||
BIN
autonomous_robotics_ros/src/ti_mmwave_rospkg/auxiliary/mounting.jpg
Executable file
BIN
autonomous_robotics_ros/src/ti_mmwave_rospkg/auxiliary/mounting.jpg
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 32 KiB |
@@ -1,39 +1,40 @@
|
||||
% ***************************************************************
|
||||
% Created for SDK ver:01.02
|
||||
% Created using Visualizer ver:1.2.0.0
|
||||
% Frequency:77
|
||||
% Platform:xWR14xx
|
||||
% Scene Classifier:best_range_res
|
||||
% Azimuth Resolution(deg):15
|
||||
% Range Resolution(m):0.044
|
||||
% Maximum unambiguous Range(m):9.01
|
||||
% Maximum Radial Velocity(m/s):5.06
|
||||
% Radial velocity resolution(m/s):0.64
|
||||
% Frame Duration(msec):33.333
|
||||
% Range Detection Threshold (dB):9
|
||||
% Range Peak Grouping:disabled
|
||||
% Doppler Peak Grouping:enabled
|
||||
% Static clutter removal:disabled
|
||||
% ***************************************************************
|
||||
sensorStop
|
||||
flushCfg
|
||||
dfeDataOutputMode 1
|
||||
channelCfg 15 5 0
|
||||
adcCfg 2 1
|
||||
adcbufCfg 0 1 0 1
|
||||
profileCfg 0 77 39 7 57.14 0 0 70 1 240 4884 0 0 30
|
||||
chirpCfg 0 0 0 0 0 0 0 1
|
||||
chirpCfg 1 1 0 0 0 0 0 4
|
||||
frameCfg 0 1 16 0 33.333 1 0
|
||||
guiMonitor 1 0 0 0 0 0
|
||||
cfarCfg 0 2 8 4 3 0 768
|
||||
peakGrouping 1 0 1 1 229
|
||||
multiObjBeamForming 1 0.5
|
||||
clutterRemoval 0
|
||||
calibDcRangeSig 0 -5 8 256
|
||||
compRangeBiasAndRxChanPhase 0.0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
|
||||
measureRangeBiasAndRxChanPhase 0 1.5 0.2
|
||||
CQRxSatMonitor 0 3 5 123 0
|
||||
CQSigImgMonitor 0 119 4
|
||||
analogMonitor 1 1
|
||||
sensorStart
|
||||
% ***************************************************************
|
||||
% Created for SDK ver:01.02
|
||||
% Created using Visualizer ver:1.2.0.0
|
||||
% Frequency:77
|
||||
% Platform:xWR14xx
|
||||
% Scene Classifier:best_range_res
|
||||
% Azimuth Resolution(deg):15
|
||||
% Range Resolution(m):0.044
|
||||
% Maximum unambiguous Range(m):9.01
|
||||
% Maximum Radial Velocity(m/s):5.06
|
||||
% Radial velocity resolution(m/s):0.64
|
||||
% Frame Duration(msec):33.333
|
||||
% Range Detection Threshold (dB):9
|
||||
% Range Peak Grouping:disabled
|
||||
% Doppler Peak Grouping:enabled
|
||||
% Static clutter removal:disabled
|
||||
% ***************************************************************
|
||||
sensorStop
|
||||
flushCfg
|
||||
dfeDataOutputMode 1
|
||||
channelCfg 15 5 0
|
||||
adcCfg 2 1
|
||||
adcbufCfg 0 1 0 1
|
||||
profileCfg 0 77 39 7 57.14 0 0 70 1 240 4884 0 0 30
|
||||
chirpCfg 0 0 0 0 0 0 0 1
|
||||
chirpCfg 1 1 0 0 0 0 0 4
|
||||
frameCfg 0 1 16 0 33.333 1 0
|
||||
guiMonitor 1 0 0 0 0 0
|
||||
cfarCfg 0 2 8 4 3 0 768
|
||||
peakGrouping 1 0 1 1 229
|
||||
multiObjBeamForming 1 0.5
|
||||
clutterRemoval 0
|
||||
calibDcRangeSig 0 -5 8 256
|
||||
compRangeBiasAndRxChanPhase 0.0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
|
||||
measureRangeBiasAndRxChanPhase 0 1.5 0.2
|
||||
CQRxSatMonitor 0 3 5 123 0
|
||||
CQSigImgMonitor 0 119 4
|
||||
analogMonitor 1 1
|
||||
calibData 0 0 0
|
||||
sensorStart
|
||||
@@ -1,40 +1,41 @@
|
||||
% ***************************************************************
|
||||
% Created for SDK ver:01.02
|
||||
% Created using Visualizer ver:1.2.0.0
|
||||
% Frequency:77
|
||||
% Platform:xWR14xx
|
||||
% Scene Classifier:best_range_res
|
||||
% Azimuth Resolution(deg):15 + Elevation
|
||||
% Range Resolution(m):0.044
|
||||
% Maximum unambiguous Range(m):9.01
|
||||
% Maximum Radial Velocity(m/s):5.06
|
||||
% Radial velocity resolution(m/s):0.64
|
||||
% Frame Duration(msec):33.333
|
||||
% Range Detection Threshold (dB):9
|
||||
% Range Peak Grouping:disabled
|
||||
% Doppler Peak Grouping:enabled
|
||||
% Static clutter removal:disabled
|
||||
% ***************************************************************
|
||||
sensorStop
|
||||
flushCfg
|
||||
dfeDataOutputMode 1
|
||||
channelCfg 15 7 0
|
||||
adcCfg 2 1
|
||||
adcbufCfg 0 1 0 1
|
||||
profileCfg 0 77 7 7 57.14 0 0 70 1 240 4884 0 0 30
|
||||
chirpCfg 0 0 0 0 0 0 0 1
|
||||
chirpCfg 1 1 0 0 0 0 0 4
|
||||
chirpCfg 2 2 0 0 0 0 0 2
|
||||
frameCfg 0 2 16 0 33.333 1 0
|
||||
guiMonitor 1 0 0 0 0 0
|
||||
cfarCfg 0 2 8 4 3 0 768
|
||||
peakGrouping 1 0 1 1 229
|
||||
multiObjBeamForming 1 0.5
|
||||
clutterRemoval 0
|
||||
calibDcRangeSig 0 -5 8 256
|
||||
compRangeBiasAndRxChanPhase 0.0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
|
||||
measureRangeBiasAndRxChanPhase 0 1.5 0.2
|
||||
CQRxSatMonitor 0 3 5 123 0
|
||||
CQSigImgMonitor 0 119 4
|
||||
analogMonitor 1 1
|
||||
sensorStart
|
||||
% ***************************************************************
|
||||
% Created for SDK ver:01.02
|
||||
% Created using Visualizer ver:1.2.0.0
|
||||
% Frequency:77
|
||||
% Platform:xWR14xx
|
||||
% Scene Classifier:best_range_res
|
||||
% Azimuth Resolution(deg):15 + Elevation
|
||||
% Range Resolution(m):0.044
|
||||
% Maximum unambiguous Range(m):9.01
|
||||
% Maximum Radial Velocity(m/s):5.06
|
||||
% Radial velocity resolution(m/s):0.64
|
||||
% Frame Duration(msec):33.333
|
||||
% Range Detection Threshold (dB):9
|
||||
% Range Peak Grouping:disabled
|
||||
% Doppler Peak Grouping:enabled
|
||||
% Static clutter removal:disabled
|
||||
% ***************************************************************
|
||||
sensorStop
|
||||
flushCfg
|
||||
dfeDataOutputMode 1
|
||||
channelCfg 15 7 0
|
||||
adcCfg 2 1
|
||||
adcbufCfg 0 1 0 1
|
||||
profileCfg 0 77 7 7 57.14 0 0 70 1 240 4884 0 0 30
|
||||
chirpCfg 0 0 0 0 0 0 0 1
|
||||
chirpCfg 1 1 0 0 0 0 0 4
|
||||
chirpCfg 2 2 0 0 0 0 0 2
|
||||
frameCfg 0 2 16 0 33.333 1 0
|
||||
guiMonitor 1 0 0 0 0 0
|
||||
cfarCfg 0 2 8 4 3 0 768
|
||||
peakGrouping 1 0 1 1 229
|
||||
multiObjBeamForming 1 0.5
|
||||
clutterRemoval 0
|
||||
calibDcRangeSig 0 -5 8 256
|
||||
compRangeBiasAndRxChanPhase 0.0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
|
||||
measureRangeBiasAndRxChanPhase 0 1.5 0.2
|
||||
CQRxSatMonitor 0 3 5 123 0
|
||||
CQSigImgMonitor 0 119 4
|
||||
analogMonitor 1 1
|
||||
calibData 0 0 0
|
||||
sensorStart
|
||||
51
autonomous_robotics_ros/src/ti_mmwave_rospkg/cfg/1642_2d.cfg
Normal file
51
autonomous_robotics_ros/src/ti_mmwave_rospkg/cfg/1642_2d.cfg
Normal file
@@ -0,0 +1,51 @@
|
||||
% ***************************************************************
|
||||
% Created for SDK ver:03.03
|
||||
% Created using Visualizer ver:3.3.0.0
|
||||
% Frequency:77
|
||||
% Platform:xWR16xx
|
||||
% Scene Classifier:best_range_res
|
||||
% Azimuth Resolution(deg):15
|
||||
% Range Resolution(m):0.044
|
||||
% Maximum unambiguous Range(m):9.02
|
||||
% Maximum Radial Velocity(m/s):1
|
||||
% Radial velocity resolution(m/s):0.13
|
||||
% Frame Duration(msec):100
|
||||
% Range Detection Threshold (dB):15
|
||||
% Doppler Detection Threshold (dB):15
|
||||
% Range Peak Grouping:enabled
|
||||
% Doppler Peak Grouping:enabled
|
||||
% Static clutter removal:disabled
|
||||
% Angle of Arrival FoV: Full FoV
|
||||
% Range FoV: Full FoV
|
||||
% Doppler FoV: Full FoV
|
||||
% ***************************************************************
|
||||
sensorStop
|
||||
flushCfg
|
||||
dfeDataOutputMode 1
|
||||
channelCfg 15 3 0
|
||||
adcCfg 2 1
|
||||
adcbufCfg -1 0 1 1 0
|
||||
profileCfg 0 77 429 7 57.14 0 0 70 1 256 5209 0 0 30
|
||||
chirpCfg 0 0 0 0 0 0 0 1
|
||||
chirpCfg 1 1 0 0 0 0 0 2
|
||||
frameCfg 0 1 16 0 100 1 0
|
||||
lowPower 0 1
|
||||
guiMonitor -1 1 1 0 0 0 1
|
||||
cfarCfg -1 0 2 8 4 3 0 15 1
|
||||
cfarCfg -1 1 0 4 2 3 1 15 1
|
||||
multiObjBeamForming -1 1 0.5
|
||||
clutterRemoval -1 0
|
||||
calibDcRangeSig -1 0 -5 8 256
|
||||
extendedMaxVelocity -1 0
|
||||
bpmCfg -1 0 0 1
|
||||
lvdsStreamCfg -1 0 0 0
|
||||
compRangeBiasAndRxChanPhase 0.0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
|
||||
measureRangeBiasAndRxChanPhase 0 1.5 0.2
|
||||
CQRxSatMonitor 0 3 5 121 0
|
||||
CQSigImgMonitor 0 127 4
|
||||
analogMonitor 0 0
|
||||
aoaFovCfg -1 -90 90 -90 90
|
||||
cfarFovCfg -1 0 0 8.92
|
||||
cfarFovCfg -1 1 -1 1.00
|
||||
calibData 0 0 0
|
||||
sensorStart
|
||||
50
autonomous_robotics_ros/src/ti_mmwave_rospkg/cfg/1843_2d.cfg
Normal file
50
autonomous_robotics_ros/src/ti_mmwave_rospkg/cfg/1843_2d.cfg
Normal file
@@ -0,0 +1,50 @@
|
||||
% ***************************************************************
|
||||
% Created for SDK ver:03.03
|
||||
% Created using Visualizer ver:3.3.0.0
|
||||
% Frequency:77
|
||||
% Platform:xWR18xx
|
||||
% Scene Classifier:best_range_res
|
||||
% Azimuth Resolution(deg):15
|
||||
% Range Resolution(m):0.044
|
||||
% Maximum unambiguous Range(m):9.02
|
||||
% Maximum Radial Velocity(m/s):6.45
|
||||
% Radial velocity resolution(m/s):0.81
|
||||
% Frame Duration(msec):100
|
||||
% Range Detection Threshold (dB):15
|
||||
% Doppler Detection Threshold (dB):15
|
||||
% Range Peak Grouping:enabled
|
||||
% Doppler Peak Grouping:enabled
|
||||
% Static clutter removal:disabled
|
||||
% Angle of Arrival FoV: Full FoV
|
||||
% Range FoV: Full FoV
|
||||
% Doppler FoV: Full FoV
|
||||
% ***************************************************************
|
||||
sensorStop
|
||||
flushCfg
|
||||
dfeDataOutputMode 1
|
||||
channelCfg 15 5 0
|
||||
adcCfg 2 1
|
||||
adcbufCfg -1 0 1 1 1
|
||||
profileCfg 0 77 18 7 57.14 0 0 70 1 256 5209 0 0 30
|
||||
chirpCfg 0 0 0 0 0 0 0 1
|
||||
chirpCfg 1 1 0 0 0 0 0 4
|
||||
frameCfg 0 1 16 0 100 1 0
|
||||
lowPower 0 0
|
||||
guiMonitor -1 1 1 0 0 0 1
|
||||
cfarCfg -1 0 2 8 4 3 0 15 1
|
||||
cfarCfg -1 1 0 4 2 3 1 15 1
|
||||
multiObjBeamForming -1 1 0.5
|
||||
clutterRemoval -1 0
|
||||
calibDcRangeSig -1 0 -5 8 256
|
||||
extendedMaxVelocity -1 0
|
||||
lvdsStreamCfg -1 0 0 0
|
||||
compRangeBiasAndRxChanPhase 0.0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
|
||||
measureRangeBiasAndRxChanPhase 0 1.5 0.2
|
||||
CQRxSatMonitor 0 3 5 121 0
|
||||
CQSigImgMonitor 0 127 4
|
||||
analogMonitor 0 0
|
||||
aoaFovCfg -1 -90 90 -90 90
|
||||
cfarFovCfg -1 0 0 8.92
|
||||
cfarFovCfg -1 1 -6.48 6.48
|
||||
calibData 0 0 0
|
||||
sensorStart
|
||||
@@ -1,50 +1,51 @@
|
||||
% ***************************************************************
|
||||
% Created for SDK ver:03.02
|
||||
% Created using Visualizer ver:3.2.0.1
|
||||
% Frequency:77
|
||||
% Platform:xWR18xx
|
||||
% Scene Classifier:best_range_res
|
||||
% Azimuth Resolution(deg):15 + Elevation
|
||||
% Range Resolution(m):0.044
|
||||
% Maximum unambiguous Range(m):9.02
|
||||
% Maximum Radial Velocity(m/s):1
|
||||
% Radial velocity resolution(m/s):0.13
|
||||
% Frame Duration(msec):100
|
||||
% Range Detection Threshold (dB):15
|
||||
% Doppler Detection Threshold (dB):15
|
||||
% Range Peak Grouping:enabled
|
||||
% Doppler Peak Grouping:enabled
|
||||
% Static clutter removal:disabled
|
||||
% Angle of Arrival FoV: Full FoV
|
||||
% Range FoV: Full FoV
|
||||
% Doppler FoV: Full FoV
|
||||
% ***************************************************************
|
||||
sensorStop
|
||||
flushCfg
|
||||
dfeDataOutputMode 1
|
||||
channelCfg 15 7 0
|
||||
adcCfg 2 1
|
||||
adcbufCfg -1 0 1 1 1
|
||||
profileCfg 0 77 267 7 57.14 0 0 70 1 256 5209 0 0 30
|
||||
chirpCfg 0 0 0 0 0 0 0 1
|
||||
chirpCfg 1 1 0 0 0 0 0 4
|
||||
chirpCfg 2 2 0 0 0 0 0 2
|
||||
frameCfg 0 2 16 0 100 1 0
|
||||
lowPower 0 0
|
||||
guiMonitor -1 1 1 0 0 0 1
|
||||
cfarCfg -1 0 2 8 4 3 0 15 0
|
||||
cfarCfg -1 1 0 4 2 3 1 15 1
|
||||
multiObjBeamForming -1 1 0.5
|
||||
clutterRemoval -1 0
|
||||
calibDcRangeSig -1 0 -5 8 256
|
||||
extendedMaxVelocity -1 0
|
||||
lvdsStreamCfg -1 0 0 0
|
||||
compRangeBiasAndRxChanPhase 0.0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
|
||||
measureRangeBiasAndRxChanPhase 0 1.5 0.2
|
||||
CQRxSatMonitor 0 3 5 121 0
|
||||
CQSigImgMonitor 0 127 4
|
||||
analogMonitor 0 0
|
||||
aoaFovCfg -1 -90 90 -90 90
|
||||
cfarFovCfg -1 0 0 8.92
|
||||
cfarFovCfg -1 1 -1 1.00
|
||||
sensorStart
|
||||
% ***************************************************************
|
||||
% Created for SDK ver:03.03
|
||||
% Created using Visualizer ver:3.3.0.0
|
||||
% Frequency:77
|
||||
% Platform:xWR18xx
|
||||
% Scene Classifier:best_range_res
|
||||
% Azimuth Resolution(deg):15 + Elevation
|
||||
% Range Resolution(m):0.044
|
||||
% Maximum unambiguous Range(m):9.02
|
||||
% Maximum Radial Velocity(m/s):1
|
||||
% Radial velocity resolution(m/s):0.13
|
||||
% Frame Duration(msec):100
|
||||
% Range Detection Threshold (dB):15
|
||||
% Doppler Detection Threshold (dB):15
|
||||
% Range Peak Grouping:enabled
|
||||
% Doppler Peak Grouping:enabled
|
||||
% Static clutter removal:disabled
|
||||
% Angle of Arrival FoV: Full FoV
|
||||
% Range FoV: Full FoV
|
||||
% Doppler FoV: Full FoV
|
||||
% ***************************************************************
|
||||
sensorStop
|
||||
flushCfg
|
||||
dfeDataOutputMode 1
|
||||
channelCfg 15 7 0
|
||||
adcCfg 2 1
|
||||
adcbufCfg -1 0 1 1 1
|
||||
profileCfg 0 77 267 7 57.14 0 0 70 1 256 5209 0 0 30
|
||||
chirpCfg 0 0 0 0 0 0 0 1
|
||||
chirpCfg 1 1 0 0 0 0 0 4
|
||||
chirpCfg 2 2 0 0 0 0 0 2
|
||||
frameCfg 0 2 16 0 100 1 0
|
||||
lowPower 0 0
|
||||
guiMonitor -1 1 1 0 0 0 1
|
||||
cfarCfg -1 0 2 8 4 3 0 15 1
|
||||
cfarCfg -1 1 0 4 2 3 1 15 1
|
||||
multiObjBeamForming -1 1 0.5
|
||||
clutterRemoval -1 0
|
||||
calibDcRangeSig -1 0 -5 8 256
|
||||
extendedMaxVelocity -1 0
|
||||
lvdsStreamCfg -1 0 0 0
|
||||
compRangeBiasAndRxChanPhase 0.0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
|
||||
measureRangeBiasAndRxChanPhase 0 1.5 0.2
|
||||
CQRxSatMonitor 0 3 5 121 0
|
||||
CQSigImgMonitor 0 127 4
|
||||
analogMonitor 0 0
|
||||
aoaFovCfg -1 -90 90 -90 90
|
||||
cfarFovCfg -1 0 0 8.92
|
||||
cfarFovCfg -1 1 -1 1.00
|
||||
calibData 0 0 0
|
||||
sensorStart
|
||||
@@ -0,0 +1,51 @@
|
||||
% ***************************************************************
|
||||
% Created for SDK ver:03.04
|
||||
% Created using Visualizer ver:3.4.0.0
|
||||
% Frequency:60
|
||||
% Platform:xWR68xx_AOP
|
||||
% Scene Classifier:best_range_res
|
||||
% Azimuth Resolution(deg):60 + 30
|
||||
% Range Resolution(m):0.044
|
||||
% Maximum unambiguous Range(m):9.02
|
||||
% Maximum Radial Velocity(m/s):1
|
||||
% Radial velocity resolution(m/s):0.13
|
||||
% Frame Duration(msec):100
|
||||
% Range Detection Threshold (dB):15
|
||||
% Doppler Detection Threshold (dB):15
|
||||
% Range Peak Grouping:enabled
|
||||
% Doppler Peak Grouping:enabled
|
||||
% Static clutter removal:disabled
|
||||
% Angle of Arrival FoV: Full FoV
|
||||
% Range FoV: Full FoV
|
||||
% Doppler FoV: Full FoV
|
||||
% ***************************************************************
|
||||
sensorStop
|
||||
flushCfg
|
||||
dfeDataOutputMode 1
|
||||
channelCfg 15 7 0
|
||||
adcCfg 2 1
|
||||
adcbufCfg -1 0 1 1 1
|
||||
profileCfg 0 60 567 7 57.14 0 0 70 1 256 5209 0 0 30
|
||||
chirpCfg 0 0 0 0 0 0 0 1
|
||||
chirpCfg 1 1 0 0 0 0 0 2
|
||||
frameCfg 0 1 16 0 100 1 0
|
||||
lowPower 0 0
|
||||
guiMonitor -1 1 1 0 0 0 1
|
||||
cfarCfg -1 0 2 8 4 3 0 15 1
|
||||
cfarCfg -1 1 0 4 2 3 1 15 1
|
||||
multiObjBeamForming -1 1 0.5
|
||||
clutterRemoval -1 0
|
||||
calibDcRangeSig -1 0 -5 8 256
|
||||
extendedMaxVelocity -1 0
|
||||
lvdsStreamCfg -1 0 0 0
|
||||
compRangeBiasAndRxChanPhase 0.0 1 0 -1 0 1 0 -1 0 1 0 -1 0 1 0 -1 0 1 0 -1 0 1 0 -1 0
|
||||
measureRangeBiasAndRxChanPhase 0 1.5 0.2
|
||||
CQRxSatMonitor 0 3 5 121 0
|
||||
CQSigImgMonitor 0 127 4
|
||||
analogMonitor 0 0
|
||||
aoaFovCfg -1 -90 90 -90 90
|
||||
cfarFovCfg -1 0 0 8.92
|
||||
cfarFovCfg -1 1 -1 1.00
|
||||
calibData 0 0 0
|
||||
sensorStart
|
||||
|
||||
@@ -32,10 +32,10 @@ chirpCfg 2 2 0 0 0 0 0 4
|
||||
frameCfg 0 2 16 0 33.333 1 0
|
||||
lowPower 0 0
|
||||
guiMonitor -1 1 0 0 0 0 0
|
||||
cfarCfg -1 0 2 8 4 3 0 12 0
|
||||
cfarCfg -1 1 0 4 2 3 1 12 1
|
||||
cfarCfg -1 0 2 8 4 3 0 15 1
|
||||
cfarCfg -1 1 0 4 2 3 1 15 1
|
||||
multiObjBeamForming -1 1 0.5
|
||||
clutterRemoval -1 0
|
||||
clutterRemoval -1 1
|
||||
calibDcRangeSig -1 0 -5 8 256
|
||||
extendedMaxVelocity -1 0
|
||||
lvdsStreamCfg -1 0 0 0
|
||||
@@ -47,4 +47,5 @@ analogMonitor 0 0
|
||||
aoaFovCfg -1 -90 90 -90 90
|
||||
cfarFovCfg -1 0 0 8.40
|
||||
cfarFovCfg -1 1 -5.02 5.02
|
||||
calibData 0 0 0
|
||||
sensorStart
|
||||
@@ -1,51 +1,53 @@
|
||||
% ***************************************************************
|
||||
% Created for SDK ver:03.02
|
||||
% Created using Visualizer ver:3.2.0.1
|
||||
% Frequency:60
|
||||
% Platform:xWR68xx
|
||||
% Scene Classifier:best_range_res
|
||||
% Azimuth Resolution(deg):15 + Elevation
|
||||
% Range Resolution(m):0.047
|
||||
% Maximum unambiguous Range(m):9.04
|
||||
% Maximum Radial Velocity(m/s):5.09
|
||||
% Radial velocity resolution(m/s):0.64
|
||||
% Frame Duration(msec):33.333
|
||||
% Range Detection Threshold (dB):15
|
||||
% Doppler Detection Threshold (dB):15
|
||||
% Range Peak Grouping:enabled
|
||||
% Doppler Peak Grouping:enabled
|
||||
% Static clutter removal:disabled
|
||||
% Angle of Arrival FoV: Full FoV
|
||||
% Range FoV: Full FoV
|
||||
% Doppler FoV: Full FoV
|
||||
% ***************************************************************
|
||||
sensorStop
|
||||
flushCfg
|
||||
dfeDataOutputMode 1
|
||||
channelCfg 15 7 0
|
||||
adcCfg 2 1
|
||||
adcbufCfg -1 0 1 1 1
|
||||
profileCfg 0 60 41 7 40 0 0 100 1 240 7500 0 0 30
|
||||
chirpCfg 0 0 0 0 0 0 0 1
|
||||
chirpCfg 1 1 0 0 0 0 0 4
|
||||
chirpCfg 2 2 0 0 0 0 0 2
|
||||
frameCfg 0 2 16 0 33.333 1 0
|
||||
lowPower 0 0
|
||||
guiMonitor -1 1 0 0 0 0 0
|
||||
cfarCfg -1 0 2 8 4 3 0 15 0
|
||||
cfarCfg -1 1 0 4 2 3 1 15 1
|
||||
multiObjBeamForming -1 1 0.5
|
||||
clutterRemoval -1 0
|
||||
calibDcRangeSig -1 0 -5 8 256
|
||||
extendedMaxVelocity -1 0
|
||||
bpmCfg -1 0 0 1
|
||||
lvdsStreamCfg -1 0 0 0
|
||||
compRangeBiasAndRxChanPhase 0.0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
|
||||
measureRangeBiasAndRxChanPhase 0 1.5 0.2
|
||||
CQRxSatMonitor 0 3 4 99 0
|
||||
CQSigImgMonitor 0 119 4
|
||||
analogMonitor 0 0
|
||||
aoaFovCfg -1 -90 90 -90 90
|
||||
cfarFovCfg -1 0 0 9.00
|
||||
cfarFovCfg -1 1 -5.14 5.14
|
||||
sensorStart
|
||||
% ***************************************************************
|
||||
% Created for SDK ver:03.02
|
||||
% Created using Visualizer ver:3.2.0.1
|
||||
% Frequency:60
|
||||
% Platform:xWR68xx
|
||||
% Scene Classifier:best_range_res
|
||||
% Azimuth Resolution(deg):15 + Elevation
|
||||
% Range Resolution(m):0.047
|
||||
% Maximum unambiguous Range(m):9.04
|
||||
% Maximum Radial Velocity(m/s):5.09
|
||||
% Radial velocity resolution(m/s):0.64
|
||||
% Frame Duration(msec):33.333
|
||||
% Range Detection Threshold (dB):15
|
||||
% Doppler Detection Threshold (dB):15
|
||||
% Range Peak Grouping:enabled
|
||||
% Doppler Peak Grouping:enabled
|
||||
% Static clutter removal:disabled
|
||||
% Angle of Arrival FoV: Full FoV
|
||||
% Range FoV: Full FoV
|
||||
% Doppler FoV: Full FoV
|
||||
% ***************************************************************
|
||||
sensorStop
|
||||
flushCfg
|
||||
dfeDataOutputMode 1
|
||||
channelCfg 15 7 0
|
||||
adcCfg 2 1
|
||||
adcbufCfg -1 0 1 1 1
|
||||
profileCfg 0 60 41 7 40 0 0 100 1 240 7500 0 0 30
|
||||
chirpCfg 0 0 0 0 0 0 0 1
|
||||
chirpCfg 1 1 0 0 0 0 0 4
|
||||
chirpCfg 2 2 0 0 0 0 0 2
|
||||
frameCfg 0 2 16 0 33.333 1 0
|
||||
lowPower 0 0
|
||||
guiMonitor -1 1 0 0 0 0 0
|
||||
cfarCfg -1 0 2 8 4 3 0 15 0
|
||||
cfarCfg -1 1 0 4 2 3 1 15 1
|
||||
multiObjBeamForming -1 1 0.5
|
||||
clutterRemoval -1 1
|
||||
calibDcRangeSig -1 0 -5 8 256
|
||||
extendedMaxVelocity -1 0
|
||||
bpmCfg -1 0 0 1
|
||||
lvdsStreamCfg -1 1 1 1
|
||||
compRangeBiasAndRxChanPhase 0.0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
|
||||
measureRangeBiasAndRxChanPhase 0 1.5 0.2
|
||||
CQRxSatMonitor 0 3 4 99 0
|
||||
CQSigImgMonitor 0 119 4
|
||||
analogMonitor 0 0
|
||||
aoaFovCfg -1 -90 90 -90 90
|
||||
cfarFovCfg -1 0 0 9.00
|
||||
cfarFovCfg -1 1 -5.14 5.14
|
||||
calibData 0 0 0
|
||||
sensorStart
|
||||
|
||||
@@ -1,44 +1,51 @@
|
||||
% ***************************************************************
|
||||
% Created for SDK ver:03.00
|
||||
% Created using Visualizer ver:3.0.0.1
|
||||
% Frequency:60.25
|
||||
% Platform:xWR68xx
|
||||
% Scene Classifier:best_range_res
|
||||
% Azimuth Resolution(deg):15
|
||||
% Range Resolution(m):0.045
|
||||
% Maximum unambiguous Range(m):9.02
|
||||
% Maximum Radial Velocity(m/s):5.06
|
||||
% Radial velocity resolution(m/s):0.64
|
||||
% Frame Duration(msec):33.333
|
||||
% Range Detection Threshold (dB):9
|
||||
% Doppler Detection Threshold (dB):9
|
||||
% Range Peak Grouping:disabled
|
||||
% Doppler Peak Grouping:enabled
|
||||
% Static clutter removal:disabled
|
||||
% Angle of Arrival FoV: Full FoV
|
||||
% Range FoV: Full FoV
|
||||
% Doppler FoV: Full FoV
|
||||
% ***************************************************************
|
||||
sensorStop
|
||||
flushCfg
|
||||
dfeDataOutputMode 1
|
||||
channelCfg 15 5 0
|
||||
adcCfg 2 1
|
||||
adcbufCfg -1 0 1 1 1
|
||||
profileCfg 0 60.25 48 7 75 0 0 50 1 240 3582 0 0 30
|
||||
chirpCfg 0 0 0 0 0 0 0 1
|
||||
chirpCfg 1 1 0 0 0 0 0 4
|
||||
frameCfg 0 1 16 0 33.333 1 0
|
||||
lowPower 0 0
|
||||
guiMonitor -1 1 0 0 0 0 0
|
||||
cfarCfg -1 0 0 8 4 4 0 768 0
|
||||
cfarCfg -1 1 0 4 2 3 1 768 1
|
||||
multiObjBeamForming -1 1 0.5
|
||||
clutterRemoval -1 0
|
||||
calibDcRangeSig -1 0 -5 8 256
|
||||
compRangeBiasAndRxChanPhase 0.0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
|
||||
measureRangeBiasAndRxChanPhase 0 1.5 0.2
|
||||
aoaFovCfg -1 -90 90 -90 90
|
||||
cfarFovCfg -1 0 0 8.59
|
||||
cfarFovCfg -1 1 -5.06 5.06
|
||||
sensorStart
|
||||
% ***************************************************************
|
||||
% Created for SDK ver:03.03
|
||||
% Created using Visualizer ver:3.3.0.0
|
||||
% Frequency:60
|
||||
% Platform:xWR68xx
|
||||
% Scene Classifier:best_range_res
|
||||
% Azimuth Resolution(deg):15
|
||||
% Range Resolution(m):0.044
|
||||
% Maximum unambiguous Range(m):9.02
|
||||
% Maximum Radial Velocity(m/s):1
|
||||
% Radial velocity resolution(m/s):0.13
|
||||
% Frame Duration(msec):100
|
||||
% Range Detection Threshold (dB):15
|
||||
% Doppler Detection Threshold (dB):15
|
||||
% Range Peak Grouping:enabled
|
||||
% Doppler Peak Grouping:enabled
|
||||
% Static clutter removal:disabled
|
||||
% Angle of Arrival FoV: Full FoV
|
||||
% Range FoV: Full FoV
|
||||
% Doppler FoV: Full FoV
|
||||
% ***************************************************************
|
||||
sensorStop
|
||||
flushCfg
|
||||
dfeDataOutputMode 1
|
||||
channelCfg 15 5 0
|
||||
adcCfg 2 1
|
||||
adcbufCfg -1 0 1 1 1
|
||||
profileCfg 0 60 567 7 57.14 0 0 70 1 256 5209 0 0 30
|
||||
chirpCfg 0 0 0 0 0 0 0 1
|
||||
chirpCfg 1 1 0 0 0 0 0 4
|
||||
frameCfg 0 1 16 0 100 1 0
|
||||
lowPower 0 0
|
||||
guiMonitor -1 1 1 0 0 0 1
|
||||
cfarCfg -1 0 2 8 4 3 0 15 1
|
||||
cfarCfg -1 1 0 4 2 3 1 15 1
|
||||
multiObjBeamForming -1 1 0.5
|
||||
clutterRemoval -1 0
|
||||
calibDcRangeSig -1 0 -5 8 256
|
||||
extendedMaxVelocity -1 0
|
||||
bpmCfg -1 0 0 1
|
||||
lvdsStreamCfg -1 0 0 0
|
||||
compRangeBiasAndRxChanPhase 0.0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
|
||||
measureRangeBiasAndRxChanPhase 0 1.5 0.2
|
||||
CQRxSatMonitor 0 3 5 121 0
|
||||
CQSigImgMonitor 0 127 4
|
||||
analogMonitor 0 0
|
||||
aoaFovCfg -1 -90 90 -90 90
|
||||
cfarFovCfg -1 0 0 8.92
|
||||
cfarFovCfg -1 1 -1 1.00
|
||||
calibData 0 0 0
|
||||
sensorStart
|
||||
@@ -1,51 +1,52 @@
|
||||
% ***************************************************************
|
||||
% Created for SDK ver:03.02
|
||||
% Created using Visualizer ver:3.2.0.1
|
||||
% Frequency:60
|
||||
% Platform:xWR68xx
|
||||
% Scene Classifier:best_range_res
|
||||
% Azimuth Resolution(deg):15 + Elevation
|
||||
% Range Resolution(m):0.047
|
||||
% Maximum unambiguous Range(m):9.04
|
||||
% Maximum Radial Velocity(m/s):5.09
|
||||
% Radial velocity resolution(m/s):0.64
|
||||
% Frame Duration(msec):33.333
|
||||
% Range Detection Threshold (dB):15
|
||||
% Doppler Detection Threshold (dB):15
|
||||
% Range Peak Grouping:enabled
|
||||
% Doppler Peak Grouping:enabled
|
||||
% Static clutter removal:disabled
|
||||
% Angle of Arrival FoV: Full FoV
|
||||
% Range FoV: Full FoV
|
||||
% Doppler FoV: Full FoV
|
||||
% ***************************************************************
|
||||
sensorStop
|
||||
flushCfg
|
||||
dfeDataOutputMode 1
|
||||
channelCfg 15 7 0
|
||||
adcCfg 2 1
|
||||
adcbufCfg -1 0 1 1 1
|
||||
profileCfg 0 60 41 7 40 0 0 100 1 240 7500 0 0 30
|
||||
chirpCfg 0 0 0 0 0 0 0 1
|
||||
chirpCfg 1 1 0 0 0 0 0 4
|
||||
chirpCfg 2 2 0 0 0 0 0 2
|
||||
frameCfg 0 2 16 0 33.333 1 0
|
||||
lowPower 0 0
|
||||
guiMonitor -1 1 0 0 0 0 0
|
||||
cfarCfg -1 0 2 8 4 3 0 15 0
|
||||
cfarCfg -1 1 0 4 2 3 1 15 1
|
||||
multiObjBeamForming -1 1 0.5
|
||||
clutterRemoval -1 0
|
||||
calibDcRangeSig -1 0 -5 8 256
|
||||
extendedMaxVelocity -1 0
|
||||
bpmCfg -1 0 0 1
|
||||
lvdsStreamCfg -1 0 0 0
|
||||
compRangeBiasAndRxChanPhase 0.0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
|
||||
measureRangeBiasAndRxChanPhase 0 1.5 0.2
|
||||
CQRxSatMonitor 0 3 4 99 0
|
||||
CQSigImgMonitor 0 119 4
|
||||
analogMonitor 0 0
|
||||
aoaFovCfg -1 -90 90 -90 90
|
||||
cfarFovCfg -1 0 0 9.00
|
||||
cfarFovCfg -1 1 -5.14 5.14
|
||||
sensorStart
|
||||
% ***************************************************************
|
||||
% Created for SDK ver:03.02
|
||||
% Created using Visualizer ver:3.2.0.1
|
||||
% Frequency:60
|
||||
% Platform:xWR68xx
|
||||
% Scene Classifier:best_range_res
|
||||
% Azimuth Resolution(deg):15 + Elevation
|
||||
% Range Resolution(m):0.047
|
||||
% Maximum unambiguous Range(m):9.04
|
||||
% Maximum Radial Velocity(m/s):5.09
|
||||
% Radial velocity resolution(m/s):0.64
|
||||
% Frame Duration(msec):33.333
|
||||
% Range Detection Threshold (dB):15
|
||||
% Doppler Detection Threshold (dB):15
|
||||
% Range Peak Grouping:enabled
|
||||
% Doppler Peak Grouping:enabled
|
||||
% Static clutter removal:disabled
|
||||
% Angle of Arrival FoV: Full FoV
|
||||
% Range FoV: Full FoV
|
||||
% Doppler FoV: Full FoV
|
||||
% ***************************************************************
|
||||
sensorStop
|
||||
flushCfg
|
||||
dfeDataOutputMode 1
|
||||
channelCfg 15 7 0
|
||||
adcCfg 2 1
|
||||
adcbufCfg -1 0 1 1 1
|
||||
profileCfg 0 60 41 7 40 0 0 100 1 240 7500 0 0 30
|
||||
chirpCfg 0 0 0 0 0 0 0 1
|
||||
chirpCfg 1 1 0 0 0 0 0 4
|
||||
chirpCfg 2 2 0 0 0 0 0 2
|
||||
frameCfg 0 2 16 0 33.333 1 0
|
||||
lowPower 0 0
|
||||
guiMonitor -1 1 1 0 0 0 1
|
||||
cfarCfg -1 0 2 8 4 3 0 15 1
|
||||
cfarCfg -1 1 0 4 2 3 1 15 1
|
||||
multiObjBeamForming -1 1 0.5
|
||||
clutterRemoval -1 1
|
||||
calibDcRangeSig -1 0 -5 8 256
|
||||
extendedMaxVelocity -1 0
|
||||
bpmCfg -1 0 0 1
|
||||
lvdsStreamCfg -1 0 0 0
|
||||
compRangeBiasAndRxChanPhase 0.0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
|
||||
measureRangeBiasAndRxChanPhase 0 1.5 0.2
|
||||
CQRxSatMonitor 0 3 4 99 0
|
||||
CQSigImgMonitor 0 119 4
|
||||
analogMonitor 0 0
|
||||
aoaFovCfg -1 -90 90 -90 90
|
||||
cfarFovCfg -1 0 0 9.00
|
||||
cfarFovCfg -1 1 -5.14 5.14
|
||||
calibData 0 0 0
|
||||
sensorStart
|
||||
@@ -1,152 +1,142 @@
|
||||
/*
|
||||
* DataHandlerClass.cpp
|
||||
*
|
||||
* This file defines the DataUARTHandler class.
|
||||
*
|
||||
*
|
||||
* Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com/
|
||||
*
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Neither the name of Texas Instruments Incorporated 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
|
||||
* OWNER 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _DATA_HANDLER_CLASS_
|
||||
#define _DATA_HANDLER_CLASS_
|
||||
|
||||
|
||||
#include "mmWave.h"
|
||||
#include <iostream>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include "ros/ros.h"
|
||||
#include "sensor_msgs/PointCloud2.h"
|
||||
#define COUNT_SYNC_MAX 2
|
||||
|
||||
class DataUARTHandler{
|
||||
|
||||
public:
|
||||
|
||||
/*Constructor*/
|
||||
//void DataUARTHandler(ros::NodeHandle* nh) : currentBufp(&pingPongBuffers[0]) , nextBufp(&pingPongBuffers[1]) {}
|
||||
DataUARTHandler(ros::NodeHandle* nh);
|
||||
|
||||
/*User callable function to set the UARTPort*/
|
||||
void setUARTPort(char* mySerialPort);
|
||||
|
||||
/*User callable function to set the BaudRate*/
|
||||
void setBaudRate(int myBaudRate);
|
||||
|
||||
/*User callable function to set maxAllowedElevationAngleDeg*/
|
||||
void setMaxAllowedElevationAngleDeg(int myMaxAllowedElevationAngleDeg);
|
||||
|
||||
/*User callable function to set maxAllowedElevationAngleDeg*/
|
||||
void setMaxAllowedAzimuthAngleDeg(int myMaxAllowedAzimuthAngleDeg);
|
||||
|
||||
void setNodeHandle(ros::NodeHandle* nh);
|
||||
|
||||
/*User callable function to start the handler's internal threads*/
|
||||
void start(void);
|
||||
|
||||
/*Helper functions to allow pthread compatability*/
|
||||
static void* readIncomingData_helper(void *context);
|
||||
|
||||
static void* sortIncomingData_helper(void *context);
|
||||
|
||||
static void* syncedBufferSwap_helper(void *context);
|
||||
|
||||
/*Sorted mmwDemo Data structure*/
|
||||
mmwDataPacket mmwData;
|
||||
|
||||
private:
|
||||
|
||||
/*Contains the name of the serial port*/
|
||||
char* dataSerialPort;
|
||||
|
||||
/*Contains the baud Rate*/
|
||||
int dataBaudRate;
|
||||
|
||||
/*Contains the max_allowed_elevation_angle_deg (points with elevation angles
|
||||
outside +/- max_allowed_elevation_angle_deg will be removed)*/
|
||||
int maxAllowedElevationAngleDeg;
|
||||
|
||||
/*Contains the max_allowed_azimuth_angle_deg (points with azimuth angles
|
||||
outside +/- max_allowed_azimuth_angle_deg will be removed)*/
|
||||
int maxAllowedAzimuthAngleDeg;
|
||||
|
||||
/*Mutex protected variable which synchronizes threads*/
|
||||
int countSync;
|
||||
|
||||
/*Read/Write Buffers*/
|
||||
std::vector<uint8_t> pingPongBuffers[2];
|
||||
|
||||
/*Pointer to current data (sort)*/
|
||||
std::vector<uint8_t>* currentBufp;
|
||||
|
||||
/*Pointer to new data (read)*/
|
||||
std::vector<uint8_t>* nextBufp;
|
||||
|
||||
/*Mutex protecting the countSync variable */
|
||||
pthread_mutex_t countSync_mutex;
|
||||
|
||||
/*Mutex protecting the nextBufp pointer*/
|
||||
pthread_mutex_t nextBufp_mutex;
|
||||
|
||||
/*Mutex protecting the currentBufp pointer*/
|
||||
pthread_mutex_t currentBufp_mutex;
|
||||
|
||||
/*Condition variable which blocks the Swap Thread until signaled*/
|
||||
pthread_cond_t countSync_max_cv;
|
||||
|
||||
/*Condition variable which blocks the Read Thread until signaled*/
|
||||
pthread_cond_t read_go_cv;
|
||||
|
||||
/*Condition variable which blocks the Sort Thread until signaled*/
|
||||
pthread_cond_t sort_go_cv;
|
||||
|
||||
/*Swap Buffer Pointers Thread*/
|
||||
void *syncedBufferSwap(void);
|
||||
|
||||
/*Checks if the magic word was found*/
|
||||
int isMagicWord(uint8_t last8Bytes[8]);
|
||||
|
||||
/*Read incoming UART Data Thread*/
|
||||
void *readIncomingData(void);
|
||||
|
||||
/*Sort incoming UART Data Thread*/
|
||||
void *sortIncomingData(void);
|
||||
|
||||
ros::NodeHandle* nodeHandle;
|
||||
|
||||
ros::Publisher DataUARTHandler_pub;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
#ifndef _DATA_HANDLER_CLASS_
|
||||
#define _DATA_HANDLER_CLASS_
|
||||
|
||||
#include <ti_mmwave_rospkg/RadarScan.h>
|
||||
#include "mmWave.h"
|
||||
#include <iostream>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include "ros/ros.h"
|
||||
#include "sensor_msgs/PointCloud2.h"
|
||||
#include <pthread.h>
|
||||
#include <algorithm>
|
||||
#include "pcl_ros/point_cloud.h"
|
||||
#include "sensor_msgs/PointField.h"
|
||||
#include "sensor_msgs/PointCloud2.h"
|
||||
#include "sensor_msgs/point_cloud2_iterator.h"
|
||||
#include <pcl/io/pcd_io.h>
|
||||
#include <pcl/point_types.h>
|
||||
#include <visualization_msgs/Marker.h>
|
||||
#include <cmath>
|
||||
#define COUNT_SYNC_MAX 2
|
||||
|
||||
class DataUARTHandler{
|
||||
|
||||
public:
|
||||
|
||||
/*Constructor*/
|
||||
//void DataUARTHandler(ros::NodeHandle* nh) : currentBufp(&pingPongBuffers[0]) , nextBufp(&pingPongBuffers[1]) {}
|
||||
DataUARTHandler(ros::NodeHandle* nh);
|
||||
|
||||
void setFrameID(char* myFrameID);
|
||||
|
||||
/*User callable function to set the UARTPort*/
|
||||
void setUARTPort(char* mySerialPort);
|
||||
|
||||
/*User callable function to set the BaudRate*/
|
||||
void setBaudRate(int myBaudRate);
|
||||
|
||||
/*User callable function to set maxAllowedElevationAngleDeg*/
|
||||
void setMaxAllowedElevationAngleDeg(int myMaxAllowedElevationAngleDeg);
|
||||
|
||||
/*User callable function to set maxAllowedElevationAngleDeg*/
|
||||
void setMaxAllowedAzimuthAngleDeg(int myMaxAllowedAzimuthAngleDeg);
|
||||
|
||||
void setNodeHandle(ros::NodeHandle* nh);
|
||||
|
||||
/*User callable function to start the handler's internal threads*/
|
||||
void start(void);
|
||||
|
||||
/*Helper functions to allow pthread compatability*/
|
||||
static void* readIncomingData_helper(void *context);
|
||||
|
||||
static void* sortIncomingData_helper(void *context);
|
||||
|
||||
static void* syncedBufferSwap_helper(void *context);
|
||||
|
||||
/*Sorted mmwDemo Data structure*/
|
||||
mmwDataPacket mmwData;
|
||||
|
||||
private:
|
||||
|
||||
int nr;
|
||||
int nd;
|
||||
int ntx;
|
||||
float fs;
|
||||
float fc;
|
||||
float BW;
|
||||
float PRI;
|
||||
float tfr;
|
||||
float max_range;
|
||||
float vrange;
|
||||
float max_vel;
|
||||
float vvel;
|
||||
|
||||
char* frameID;
|
||||
/*Contains the name of the serial port*/
|
||||
char* dataSerialPort;
|
||||
|
||||
/*Contains the baud Rate*/
|
||||
int dataBaudRate;
|
||||
|
||||
/*Contains the max_allowed_elevation_angle_deg (points with elevation angles
|
||||
outside +/- max_allowed_elevation_angle_deg will be removed)*/
|
||||
int maxAllowedElevationAngleDeg;
|
||||
|
||||
/*Contains the max_allowed_azimuth_angle_deg (points with azimuth angles
|
||||
outside +/- max_allowed_azimuth_angle_deg will be removed)*/
|
||||
int maxAllowedAzimuthAngleDeg;
|
||||
|
||||
/*Mutex protected variable which synchronizes threads*/
|
||||
int countSync;
|
||||
|
||||
/*Read/Write Buffers*/
|
||||
std::vector<uint8_t> pingPongBuffers[2];
|
||||
|
||||
/*Pointer to current data (sort)*/
|
||||
std::vector<uint8_t>* currentBufp;
|
||||
|
||||
/*Pointer to new data (read)*/
|
||||
std::vector<uint8_t>* nextBufp;
|
||||
|
||||
/*Mutex protecting the countSync variable */
|
||||
pthread_mutex_t countSync_mutex;
|
||||
|
||||
/*Mutex protecting the nextBufp pointer*/
|
||||
pthread_mutex_t nextBufp_mutex;
|
||||
|
||||
/*Mutex protecting the currentBufp pointer*/
|
||||
pthread_mutex_t currentBufp_mutex;
|
||||
|
||||
/*Condition variable which blocks the Swap Thread until signaled*/
|
||||
pthread_cond_t countSync_max_cv;
|
||||
|
||||
/*Condition variable which blocks the Read Thread until signaled*/
|
||||
pthread_cond_t read_go_cv;
|
||||
|
||||
/*Condition variable which blocks the Sort Thread until signaled*/
|
||||
pthread_cond_t sort_go_cv;
|
||||
|
||||
/*Swap Buffer Pointers Thread*/
|
||||
void *syncedBufferSwap(void);
|
||||
|
||||
/*Checks if the magic word was found*/
|
||||
int isMagicWord(uint8_t last8Bytes[8]);
|
||||
|
||||
/*Read incoming UART Data Thread*/
|
||||
void *readIncomingData(void);
|
||||
|
||||
/*Sort incoming UART Data Thread*/
|
||||
void *sortIncomingData(void);
|
||||
|
||||
void visualize(const ti_mmwave_rospkg::RadarScan &msg);
|
||||
|
||||
ros::NodeHandle* nodeHandle;
|
||||
|
||||
ros::Publisher DataUARTHandler_pub;
|
||||
ros::Publisher radar_scan_pub;
|
||||
ros::Publisher marker_pub;
|
||||
};
|
||||
|
||||
#endif
|
||||
35
autonomous_robotics_ros/src/ti_mmwave_rospkg/include/ParameterParser.h
Executable file
35
autonomous_robotics_ros/src/ti_mmwave_rospkg/include/ParameterParser.h
Executable file
@@ -0,0 +1,35 @@
|
||||
#ifndef _PARAM_PARSER_CLASS_
|
||||
#define _PARAM_PARSER_CLASS_
|
||||
|
||||
#include "ros/ros.h"
|
||||
#include "std_msgs/String.h"
|
||||
#include "ti_mmwave_rospkg/mmWaveCLI.h"
|
||||
#include <nodelet/nodelet.h>
|
||||
#include <pluginlib/class_list_macros.h>
|
||||
#include <cstdlib>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <cstdio>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace ti_mmwave_rospkg {
|
||||
|
||||
class ParameterParser : public nodelet::Nodelet{
|
||||
|
||||
public:
|
||||
|
||||
ParameterParser();
|
||||
void ParamsParser(ti_mmwave_rospkg::mmWaveCLI &srv, ros::NodeHandle &n);
|
||||
void CalParams(ros::NodeHandle &nh);
|
||||
|
||||
private:
|
||||
|
||||
virtual void onInit();
|
||||
|
||||
ti_mmwave_rospkg::mmWaveCLI srv;
|
||||
|
||||
};
|
||||
}
|
||||
#endif
|
||||
384
autonomous_robotics_ros/ti_mmwave_rospkg/include/mmWave.h → autonomous_robotics_ros/src/ti_mmwave_rospkg/include/mmWave.h
Normal file → Executable file
384
autonomous_robotics_ros/ti_mmwave_rospkg/include/mmWave.h → autonomous_robotics_ros/src/ti_mmwave_rospkg/include/mmWave.h
Normal file → Executable file
@@ -1,194 +1,190 @@
|
||||
|
||||
/*
|
||||
* mmWave.h
|
||||
*
|
||||
* This file contains various defines used within this package.
|
||||
*
|
||||
*
|
||||
* Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com/
|
||||
*
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Neither the name of Texas Instruments Incorporated 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
|
||||
* OWNER 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.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _TI_IWR14XX_
|
||||
#define _TI_IWR14XX_
|
||||
|
||||
#include <iostream>
|
||||
#include <iostream>
|
||||
#include <cstdio>
|
||||
#include "serial/serial.h"
|
||||
#include "ros/ros.h"
|
||||
#include <boost/thread.hpp>
|
||||
#include <cstdint>
|
||||
|
||||
enum MmwDemo_Output_TLV_Types
|
||||
{
|
||||
MMWDEMO_OUTPUT_MSG_NULL = 0,
|
||||
/*! @brief List of detected points */
|
||||
MMWDEMO_OUTPUT_MSG_DETECTED_POINTS,
|
||||
|
||||
/*! @brief Range profile */
|
||||
MMWDEMO_OUTPUT_MSG_RANGE_PROFILE,
|
||||
|
||||
/*! @brief Noise floor profile */
|
||||
MMWDEMO_OUTPUT_MSG_NOISE_PROFILE,
|
||||
|
||||
/*! @brief Samples to calculate static azimuth heatmap */
|
||||
MMWDEMO_OUTPUT_MSG_AZIMUTH_STATIC_HEAT_MAP,
|
||||
|
||||
/*! @brief Range/Doppler detection matrix */
|
||||
MMWDEMO_OUTPUT_MSG_RANGE_DOPPLER_HEAT_MAP,
|
||||
|
||||
/*! @brief Stats information */
|
||||
MMWDEMO_OUTPUT_MSG_STATS,
|
||||
|
||||
/*! @brief List of detected points side information */
|
||||
MMWDEMO_OUTPUT_MSG_DETECTED_POINTS_SIDE_INFO,
|
||||
|
||||
MMWDEMO_OUTPUT_MSG_MAX
|
||||
};
|
||||
|
||||
enum SorterState{ READ_HEADER,
|
||||
CHECK_TLV_TYPE,
|
||||
READ_OBJ_STRUCT,
|
||||
READ_LOG_MAG_RANGE,
|
||||
READ_NOISE,
|
||||
READ_AZIMUTH,
|
||||
READ_DOPPLER,
|
||||
READ_STATS,
|
||||
SWAP_BUFFERS,
|
||||
READ_SIDE_INFO};
|
||||
|
||||
struct MmwDemo_output_message_header_t
|
||||
{
|
||||
/*! brief Version: : MajorNum * 2^24 + MinorNum * 2^16 + BugfixNum * 2^8 + BuildNum */
|
||||
uint32_t version;
|
||||
|
||||
/*! @brief Total packet length including header in Bytes */
|
||||
uint32_t totalPacketLen;
|
||||
|
||||
/*! @brief platform type */
|
||||
uint32_t platform;
|
||||
|
||||
/*! @brief Frame number */
|
||||
uint32_t frameNumber;
|
||||
|
||||
/*! @brief Time in CPU cycles when the message was created. For XWR16xx: DSP CPU cycles, for XWR14xx: R4F CPU cycles */
|
||||
uint32_t timeCpuCycles;
|
||||
|
||||
/*! @brief Number of detected objects */
|
||||
uint32_t numDetectedObj;
|
||||
|
||||
/*! @brief Number of TLVs */
|
||||
uint32_t numTLVs;
|
||||
|
||||
/*! @brief Sub-frame Number (not used with XWR14xx) */
|
||||
uint32_t subFrameNumber;
|
||||
};
|
||||
|
||||
// Detected object structure for mmWave SDK 1.x and 2.x
|
||||
struct MmwDemo_DetectedObj
|
||||
{
|
||||
uint16_t rangeIdx; /*!< @brief Range index */
|
||||
uint16_t dopplerIdx; /*!< @brief Dopler index */
|
||||
uint16_t peakVal; /*!< @brief Peak value */
|
||||
int16_t x; /*!< @brief x - coordinate in meters. Q format depends on the range resolution */
|
||||
int16_t y; /*!< @brief y - coordinate in meters. Q format depends on the range resolution */
|
||||
int16_t z; /*!< @brief z - coordinate in meters. Q format depends on the range resolution */
|
||||
};
|
||||
|
||||
// Detected object structures for mmWave SDK 3.x (DPIF_PointCloudCartesian_t and DPIF_PointCloudSideInfo_t)
|
||||
|
||||
/**
|
||||
* @brief
|
||||
* Point cloud definition in Cartesian coordinate system - floating point format
|
||||
*
|
||||
*/
|
||||
typedef struct DPIF_PointCloudCartesian_t
|
||||
{
|
||||
/*! @brief x - coordinate in meters */
|
||||
float x;
|
||||
|
||||
/*! @brief y - coordinate in meters */
|
||||
float y;
|
||||
|
||||
/*! @brief z - coordinate in meters */
|
||||
float z;
|
||||
|
||||
/*! @brief Doppler velocity estimate in m/s. Positive velocity means target
|
||||
* is moving away from the sensor and negative velocity means target
|
||||
* is moving towards the sensor. */
|
||||
float velocity;
|
||||
}DPIF_PointCloudCartesian;
|
||||
|
||||
/**
|
||||
* @brief
|
||||
* Point cloud side information such as SNR and noise level
|
||||
*
|
||||
*/
|
||||
typedef struct DPIF_PointCloudSideInfo_t
|
||||
{
|
||||
/*! @brief snr - CFAR cell to side noise ratio in dB expressed in 0.1 steps of dB */
|
||||
int16_t snr;
|
||||
|
||||
/*! @brief y - CFAR noise level of the side of the detected cell in dB expressed in 0.1 steps of dB */
|
||||
int16_t noise;
|
||||
}DPIF_PointCloudSideInfo;
|
||||
|
||||
|
||||
struct mmwDataPacket{
|
||||
|
||||
MmwDemo_output_message_header_t header;
|
||||
|
||||
uint16_t numObjOut;
|
||||
|
||||
uint16_t xyzQFormat; // only used for SDK 1.x and 2.x
|
||||
|
||||
MmwDemo_DetectedObj objOut; // only used for SDK 1.x and 2.x
|
||||
|
||||
DPIF_PointCloudCartesian_t newObjOut; // used for SDK 3.x
|
||||
DPIF_PointCloudSideInfo_t sideInfo; // used for SDK 3.x
|
||||
};
|
||||
|
||||
const uint8_t magicWord[8] = {2, 1, 4, 3, 6, 5, 8, 7};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* mmWave.h
|
||||
*
|
||||
* This file contains various defines used within this package.
|
||||
*
|
||||
*
|
||||
* Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com/
|
||||
*
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Neither the name of Texas Instruments Incorporated 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
|
||||
* OWNER 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.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _TI_IWR14XX_
|
||||
#define _TI_IWR14XX_
|
||||
|
||||
#include <iostream>
|
||||
#include <iostream>
|
||||
#include <cstdio>
|
||||
#include "serial/serial.h"
|
||||
#include "ros/ros.h"
|
||||
#include <boost/thread.hpp>
|
||||
#include <cstdint>
|
||||
|
||||
enum MmwDemo_Output_TLV_Types
|
||||
{
|
||||
MMWDEMO_OUTPUT_MSG_NULL = 0,
|
||||
/*! @brief List of detected points */
|
||||
MMWDEMO_OUTPUT_MSG_DETECTED_POINTS,
|
||||
|
||||
/*! @brief Range profile */
|
||||
MMWDEMO_OUTPUT_MSG_RANGE_PROFILE,
|
||||
|
||||
/*! @brief Noise floor profile */
|
||||
MMWDEMO_OUTPUT_MSG_NOISE_PROFILE,
|
||||
|
||||
/*! @brief Samples to calculate static azimuth heatmap */
|
||||
MMWDEMO_OUTPUT_MSG_AZIMUTH_STATIC_HEAT_MAP,
|
||||
|
||||
/*! @brief Range/Doppler detection matrix */
|
||||
MMWDEMO_OUTPUT_MSG_RANGE_DOPPLER_HEAT_MAP,
|
||||
|
||||
/*! @brief Stats information */
|
||||
MMWDEMO_OUTPUT_MSG_STATS,
|
||||
|
||||
/*! @brief List of detected points side information */
|
||||
MMWDEMO_OUTPUT_MSG_DETECTED_POINTS_SIDE_INFO,
|
||||
|
||||
MMWDEMO_OUTPUT_MSG_MAX
|
||||
};
|
||||
|
||||
enum SorterState{ READ_HEADER,
|
||||
CHECK_TLV_TYPE,
|
||||
READ_OBJ_STRUCT,
|
||||
READ_LOG_MAG_RANGE,
|
||||
READ_NOISE,
|
||||
READ_AZIMUTH,
|
||||
READ_DOPPLER,
|
||||
READ_STATS,
|
||||
SWAP_BUFFERS,
|
||||
READ_SIDE_INFO};
|
||||
|
||||
struct MmwDemo_output_message_header_t
|
||||
{
|
||||
/*! brief Version: : MajorNum * 2^24 + MinorNum * 2^16 + BugfixNum * 2^8 + BuildNum */
|
||||
uint32_t version;
|
||||
|
||||
/*! @brief Total packet length including header in Bytes */
|
||||
uint32_t totalPacketLen;
|
||||
|
||||
/*! @brief platform type */
|
||||
uint32_t platform;
|
||||
|
||||
/*! @brief Frame number */
|
||||
uint32_t frameNumber;
|
||||
|
||||
/*! @brief Time in CPU cycles when the message was created. For XWR16xx: DSP CPU cycles, for XWR14xx: R4F CPU cycles */
|
||||
uint32_t timeCpuCycles;
|
||||
|
||||
/*! @brief Number of detected objects */
|
||||
uint32_t numDetectedObj;
|
||||
|
||||
/*! @brief Number of TLVs */
|
||||
uint32_t numTLVs;
|
||||
|
||||
/*! @brief Sub-frame Number (not used with XWR14xx) */
|
||||
uint32_t subFrameNumber;
|
||||
};
|
||||
|
||||
// Detected object structure for mmWave SDK 1.x and 2.x
|
||||
struct MmwDemo_DetectedObj
|
||||
{
|
||||
uint16_t rangeIdx; /*!< @brief Range index */
|
||||
uint16_t dopplerIdx; /*!< @brief Dopler index */
|
||||
uint16_t peakVal; /*!< @brief Peak value */
|
||||
int16_t x; /*!< @brief x - coordinate in meters. Q format depends on the range resolution */
|
||||
int16_t y; /*!< @brief y - coordinate in meters. Q format depends on the range resolution */
|
||||
int16_t z; /*!< @brief z - coordinate in meters. Q format depends on the range resolution */
|
||||
};
|
||||
|
||||
// Detected object structures for mmWave SDK 3.x (DPIF_PointCloudCartesian_t and DPIF_PointCloudSideInfo_t)
|
||||
|
||||
/**
|
||||
* @brief
|
||||
* Point cloud definition in Cartesian coordinate system - floating point format
|
||||
*
|
||||
*/
|
||||
typedef struct DPIF_PointCloudCartesian_t
|
||||
{
|
||||
/*! @brief x - coordinate in meters */
|
||||
float x;
|
||||
|
||||
/*! @brief y - coordinate in meters */
|
||||
float y;
|
||||
|
||||
/*! @brief z - coordinate in meters */
|
||||
float z;
|
||||
|
||||
/*! @brief Doppler velocity estimate in m/s. Positive velocity means target
|
||||
* is moving away from the sensor and negative velocity means target
|
||||
* is moving towards the sensor. */
|
||||
float velocity;
|
||||
}DPIF_PointCloudCartesian;
|
||||
|
||||
/**
|
||||
* @brief
|
||||
* Point cloud side information such as SNR and noise level
|
||||
*
|
||||
*/
|
||||
typedef struct DPIF_PointCloudSideInfo_t
|
||||
{
|
||||
/*! @brief snr - CFAR cell to side noise ratio in dB expressed in 0.1 steps of dB */
|
||||
int16_t snr;
|
||||
|
||||
/*! @brief y - CFAR noise level of the side of the detected cell in dB expressed in 0.1 steps of dB */
|
||||
int16_t noise;
|
||||
}DPIF_PointCloudSideInfo;
|
||||
|
||||
|
||||
struct mmwDataPacket{
|
||||
MmwDemo_output_message_header_t header;
|
||||
uint16_t numObjOut;
|
||||
uint16_t xyzQFormat; // only used for SDK 1.x and 2.x
|
||||
MmwDemo_DetectedObj objOut; // only used for SDK 1.x and 2.x
|
||||
|
||||
DPIF_PointCloudCartesian_t newObjOut; // used for SDK 3.x
|
||||
DPIF_PointCloudSideInfo_t sideInfo; // used for SDK 3.x
|
||||
};
|
||||
|
||||
const uint8_t magicWord[8] = {2, 1, 4, 3, 6, 5, 8, 7};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,83 +1,83 @@
|
||||
/*
|
||||
* mmWaveCommSrv.hpp
|
||||
*
|
||||
* This file defines a ROS nodelet which will open up a serial port provided by the user
|
||||
* at a certain baud rate (also provided by user) that will interface with the 1443EVM mmwDemo
|
||||
* User UART to be used for board configuration.
|
||||
*
|
||||
*
|
||||
* Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com/
|
||||
*
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Neither the name of Texas Instruments Incorporated 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
|
||||
* OWNER 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.
|
||||
*
|
||||
*/
|
||||
#ifndef MMWAVE_COMM_SRV_H
|
||||
#define MMWAVE_COMM_SRV_H
|
||||
|
||||
/*Include ROS specific headers*/
|
||||
#include "ros/ros.h"
|
||||
#include "std_msgs/String.h"
|
||||
#include "serial/serial.h"
|
||||
#include <pluginlib/class_list_macros.h>
|
||||
#include <nodelet/nodelet.h>
|
||||
|
||||
/*Include standard C/C++ headers*/
|
||||
#include <iostream>
|
||||
#include <cstdio>
|
||||
#include <sstream>
|
||||
|
||||
/*mmWave Driver Headers*/
|
||||
#include <ti_mmwave_rospkg/mmWaveCLI.h>
|
||||
|
||||
namespace ti_mmwave_rospkg
|
||||
{
|
||||
|
||||
class mmWaveCommSrv : public nodelet::Nodelet
|
||||
{
|
||||
public:
|
||||
|
||||
mmWaveCommSrv();
|
||||
|
||||
private:
|
||||
|
||||
virtual void onInit();
|
||||
|
||||
bool commSrv_cb(ti_mmwave_rospkg::mmWaveCLI::Request &req, ti_mmwave_rospkg::mmWaveCLI::Response &res);
|
||||
|
||||
ros::ServiceServer commSrv;
|
||||
|
||||
std::string mySerialPort;
|
||||
|
||||
int myBaudRate;
|
||||
}; //Class mmWaveCommSrv
|
||||
|
||||
} //namespace ti_mmwave_rospkg
|
||||
|
||||
#endif
|
||||
/*
|
||||
* mmWaveCommSrv.hpp
|
||||
*
|
||||
* This file defines a ROS nodelet which will open up a serial port provided by the user
|
||||
* at a certain baud rate (also provided by user) that will interface with the 1443EVM mmwDemo
|
||||
* User UART to be used for board configuration.
|
||||
*
|
||||
*
|
||||
* Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com/
|
||||
*
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Neither the name of Texas Instruments Incorporated 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
|
||||
* OWNER 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.
|
||||
*
|
||||
*/
|
||||
#ifndef MMWAVE_COMM_SRV_H
|
||||
#define MMWAVE_COMM_SRV_H
|
||||
|
||||
/*Include ROS specific headers*/
|
||||
#include "ros/ros.h"
|
||||
#include "std_msgs/String.h"
|
||||
#include "serial/serial.h"
|
||||
#include <pluginlib/class_list_macros.h>
|
||||
#include <nodelet/nodelet.h>
|
||||
|
||||
/*Include standard C/C++ headers*/
|
||||
#include <iostream>
|
||||
#include <cstdio>
|
||||
#include <sstream>
|
||||
|
||||
/*mmWave Driver Headers*/
|
||||
#include <ti_mmwave_rospkg/mmWaveCLI.h>
|
||||
|
||||
namespace ti_mmwave_rospkg
|
||||
{
|
||||
|
||||
class mmWaveCommSrv : public nodelet::Nodelet
|
||||
{
|
||||
public:
|
||||
|
||||
mmWaveCommSrv();
|
||||
|
||||
private:
|
||||
|
||||
virtual void onInit();
|
||||
|
||||
bool commSrv_cb(ti_mmwave_rospkg::mmWaveCLI::Request &req, ti_mmwave_rospkg::mmWaveCLI::Response &res);
|
||||
|
||||
ros::ServiceServer commSrv;
|
||||
|
||||
std::string mySerialPort;
|
||||
|
||||
int myBaudRate;
|
||||
}; //Class mmWaveCommSrv
|
||||
|
||||
} //namespace ti_mmwave_rospkg
|
||||
|
||||
#endif
|
||||
@@ -1,80 +1,80 @@
|
||||
/*
|
||||
* mmWaveDataHdl.hpp
|
||||
*
|
||||
* This file defines a ROS nodelet which will open up a serial port provided by the user
|
||||
* at a certain baud rate (also provided by user) that will interface with the 1443EVM mmwDemo
|
||||
* Data UART to be used for board configuration.
|
||||
*
|
||||
*
|
||||
* Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com/
|
||||
*
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Neither the name of Texas Instruments Incorporated 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
|
||||
* OWNER 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.
|
||||
*
|
||||
*/
|
||||
#ifndef MMWAVE_DATA_HDL_H
|
||||
#define MMWAVE_DATA_HDL_H
|
||||
|
||||
/*Include ROS specific headers*/
|
||||
#include "ros/ros.h"
|
||||
#include "std_msgs/String.h"
|
||||
#include "serial/serial.h"
|
||||
#include <pluginlib/class_list_macros.h>
|
||||
#include <nodelet/nodelet.h>
|
||||
|
||||
/*Include standard C/C++ headers*/
|
||||
#include <iostream>
|
||||
#include <cstdio>
|
||||
#include <sstream>
|
||||
|
||||
/*mmWave Driver Headers*/
|
||||
#include "DataHandlerClass.h"
|
||||
|
||||
namespace ti_mmwave_rospkg
|
||||
{
|
||||
|
||||
class mmWaveDataHdl : public nodelet::Nodelet
|
||||
{
|
||||
public:
|
||||
|
||||
mmWaveDataHdl();
|
||||
|
||||
private:
|
||||
|
||||
virtual void onInit();
|
||||
|
||||
//char* mySerialPort;
|
||||
|
||||
//int myBaudRate;
|
||||
|
||||
}; //Class mmWaveDataHdl
|
||||
|
||||
} //namespace ti_mmwave_rospkg
|
||||
|
||||
#endif
|
||||
/*
|
||||
* mmWaveDataHdl.hpp
|
||||
*
|
||||
* This file defines a ROS nodelet which will open up a serial port provided by the user
|
||||
* at a certain baud rate (also provided by user) that will interface with the 1443EVM mmwDemo
|
||||
* Data UART to be used for board configuration.
|
||||
*
|
||||
*
|
||||
* Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com/
|
||||
*
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Neither the name of Texas Instruments Incorporated 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
|
||||
* OWNER 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.
|
||||
*
|
||||
*/
|
||||
#ifndef MMWAVE_DATA_HDL_H
|
||||
#define MMWAVE_DATA_HDL_H
|
||||
|
||||
/*Include ROS specific headers*/
|
||||
#include "ros/ros.h"
|
||||
#include "std_msgs/String.h"
|
||||
#include "serial/serial.h"
|
||||
#include <pluginlib/class_list_macros.h>
|
||||
#include <nodelet/nodelet.h>
|
||||
|
||||
/*Include standard C/C++ headers*/
|
||||
#include <iostream>
|
||||
#include <cstdio>
|
||||
#include <sstream>
|
||||
|
||||
/*mmWave Driver Headers*/
|
||||
#include "DataHandlerClass.h"
|
||||
|
||||
namespace ti_mmwave_rospkg
|
||||
{
|
||||
|
||||
class mmWaveDataHdl : public nodelet::Nodelet
|
||||
{
|
||||
public:
|
||||
|
||||
mmWaveDataHdl();
|
||||
|
||||
private:
|
||||
|
||||
virtual void onInit();
|
||||
|
||||
//char* mySerialPort;
|
||||
|
||||
//int myBaudRate;
|
||||
|
||||
}; //Class mmWaveDataHdl
|
||||
|
||||
} //namespace ti_mmwave_rospkg
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,9 @@
|
||||
<launch>
|
||||
|
||||
<!-- Call mmWave sensor launch file -->
|
||||
<include file="$(find ti_mmwave_rospkg)/launch/bubble_sensor_north.launch"> </include>
|
||||
<include file="$(find ti_mmwave_rospkg)/launch/bubble_sensor_east.launch"> </include>
|
||||
<include file="$(find ti_mmwave_rospkg)/launch/bubble_sensor_south.launch"> </include>
|
||||
<include file="$(find ti_mmwave_rospkg)/launch/bubble_sensor_west.launch"> </include>
|
||||
|
||||
</launch>
|
||||
@@ -0,0 +1,30 @@
|
||||
<!--
|
||||
This file will launch rViz along with the mmWave sensor node and configure a TI mmWave 1642 sensor using a 2D config
|
||||
-->
|
||||
|
||||
<launch>
|
||||
|
||||
<!-- Input arguments -->
|
||||
<arg name="device" doc="TI mmWave sensor device type [1443, 1642]"/>
|
||||
<arg name="config" doc="TI mmWave sensor device configuration [3d_best_range_res (not supported by 1642 EVM), 2d_best_range_res]"/>
|
||||
<arg name="max_allowed_elevation_angle_deg" default="90" doc="Maximum allowed elevation angle in degrees for detected object data [0 > value >= 90]}"/>
|
||||
<arg name="max_allowed_azimuth_angle_deg" default="90" doc="Maximum allowed azimuth angle in degrees for detected object data [0 > value >= 90]}"/>
|
||||
|
||||
<!-- mmWave_Manager node -->
|
||||
<node pkg="ti_mmwave_rospkg" type="ti_mmwave_rospkg" name="ti_mmwave" ns="radar_1" output="screen">
|
||||
<param name="command_port" value="/dev/mmWave_00D83B95_00" />
|
||||
<param name="command_rate" value="115200" />
|
||||
<param name="data_port" value="/dev/mmWave_00D83B95_01" />
|
||||
<param name="data_rate" value="921600" />
|
||||
<param name="max_allowed_elevation_angle_deg" value="$(arg max_allowed_elevation_angle_deg)" />
|
||||
<param name="max_allowed_azimuth_angle_deg" value="$(arg max_allowed_azimuth_angle_deg)" />
|
||||
<param name="frame_id" value="/ti_mmwave_1"/>
|
||||
<remap from="/ti_mmwave/radar_scan_pcl" to="/ti_mmwave/radar_scan_pcl_1"/>
|
||||
</node>
|
||||
|
||||
<!-- mmWaveQuickConfig node (terminates after configuring mmWave sensor) -->
|
||||
<node pkg="ti_mmwave_rospkg" type="mmWaveQuickConfig" name="ti_mmwave_config" ns="radar_1" args="$(find ti_mmwave_rospkg)/cfg/$(arg device)_$(arg config).cfg" output="screen" />
|
||||
|
||||
<node pkg="tf" type="static_transform_publisher" name="radar_baselink_1" args="0 -0.19 0.18 1.57 3.1415 0 base_link ti_mmwave_1 100"/>
|
||||
|
||||
</launch>
|
||||
@@ -0,0 +1,32 @@
|
||||
<!--
|
||||
This file will launch rViz along with the mmWave sensor node and configure a TI mmWave 1642 sensor using a 2D config
|
||||
-->
|
||||
|
||||
<launch>
|
||||
|
||||
<!-- Input arguments -->
|
||||
<arg name="device" doc="TI mmWave sensor device type [1443, 1642]"/>
|
||||
<arg name="config" doc="TI mmWave sensor device configuration [3d_best_range_res (not supported by 1642 EVM), 2d_best_range_res]"/>
|
||||
<arg name="max_allowed_elevation_angle_deg" default="90" doc="Maximum allowed elevation angle in degrees for detected object data [0 > value >= 90]}"/>
|
||||
<arg name="max_allowed_azimuth_angle_deg" default="90" doc="Maximum allowed azimuth angle in degrees for detected object data [0 > value >= 90]}"/>
|
||||
|
||||
<!-- mmWave_Manager node -->
|
||||
<node pkg="ti_mmwave_rospkg" type="ti_mmwave_rospkg" name="ti_mmwave" ns="radar_0" output="screen">
|
||||
<param name="command_port" value="/dev/mmWave_00CE0FCA_00" />
|
||||
<param name="command_rate" value="115200" />
|
||||
<param name="data_port" value="/dev/mmWave_00CE0FCA_01" />
|
||||
<param name="data_rate" value="921600" />
|
||||
<param name="max_allowed_elevation_angle_deg" value="$(arg max_allowed_elevation_angle_deg)" />
|
||||
<param name="max_allowed_azimuth_angle_deg" value="$(arg max_allowed_azimuth_angle_deg)" />
|
||||
<param name="frame_id" value="/ti_mmwave_0"/>
|
||||
<remap from="/ti_mmwave/radar_scan_pcl" to="/ti_mmwave/radar_scan_pcl_0"/>
|
||||
</node>
|
||||
|
||||
<!-- mmWaveQuickConfig node (terminates after configuring mmWave sensor) -->
|
||||
<node pkg="ti_mmwave_rospkg" type="mmWaveQuickConfig" name="ti_mmwave_config" ns="radar_0" args="$(find ti_mmwave_rospkg)/cfg/$(arg device)_$(arg config).cfg" output="screen" />
|
||||
|
||||
<node pkg="tf" type="static_transform_publisher" name="radar_baselink_0" args="0.19 0 0.18 0 0 3.1415 base_link ti_mmwave_0 100"/>
|
||||
<!--
|
||||
<node pkg="rviz" type="rviz" name="rviz" args="-d $(find ti_mmwave_rospkg)/launch/rviz/ti_mmwave_multi.rviz"/>
|
||||
-->
|
||||
</launch>
|
||||
@@ -0,0 +1,30 @@
|
||||
<!--
|
||||
This file will launch rViz along with the mmWave sensor node and configure a TI mmWave 1642 sensor using a 2D config
|
||||
-->
|
||||
|
||||
<launch>
|
||||
|
||||
<!-- Input arguments -->
|
||||
<arg name="device" doc="TI mmWave sensor device type [1443, 1642]"/>
|
||||
<arg name="config" doc="TI mmWave sensor device configuration [3d_best_range_res (not supported by 1642 EVM), 2d_best_range_res]"/>
|
||||
<arg name="max_allowed_elevation_angle_deg" default="90" doc="Maximum allowed elevation angle in degrees for detected object data [0 > value >= 90]}"/>
|
||||
<arg name="max_allowed_azimuth_angle_deg" default="90" doc="Maximum allowed azimuth angle in degrees for detected object data [0 > value >= 90]}"/>
|
||||
|
||||
<!-- mmWave_Manager node -->
|
||||
<node pkg="ti_mmwave_rospkg" type="ti_mmwave_rospkg" name="ti_mmwave" ns="radar_2" output="screen">
|
||||
<param name="command_port" value="/dev/mmWave_00CE0E81_00" />
|
||||
<param name="command_rate" value="115200" />
|
||||
<param name="data_port" value="/dev/mmWave_00CE0E81_01" />
|
||||
<param name="data_rate" value="921600" />
|
||||
<param name="max_allowed_elevation_angle_deg" value="$(arg max_allowed_elevation_angle_deg)" />
|
||||
<param name="max_allowed_azimuth_angle_deg" value="$(arg max_allowed_azimuth_angle_deg)" />
|
||||
<param name="frame_id" value="/ti_mmwave_2"/>
|
||||
<remap from="/ti_mmwave/radar_scan_pcl" to="/ti_mmwave/radar_scan_pcl_2"/>
|
||||
</node>
|
||||
|
||||
<!-- mmWaveQuickConfig node (terminates after configuring mmWave sensor) -->
|
||||
<node pkg="ti_mmwave_rospkg" type="mmWaveQuickConfig" name="ti_mmwave_config" ns="radar_2" args="$(find ti_mmwave_rospkg)/cfg/$(arg device)_$(arg config).cfg" output="screen" />
|
||||
|
||||
<node pkg="tf" type="static_transform_publisher" name="radar_baselink_2" args="-.19 0 0.18 3.14 0 3.14 base_link ti_mmwave_2 100"/>
|
||||
|
||||
</launch>
|
||||
@@ -0,0 +1,30 @@
|
||||
<!--
|
||||
This file will launch rViz along with the mmWave sensor node and configure a TI mmWave 1642 sensor using a 2D config
|
||||
-->
|
||||
|
||||
<launch>
|
||||
|
||||
<!-- Input arguments -->
|
||||
<arg name="device" doc="TI mmWave sensor device type [1443, 1642]"/>
|
||||
<arg name="config" doc="TI mmWave sensor device configuration [3d_best_range_res (not supported by 1642 EVM), 2d_best_range_res]"/>
|
||||
<arg name="max_allowed_elevation_angle_deg" default="90" doc="Maximum allowed elevation angle in degrees for detected object data [0 > value >= 90]}"/>
|
||||
<arg name="max_allowed_azimuth_angle_deg" default="90" doc="Maximum allowed azimuth angle in degrees for detected object data [0 > value >= 90]}"/>
|
||||
|
||||
<!-- mmWave_Manager node -->
|
||||
<node pkg="ti_mmwave_rospkg" type="ti_mmwave_rospkg" name="ti_mmwave" ns="radar_3" output="screen">
|
||||
<param name="command_port" value="/dev/mmWave_00CE0FCD_00" />
|
||||
<param name="command_rate" value="115200" />
|
||||
<param name="data_port" value="/dev/mmWave_00CE0FCD_01" />
|
||||
<param name="data_rate" value="921600" />
|
||||
<param name="max_allowed_elevation_angle_deg" value="$(arg max_allowed_elevation_angle_deg)" />
|
||||
<param name="max_allowed_azimuth_angle_deg" value="$(arg max_allowed_azimuth_angle_deg)" />
|
||||
<param name="frame_id" value="/ti_mmwave_3"/>
|
||||
<remap from="/ti_mmwave/radar_scan_pcl" to="/ti_mmwave/radar_scan_pcl_3"/>
|
||||
</node>
|
||||
|
||||
<!-- mmWaveQuickConfig node (terminates after configuring mmWave sensor) -->
|
||||
<node pkg="ti_mmwave_rospkg" type="mmWaveQuickConfig" name="ti_mmwave_config" ns="radar_3" args="$(find ti_mmwave_rospkg)/cfg/$(arg device)_$(arg config).cfg" output="screen" />
|
||||
|
||||
<node pkg="tf" type="static_transform_publisher" name="radar_baselink_3" args="0 0.19 0.18 -1.57 3.1415 0 base_link ti_mmwave_3 100"/>
|
||||
|
||||
</launch>
|
||||
40
autonomous_robotics_ros/src/ti_mmwave_rospkg/launch/camera_overlay.launch
Executable file
40
autonomous_robotics_ros/src/ti_mmwave_rospkg/launch/camera_overlay.launch
Executable file
@@ -0,0 +1,40 @@
|
||||
<launch>
|
||||
<arg name="device" value="1642" doc="TI mmWave sensor device type [1443, 1642]"/>
|
||||
<arg name="config" value="2d" doc="TI mmWave sensor device configuration [3d_best_range_res (not supported by 1642 EVM), 2d_best_range_res]"/>
|
||||
<arg name="max_allowed_elevation_angle_deg" default="90" doc="Maximum allowed elevation angle in degrees for detected object data [0 > value >= 90]}"/>
|
||||
<arg name="max_allowed_azimuth_angle_deg" default="90" doc="Maximum allowed azimuth angle in degrees for detected object data [0 > value >= 90]}"/>
|
||||
|
||||
<node name="usb_webcam" pkg="usb_webcam" type="usb_webcam_node" output="screen" >
|
||||
<param name="video_device" value="/dev/video1" />
|
||||
<param name="camera_info_url" value="file:///home/leo/workspace/usb_webcam/src/cfg/elp-usb8mp02g-l36.yaml" />
|
||||
<param name="image_width" value="640" />
|
||||
<param name="image_height" value="480" />
|
||||
<param name="pixel_format" value="yuyv" />
|
||||
<param name="camera_frame_id" value="usb_webcam" />
|
||||
<param name="io_method" value="mmap"/>
|
||||
<param name="framerate" value="30" />
|
||||
<param name="autoexposure" value="true" />
|
||||
<param name="autofocus" value="true" />
|
||||
</node>
|
||||
|
||||
<node pkg="ti_mmwave_rospkg" type="ti_mmwave_rospkg" name="ti_mmwave" ns="radar_0" output="screen">
|
||||
<param name="command_port" value="/dev/ttyACM0" />
|
||||
<param name="command_rate" value="115200" />
|
||||
<param name="data_port" value="/dev/ttyACM1" />
|
||||
<param name="data_rate" value="921600" />
|
||||
<param name="max_allowed_elevation_angle_deg" value="$(arg max_allowed_elevation_angle_deg)" />
|
||||
<param name="max_allowed_azimuth_angle_deg" value="$(arg max_allowed_azimuth_angle_deg)" />
|
||||
<param name="frame_id" value="/ti_mmwave_0"/>
|
||||
<remap from="/ti_mmwave/radar_scan_pcl" to="/ti_mmwave/radar_scan_pcl_0"/>
|
||||
</node>
|
||||
|
||||
<node pkg="ti_mmwave_rospkg" type="mmWaveQuickConfig" name="mmWaveQuickConfig" ns="radar_0" args="$(find ti_mmwave_rospkg)/cfg/1642es2_short_range.cfg" output="screen" />
|
||||
|
||||
<node pkg="tf" type="static_transform_publisher" name="radar_baselink" args="0 0 0 0 0 0 ti_mmwave_pcl ti_mmwave_0 100"/>
|
||||
|
||||
<node pkg="tf" type="static_transform_publisher" name="camera_baselink" args="-2 0 .95 -1.5707963267948966 0 -1.5707963267948966 ti_mmwave_pcl usb_webcam 100"/>
|
||||
|
||||
<!-- Launch Rviz with pre-defined configuration to view mmWave sensor detected object data (color by intensity) -->
|
||||
<node pkg="rviz" type="rviz" name="rviz" args="-d $(find ti_mmwave_rospkg)/launch/rviz/ti_mmwave_camera_overlay.rviz"/>
|
||||
|
||||
</launch>
|
||||
@@ -12,15 +12,19 @@
|
||||
|
||||
<!-- mmWave_Manager node -->
|
||||
<node pkg="ti_mmwave_rospkg" type="ti_mmwave_rospkg" name="mmWave_Manager" output="screen">
|
||||
<param name="command_port" value="/dev/ttyACM0" />
|
||||
<param name="command_port" value="/dev/mmWave_00CE0FCA_00" />
|
||||
<param name="command_rate" value="115200" />
|
||||
<param name="data_port" value="/dev/ttyACM1" />
|
||||
<param name="data_port" value="/dev/mmWave_00CE0FCA_01" />
|
||||
<param name="data_rate" value="921600" />
|
||||
<param name="max_allowed_elevation_angle_deg" value="$(arg max_allowed_elevation_angle_deg)" />
|
||||
<param name="max_allowed_azimuth_angle_deg" value="$(arg max_allowed_azimuth_angle_deg)" />
|
||||
<param name="frame_id" value="/ti_mmwave"/>
|
||||
<remap from="/ti_mmwave/radar_scan_pcl" to="/ti_mmwave/radar_scan_pcl"/>
|
||||
</node>
|
||||
|
||||
<!-- mmWaveQuickConfig node (terminates after configuring mmWave sensor) -->
|
||||
<node pkg="ti_mmwave_rospkg" type="mmWaveQuickConfig" name="mmWaveQuickConfig" args="$(find ti_mmwave_rospkg)/cfg/$(arg device)_$(arg config).cfg" output="screen" />
|
||||
|
||||
<node pkg="tf" type="static_transform_publisher" name="radar_baselink_0" args="0.19 0 0.18 0 0 3.1415 base_link ti_mmwave 100"/>
|
||||
|
||||
</launch>
|
||||
32
autonomous_robotics_ros/ti_mmwave_rospkg/mmWave_nodelets.xml → autonomous_robotics_ros/src/ti_mmwave_rospkg/mmWave_nodelets.xml
Normal file → Executable file
32
autonomous_robotics_ros/ti_mmwave_rospkg/mmWave_nodelets.xml → autonomous_robotics_ros/src/ti_mmwave_rospkg/mmWave_nodelets.xml
Normal file → Executable file
@@ -1,16 +1,16 @@
|
||||
<library path="lib/libmmwave">
|
||||
<class name="ti_mmwave_rospkg/mmWaveCommSrv" type="ti_mmwave_rospkg::mmWaveCommSrv" base_class_type="nodelet::Nodelet">
|
||||
<description>
|
||||
Command Service Nodelet
|
||||
</description>
|
||||
</class>
|
||||
|
||||
<class name="ti_mmwave_rospkg/mmWaveDataHdl" type="ti_mmwave_rospkg::mmWaveDataHdl" base_class_type="nodelet::Nodelet">
|
||||
<description>
|
||||
Data Handler Nodelet
|
||||
</description>
|
||||
</class>
|
||||
|
||||
<depend>serial</depend>
|
||||
|
||||
</library>
|
||||
<library path="lib/libmmwave">
|
||||
<class name="ti_mmwave_rospkg/mmWaveCommSrv" type="ti_mmwave_rospkg::mmWaveCommSrv" base_class_type="nodelet::Nodelet">
|
||||
<description>
|
||||
Command Service Nodelet
|
||||
</description>
|
||||
</class>
|
||||
|
||||
<class name="ti_mmwave_rospkg/mmWaveDataHdl" type="ti_mmwave_rospkg::mmWaveDataHdl" base_class_type="nodelet::Nodelet">
|
||||
<description>
|
||||
Data Handler Nodelet
|
||||
</description>
|
||||
</class>
|
||||
|
||||
<depend>serial</depend>
|
||||
|
||||
</library>
|
||||
10
autonomous_robotics_ros/src/ti_mmwave_rospkg/msg/RadarScan.msg
Executable file
10
autonomous_robotics_ros/src/ti_mmwave_rospkg/msg/RadarScan.msg
Executable file
@@ -0,0 +1,10 @@
|
||||
Header header
|
||||
uint16 point_id
|
||||
float32 x
|
||||
float32 y
|
||||
float32 z
|
||||
float32 range
|
||||
float32 velocity
|
||||
uint16 doppler_bin
|
||||
float32 bearing
|
||||
float32 intensity
|
||||
118
autonomous_robotics_ros/ti_mmwave_rospkg/package.xml → autonomous_robotics_ros/src/ti_mmwave_rospkg/package.xml
Normal file → Executable file
118
autonomous_robotics_ros/ti_mmwave_rospkg/package.xml → autonomous_robotics_ros/src/ti_mmwave_rospkg/package.xml
Normal file → Executable file
@@ -1,59 +1,59 @@
|
||||
<?xml version="1.0"?>
|
||||
<package>
|
||||
<name>ti_mmwave_rospkg</name>
|
||||
<version>1.5.0</version>
|
||||
<description>The ti_mmwave_rospkg package</description>
|
||||
|
||||
<!-- One maintainer tag required, multiple allowed, one person per tag -->
|
||||
<!-- Example: -->
|
||||
<!-- <maintainer email="jane.doe@example.com">Jane Doe</maintainer> -->
|
||||
<maintainer email="maintainer@example.com">maintainer</maintainer>
|
||||
|
||||
|
||||
<!-- One license tag required, multiple allowed, one license per tag -->
|
||||
<!-- Commonly used license strings: -->
|
||||
<!-- BSD, MIT, Boost Software License, GPLv2, GPLv3, LGPLv2.1, LGPLv3 -->
|
||||
<license>BSD</license>
|
||||
|
||||
|
||||
<!-- Url tags are optional, but multiple are allowed, one per tag -->
|
||||
<!-- Optional attribute type can be: website, bugtracker, or repository -->
|
||||
<!-- Example: -->
|
||||
<!-- <url type="website">http://wiki.ros.org/ti_mmwave_rospkg</url> -->
|
||||
|
||||
|
||||
<!-- Author tags are optional, multiple are allowed, one per tag -->
|
||||
<!-- Authors do not have to be maintainers, but could be -->
|
||||
<!-- Example: -->
|
||||
<!-- <author email="jane.doe@example.com">Jane Doe</author> -->
|
||||
|
||||
|
||||
<!-- The *_depend tags are used to specify dependencies -->
|
||||
<!-- Dependencies can be catkin packages or system dependencies -->
|
||||
<!-- Examples: -->
|
||||
<!-- Use build_depend for packages you need at compile time: -->
|
||||
<!-- <build_depend>message_generation</build_depend> -->
|
||||
<!-- Use buildtool_depend for build tool packages: -->
|
||||
<!-- <buildtool_depend>catkin</buildtool_depend> -->
|
||||
<!-- Use run_depend for packages you need at runtime: -->
|
||||
<!-- <run_depend>message_runtime</run_depend> -->
|
||||
<!-- Use test_depend for packages you need only for testing: -->
|
||||
<!-- <test_depend>gtest</test_depend> -->
|
||||
<buildtool_depend>catkin</buildtool_depend>
|
||||
<build_depend>nodelet</build_depend>
|
||||
<build_depend>roscpp</build_depend>
|
||||
<build_depend>serial</build_depend>
|
||||
<build_depend>std_msgs</build_depend>
|
||||
<build_depend>message_generation</build_depend>
|
||||
<run_depend>nodelet</run_depend>
|
||||
<run_depend>roscpp</run_depend>
|
||||
<run_depend>serial</run_depend>
|
||||
<run_depend>std_msgs</run_depend>
|
||||
<run_depend>message_runtime</run_depend>
|
||||
|
||||
<!-- The export tag contains other, unspecified, tags -->
|
||||
<export>
|
||||
<nodelet plugin="${prefix}/mmWave_nodelets.xml" />
|
||||
</export>
|
||||
|
||||
</package>
|
||||
<?xml version="1.0"?>
|
||||
<package>
|
||||
<name>ti_mmwave_rospkg</name>
|
||||
<version>3.3.0</version>
|
||||
<description>The ti_mmwave_rospkg package. Publish messages with doppler information. Multi-sensor and camera overlay support. Modified by Leo Zhang</description>
|
||||
|
||||
<!-- One maintainer tag required, multiple allowed, one person per tag -->
|
||||
<!-- Example: -->
|
||||
<!-- <maintainer email="jane.doe@example.com">Jane Doe</maintainer> -->
|
||||
<maintainer email="dr.leo.zhang@outlook.com">Leo Zhang</maintainer>
|
||||
|
||||
|
||||
<!-- One license tag required, multiple allowed, one license per tag -->
|
||||
<!-- Commonly used license strings: -->
|
||||
<!-- BSD, MIT, Boost Software License, GPLv2, GPLv3, LGPLv2.1, LGPLv3 -->
|
||||
<license>BSD</license>
|
||||
|
||||
|
||||
<!-- Url tags are optional, but multiple are allowed, one per tag -->
|
||||
<!-- Optional attribute type can be: website, bugtracker, or repository -->
|
||||
<!-- Example: -->
|
||||
<url type="website">https://github.com/radar-lab/ti_mmwave_rospkg</url> -->
|
||||
|
||||
|
||||
<!-- Author tags are optional, multiple are allowed, one per tag -->
|
||||
<!-- Authors do not have to be maintainers, but could be -->
|
||||
<!-- Example: -->
|
||||
<author email="dr.leo.zhang@outlook.com">Leo Zhang</author>
|
||||
|
||||
|
||||
<!-- The *_depend tags are used to specify dependencies -->
|
||||
<!-- Dependencies can be catkin packages or system dependencies -->
|
||||
<!-- Examples: -->
|
||||
<!-- Use build_depend for packages you need at compile time: -->
|
||||
<!-- <build_depend>message_generation</build_depend> -->
|
||||
<!-- Use buildtool_depend for build tool packages: -->
|
||||
<!-- <buildtool_depend>catkin</buildtool_depend> -->
|
||||
<!-- Use run_depend for packages you need at runtime: -->
|
||||
<!-- <run_depend>message_runtime</run_depend> -->
|
||||
<!-- Use test_depend for packages you need only for testing: -->
|
||||
<!-- <test_depend>gtest</test_depend> -->
|
||||
<buildtool_depend>catkin</buildtool_depend>
|
||||
<build_depend>nodelet</build_depend>
|
||||
<build_depend>roscpp</build_depend>
|
||||
<build_depend>serial</build_depend>
|
||||
<build_depend>std_msgs</build_depend>
|
||||
<build_depend>message_generation</build_depend>
|
||||
<run_depend>nodelet</run_depend>
|
||||
<run_depend>roscpp</run_depend>
|
||||
<run_depend>serial</run_depend>
|
||||
<run_depend>std_msgs</run_depend>
|
||||
<run_depend>message_runtime</run_depend>
|
||||
|
||||
<!-- The export tag contains other, unspecified, tags -->
|
||||
<export>
|
||||
<nodelet plugin="${prefix}/mmWave_nodelets.xml" />
|
||||
</export>
|
||||
|
||||
</package>
|
||||
1732
autonomous_robotics_ros/ti_mmwave_rospkg/src/DataHandlerClass.cpp → autonomous_robotics_ros/src/ti_mmwave_rospkg/src/DataHandlerClass.cpp
Normal file → Executable file
1732
autonomous_robotics_ros/ti_mmwave_rospkg/src/DataHandlerClass.cpp → autonomous_robotics_ros/src/ti_mmwave_rospkg/src/DataHandlerClass.cpp
Normal file → Executable file
File diff suppressed because it is too large
Load Diff
155
autonomous_robotics_ros/src/ti_mmwave_rospkg/src/ParameterParser.cpp
Executable file
155
autonomous_robotics_ros/src/ti_mmwave_rospkg/src/ParameterParser.cpp
Executable file
@@ -0,0 +1,155 @@
|
||||
/*
|
||||
* @file ParameterParser.cpp
|
||||
*
|
||||
* @brief
|
||||
* Calculates parameters from QuickConfig.
|
||||
*
|
||||
* \par
|
||||
* NOTE:
|
||||
* (C) Copyright 2020 Texas Instruments, Inc.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Neither the name of Texas Instruments Incorporated 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
|
||||
* OWNER 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.
|
||||
*/
|
||||
#include "ParameterParser.h"
|
||||
|
||||
namespace ti_mmwave_rospkg {
|
||||
|
||||
PLUGINLIB_EXPORT_CLASS(ti_mmwave_rospkg::ParameterParser, nodelet::Nodelet);
|
||||
|
||||
ParameterParser::ParameterParser() {}
|
||||
|
||||
void ParameterParser::onInit() {}
|
||||
|
||||
void ParameterParser::ParamsParser(ti_mmwave_rospkg::mmWaveCLI &srv, ros::NodeHandle &nh) {
|
||||
|
||||
// ROS_ERROR("%s",srv.request.comm.c_str());
|
||||
// ROS_ERROR("%s",srv.response.resp.c_str());
|
||||
std::vector <std::string> v;
|
||||
std::string s = srv.request.comm.c_str();
|
||||
std::istringstream ss(s);
|
||||
std::string token;
|
||||
std::string req;
|
||||
int i = 0;
|
||||
while (std::getline(ss, token, ' ')) {
|
||||
v.push_back(token);
|
||||
if (i > 0) {
|
||||
if (!req.compare("profileCfg")) {
|
||||
switch (i) {
|
||||
case 2:
|
||||
nh.setParam("/ti_mmwave/startFreq", std::stof(token)); break;
|
||||
case 3:
|
||||
nh.setParam("/ti_mmwave/idleTime", std::stof(token)); break;
|
||||
case 4:
|
||||
nh.setParam("/ti_mmwave/adcStartTime", std::stof(token)); break;
|
||||
case 5:
|
||||
nh.setParam("/ti_mmwave/rampEndTime", std::stof(token)); break;
|
||||
case 8:
|
||||
nh.setParam("/ti_mmwave/freqSlopeConst", std::stof(token)); break;
|
||||
case 10:
|
||||
nh.setParam("/ti_mmwave/numAdcSamples", std::stoi(token)); break;
|
||||
case 11:
|
||||
nh.setParam("/ti_mmwave/digOutSampleRate", std::stof(token)); break;
|
||||
case 14:
|
||||
nh.setParam("/ti_mmwave/rxGain", std::stof(token)); break;
|
||||
}
|
||||
} else if (!req.compare("frameCfg")) {
|
||||
switch (i) {
|
||||
case 1:
|
||||
nh.setParam("/ti_mmwave/chirpStartIdx", std::stoi(token)); break;
|
||||
case 2:
|
||||
nh.setParam("/ti_mmwave/chirpEndIdx", std::stoi(token)); break;
|
||||
case 3:
|
||||
nh.setParam("/ti_mmwave/numLoops", std::stoi(token)); break;
|
||||
case 4:
|
||||
nh.setParam("/ti_mmwave/numFrames", std::stoi(token)); break;
|
||||
case 5:
|
||||
nh.setParam("/ti_mmwave/framePeriodicity", std::stof(token)); break;
|
||||
}
|
||||
}
|
||||
} else req = token;
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
void ParameterParser::CalParams(ros::NodeHandle &nh) {
|
||||
float c0 = 299792458;
|
||||
int chirpStartIdx;
|
||||
int chirpEndIdx;
|
||||
int numLoops;
|
||||
float framePeriodicity;
|
||||
float startFreq;
|
||||
float idleTime;
|
||||
float adcStartTime;
|
||||
float rampEndTime;
|
||||
float digOutSampleRate;
|
||||
float freqSlopeConst;
|
||||
float numAdcSamples;
|
||||
|
||||
nh.getParam("/ti_mmwave/startFreq", startFreq);
|
||||
nh.getParam("/ti_mmwave/idleTime", idleTime);
|
||||
nh.getParam("/ti_mmwave/adcStartTime", adcStartTime);
|
||||
nh.getParam("/ti_mmwave/rampEndTime", rampEndTime);
|
||||
nh.getParam("/ti_mmwave/digOutSampleRate", digOutSampleRate);
|
||||
nh.getParam("/ti_mmwave/freqSlopeConst", freqSlopeConst);
|
||||
nh.getParam("/ti_mmwave/numAdcSamples", numAdcSamples);
|
||||
|
||||
nh.getParam("/ti_mmwave/chirpStartIdx", chirpStartIdx);
|
||||
nh.getParam("/ti_mmwave/chirpEndIdx", chirpEndIdx);
|
||||
nh.getParam("/ti_mmwave/numLoops", numLoops);
|
||||
nh.getParam("/ti_mmwave/framePeriodicity", framePeriodicity);
|
||||
|
||||
int ntx = chirpEndIdx - chirpStartIdx + 1;
|
||||
int nd = numLoops;
|
||||
int nr = numAdcSamples;
|
||||
float tfr = framePeriodicity * 1e-3;
|
||||
float fs = digOutSampleRate * 1e3;
|
||||
float kf = freqSlopeConst * 1e12;
|
||||
float adc_duration = nr / fs;
|
||||
float BW = adc_duration * kf;
|
||||
float PRI = (idleTime + rampEndTime) * 1e-6;
|
||||
float fc = startFreq * 1e9 + kf * (adcStartTime * 1e-6 + adc_duration / 2);
|
||||
|
||||
float vrange = c0 / (2 * BW);
|
||||
float max_range = nr * vrange;
|
||||
float max_vel = c0 / (2 * fc * PRI) / ntx;
|
||||
float vvel = max_vel / nd;
|
||||
|
||||
nh.setParam("/ti_mmwave/num_TX", ntx);
|
||||
nh.setParam("/ti_mmwave/f_s", fs);
|
||||
nh.setParam("/ti_mmwave/f_c", fc);
|
||||
nh.setParam("/ti_mmwave/BW", BW);
|
||||
nh.setParam("/ti_mmwave/PRI", PRI);
|
||||
nh.setParam("/ti_mmwave/t_fr", tfr);
|
||||
nh.setParam("/ti_mmwave/max_range", max_range);
|
||||
nh.setParam("/ti_mmwave/range_resolution", vrange);
|
||||
nh.setParam("/ti_mmwave/max_doppler_vel", max_vel);
|
||||
nh.setParam("/ti_mmwave/doppler_vel_resolution", vvel);
|
||||
}
|
||||
|
||||
}
|
||||
113
autonomous_robotics_ros/src/ti_mmwave_rospkg/src/mmWaveCommSrv.cpp
Executable file
113
autonomous_robotics_ros/src/ti_mmwave_rospkg/src/mmWaveCommSrv.cpp
Executable file
@@ -0,0 +1,113 @@
|
||||
/*
|
||||
* @file mmWaveCommSrv.cpp
|
||||
*
|
||||
* @brief
|
||||
* Communication service responsible for sending CLI commands to sensor.
|
||||
*
|
||||
* \par
|
||||
* NOTE:
|
||||
* (C) Copyright 2020 Texas Instruments, Inc.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Neither the name of Texas Instruments Incorporated 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
|
||||
* OWNER 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.
|
||||
*/
|
||||
#include "mmWaveCommSrv.hpp"
|
||||
|
||||
namespace ti_mmwave_rospkg
|
||||
{
|
||||
|
||||
PLUGINLIB_EXPORT_CLASS(ti_mmwave_rospkg::mmWaveCommSrv, nodelet::Nodelet);
|
||||
|
||||
mmWaveCommSrv::mmWaveCommSrv() {}
|
||||
|
||||
void mmWaveCommSrv::onInit()
|
||||
{
|
||||
ros::NodeHandle private_nh = getPrivateNodeHandle();
|
||||
ros::NodeHandle private_nh2("~"); // follow namespace for multiple sensors
|
||||
|
||||
private_nh2.getParam("command_port", mySerialPort);
|
||||
|
||||
private_nh2.getParam("command_rate", myBaudRate);
|
||||
|
||||
ROS_INFO("mmWaveCommSrv: command_port = %s", mySerialPort.c_str());
|
||||
ROS_INFO("mmWaveCommSrv: command_rate = %d", myBaudRate);
|
||||
|
||||
commSrv = private_nh.advertiseService("/mmWaveCLI", &mmWaveCommSrv::commSrv_cb, this);
|
||||
|
||||
NODELET_DEBUG("mmWaveCommsrv: Finished onInit function");
|
||||
}
|
||||
|
||||
|
||||
bool mmWaveCommSrv::commSrv_cb(mmWaveCLI::Request &req , mmWaveCLI::Response &res) {
|
||||
NODELET_DEBUG("mmWaveCommSrv: Port is \"%s\" and baud rate is %d", mySerialPort.c_str(), myBaudRate);
|
||||
|
||||
/*Open Serial port and error check*/
|
||||
serial::Serial mySerialObject("", myBaudRate, serial::Timeout::simpleTimeout(1000));
|
||||
mySerialObject.setPort(mySerialPort.c_str());
|
||||
try {
|
||||
mySerialObject.open();
|
||||
} catch (std::exception &e1) {
|
||||
ROS_INFO("mmWaveCommSrv: Failed to open User serial port with error: %s", e1.what());
|
||||
ROS_INFO("mmWaveCommSrv: Waiting 20 seconds before trying again...");
|
||||
try {
|
||||
// Wait 20 seconds and try to open serial port again
|
||||
ros::Duration(20).sleep();
|
||||
mySerialObject.open();
|
||||
} catch (std::exception &e2) {
|
||||
ROS_ERROR("mmWaveCommSrv: Failed second time to open User serial port, error: %s", e1.what());
|
||||
NODELET_ERROR("mmWaveCommSrv: Port could not be opened. Port is \"%s\" and baud rate is %d", mySerialPort.c_str(), myBaudRate);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/*Read any previous pending response(s)*/
|
||||
while (mySerialObject.available() > 0)
|
||||
{
|
||||
mySerialObject.readline(res.resp, 1024, ":/>");
|
||||
ROS_INFO("mmWaveCommSrv: Received (previous) response from sensor: '%s'", res.resp.c_str());
|
||||
res.resp = "";
|
||||
}
|
||||
|
||||
/*Send out command received from the client*/
|
||||
ROS_INFO("mmWaveCommSrv: Sending command to sensor: '%s'", req.comm.c_str());
|
||||
req.comm.append("\n");
|
||||
int bytesSent = mySerialObject.write(req.comm.c_str());
|
||||
|
||||
/*Read output from mmwDemo*/
|
||||
mySerialObject.readline(res.resp, 1024, ":/>");
|
||||
ROS_INFO("mmWaveCommSrv: Received response from sensor: '%s'", res.resp.c_str());
|
||||
|
||||
mySerialObject.close();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
89
autonomous_robotics_ros/src/ti_mmwave_rospkg/src/mmWaveDataHdl.cpp
Executable file
89
autonomous_robotics_ros/src/ti_mmwave_rospkg/src/mmWaveDataHdl.cpp
Executable file
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
* @file mmWaveDataHdl.cpp
|
||||
*
|
||||
* @brief
|
||||
* Creates the data handler node and sets parameters.
|
||||
*
|
||||
* \par
|
||||
* NOTE:
|
||||
* (C) Copyright 2020 Texas Instruments, Inc.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Neither the name of Texas Instruments Incorporated 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
|
||||
* OWNER 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.
|
||||
*/
|
||||
#include "mmWaveDataHdl.hpp"
|
||||
#include "DataHandlerClass.h"
|
||||
|
||||
namespace ti_mmwave_rospkg
|
||||
{
|
||||
|
||||
PLUGINLIB_EXPORT_CLASS(ti_mmwave_rospkg::mmWaveDataHdl, nodelet::Nodelet);
|
||||
|
||||
mmWaveDataHdl::mmWaveDataHdl() {}
|
||||
|
||||
void mmWaveDataHdl::onInit()
|
||||
{
|
||||
ros::NodeHandle private_nh("~");
|
||||
|
||||
std::string mySerialPort;
|
||||
std::string myFrameID;
|
||||
int myBaudRate;
|
||||
int myMaxAllowedElevationAngleDeg;
|
||||
int myMaxAllowedAzimuthAngleDeg;
|
||||
|
||||
private_nh.getParam("data_port", mySerialPort);
|
||||
|
||||
private_nh.getParam("data_rate", myBaudRate);
|
||||
|
||||
private_nh.getParam("frame_id", myFrameID);
|
||||
|
||||
if (!(private_nh.getParam("max_allowed_elevation_angle_deg", myMaxAllowedElevationAngleDeg))) {
|
||||
myMaxAllowedElevationAngleDeg = 90; // Use max angle if none specified
|
||||
}
|
||||
|
||||
if (!(private_nh.getParam("max_allowed_azimuth_angle_deg", myMaxAllowedAzimuthAngleDeg))) {
|
||||
myMaxAllowedAzimuthAngleDeg = 90; // Use max angle if none specified
|
||||
}
|
||||
|
||||
ROS_INFO("mmWaveDataHdl: data_port = %s", mySerialPort.c_str());
|
||||
ROS_INFO("mmWaveDataHdl: data_rate = %d", myBaudRate);
|
||||
ROS_INFO("mmWaveDataHdl: max_allowed_elevation_angle_deg = %d", myMaxAllowedElevationAngleDeg);
|
||||
ROS_INFO("mmWaveDataHdl: max_allowed_azimuth_angle_deg = %d", myMaxAllowedAzimuthAngleDeg);
|
||||
|
||||
DataUARTHandler DataHandler(&private_nh);
|
||||
DataHandler.setFrameID( (char*) myFrameID.c_str() );
|
||||
DataHandler.setUARTPort( (char*) mySerialPort.c_str() );
|
||||
DataHandler.setBaudRate( myBaudRate );
|
||||
DataHandler.setMaxAllowedElevationAngleDeg( myMaxAllowedElevationAngleDeg );
|
||||
DataHandler.setMaxAllowedAzimuthAngleDeg( myMaxAllowedAzimuthAngleDeg );
|
||||
DataHandler.start();
|
||||
|
||||
NODELET_DEBUG("mmWaveDataHdl: Finished onInit function");
|
||||
}
|
||||
|
||||
}
|
||||
60
autonomous_robotics_ros/src/ti_mmwave_rospkg/src/mmWaveLoader.cpp
Executable file
60
autonomous_robotics_ros/src/ti_mmwave_rospkg/src/mmWaveLoader.cpp
Executable file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* @file mmWaveLoader.cpp
|
||||
*
|
||||
* @brief
|
||||
* Creates the mmWave Manager node.
|
||||
*
|
||||
* \par
|
||||
* NOTE:
|
||||
* (C) Copyright 2019 Texas Instruments, Inc.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Neither the name of Texas Instruments Incorporated 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
|
||||
* OWNER 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.
|
||||
*/
|
||||
#include "ros/ros.h"
|
||||
#include "nodelet/loader.h"
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
|
||||
ros::init(argc, argv, "mmWave_Manager");
|
||||
|
||||
nodelet::Loader manager(true);
|
||||
|
||||
nodelet::M_string remap(ros::names::getRemappings());
|
||||
|
||||
nodelet::V_string nargv;
|
||||
|
||||
manager.load("mmWaveCommSrv", "ti_mmwave_rospkg/mmWaveCommSrv", remap, nargv);
|
||||
|
||||
manager.load("mmWaveDataHdl", "ti_mmwave_rospkg/mmWaveDataHdl", remap, nargv);
|
||||
|
||||
ros::spin();
|
||||
|
||||
return 0;
|
||||
}
|
||||
99
autonomous_robotics_ros/src/ti_mmwave_rospkg/src/mmWaveQuickConfig.cpp
Executable file
99
autonomous_robotics_ros/src/ti_mmwave_rospkg/src/mmWaveQuickConfig.cpp
Executable file
@@ -0,0 +1,99 @@
|
||||
/*
|
||||
* @file mmWaveQuickConfig.cpp
|
||||
*
|
||||
* @brief
|
||||
* Reads the cfg file and calls service to send commands.
|
||||
*
|
||||
* \par
|
||||
* NOTE:
|
||||
* (C) Copyright 2020 Texas Instruments, Inc.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Neither the name of Texas Instruments Incorporated 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
|
||||
* OWNER 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.
|
||||
*/
|
||||
#include "ros/ros.h"
|
||||
#include "ti_mmwave_rospkg/mmWaveCLI.h"
|
||||
#include <cstdlib>
|
||||
#include <fstream>
|
||||
#include <stdio.h>
|
||||
#include <regex>
|
||||
#include "ParameterParser.h"
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
ros::init(argc, argv, "mmWaveQuickConfig");
|
||||
ros::NodeHandle nh;
|
||||
ti_mmwave_rospkg::mmWaveCLI srv;
|
||||
if (argc != 2) {
|
||||
ROS_INFO("mmWaveQuickConfig: usage: mmWaveQuickConfig /file_directory/params.cfg");
|
||||
return 1;
|
||||
} else
|
||||
ROS_INFO("mmWaveQuickConfig: Configuring mmWave device using config file: %s", argv[1]);
|
||||
|
||||
ros::ServiceClient client = nh.serviceClient<ti_mmwave_rospkg::mmWaveCLI>("/mmWaveCLI");
|
||||
std::ifstream myParams;
|
||||
ti_mmwave_rospkg::ParameterParser parser;
|
||||
//wait for service to become available
|
||||
ros::service::waitForService("/mmWaveCLI", 10000);
|
||||
|
||||
//wait 0.5 secs to avoid multi-sensor conflicts
|
||||
ros::Duration(0.5).sleep();
|
||||
|
||||
myParams.open(argv[1]);
|
||||
|
||||
if (myParams.is_open()) {
|
||||
while( std::getline(myParams, srv.request.comm)) {
|
||||
// Remove Windows carriage-return if present
|
||||
srv.request.comm.erase(std::remove(srv.request.comm.begin(), srv.request.comm.end(), '\r'), srv.request.comm.end());
|
||||
// Ignore comment lines (first non-space char is '%') or blank lines
|
||||
if (!(std::regex_match(srv.request.comm, std::regex("^\\s*%.*")) || std::regex_match(srv.request.comm, std::regex("^\\s*")))) {
|
||||
// ROS_INFO("mmWaveQuickConfig: Sending command: '%s'", srv.request.comm.c_str() );
|
||||
if (client.call(srv)) {
|
||||
if (std::regex_search(srv.response.resp, std::regex("Done"))) {
|
||||
// ROS_INFO("mmWaveQuickConfig: Command successful (mmWave sensor responded with 'Done')");
|
||||
parser.ParamsParser(srv, nh);
|
||||
} else {
|
||||
ROS_ERROR("mmWaveQuickConfig: Command failed (mmWave sensor did not respond with 'Done')");
|
||||
ROS_ERROR("mmWaveQuickConfig: Response: '%s'", srv.response.resp.c_str() );
|
||||
return 1;
|
||||
}
|
||||
} else {
|
||||
ROS_ERROR("mmWaveQuickConfig: Failed to call service mmWaveCLI");
|
||||
ROS_ERROR("%s", srv.request.comm.c_str() );
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
parser.CalParams(nh);
|
||||
myParams.close();
|
||||
} else {
|
||||
ROS_ERROR("mmWaveQuickConfig: Failed to open File %s", argv[1]);
|
||||
return 1;
|
||||
}
|
||||
ROS_INFO("mmWaveQuickConfig: mmWaveQuickConfig will now terminate. Done configuring mmWave device using config file: %s", argv[1]);
|
||||
return 0;
|
||||
}
|
||||
6
autonomous_robotics_ros/ti_mmwave_rospkg/srv/mmWaveCLI.srv → autonomous_robotics_ros/src/ti_mmwave_rospkg/srv/mmWaveCLI.srv
Normal file → Executable file
6
autonomous_robotics_ros/ti_mmwave_rospkg/srv/mmWaveCLI.srv → autonomous_robotics_ros/src/ti_mmwave_rospkg/srv/mmWaveCLI.srv
Normal file → Executable file
@@ -1,3 +1,3 @@
|
||||
string comm
|
||||
---
|
||||
string resp
|
||||
string comm
|
||||
---
|
||||
string resp
|
||||
211
autonomous_robotics_ros/src/ti_safety_bubble/CMakeLists.txt
Normal file
211
autonomous_robotics_ros/src/ti_safety_bubble/CMakeLists.txt
Normal file
@@ -0,0 +1,211 @@
|
||||
cmake_minimum_required(VERSION 3.0.2)
|
||||
project(ti_safety_bubble)
|
||||
|
||||
## Compile as C++11, supported in ROS Kinetic and newer
|
||||
# add_compile_options(-std=c++11)
|
||||
|
||||
## Find catkin macros and libraries
|
||||
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
|
||||
## is used, also find other catkin packages
|
||||
find_package(catkin REQUIRED COMPONENTS
|
||||
roscpp
|
||||
rospy
|
||||
std_msgs
|
||||
message_generation
|
||||
geometry_msgs
|
||||
)
|
||||
|
||||
## System dependencies are found with CMake's conventions
|
||||
# find_package(Boost REQUIRED COMPONENTS system)
|
||||
|
||||
|
||||
## Uncomment this if the package has a setup.py. This macro ensures
|
||||
## modules and global scripts declared therein get installed
|
||||
## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html
|
||||
# catkin_python_setup()
|
||||
|
||||
################################################
|
||||
## Declare ROS messages, services and actions ##
|
||||
################################################
|
||||
|
||||
## To declare and build messages, services or actions from within this
|
||||
## package, follow these steps:
|
||||
## * Let MSG_DEP_SET be the set of packages whose message types you use in
|
||||
## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...).
|
||||
## * In the file package.xml:
|
||||
## * add a build_depend tag for "message_generation"
|
||||
## * add a build_depend and a exec_depend tag for each package in MSG_DEP_SET
|
||||
## * If MSG_DEP_SET isn't empty the following dependency has been pulled in
|
||||
## but can be declared for certainty nonetheless:
|
||||
## * add a exec_depend tag for "message_runtime"
|
||||
## * In this file (CMakeLists.txt):
|
||||
## * add "message_generation" and every package in MSG_DEP_SET to
|
||||
## find_package(catkin REQUIRED COMPONENTS ...)
|
||||
## * add "message_runtime" and every package in MSG_DEP_SET to
|
||||
## catkin_package(CATKIN_DEPENDS ...)
|
||||
## * uncomment the add_*_files sections below as needed
|
||||
## and list every .msg/.srv/.action file to be processed
|
||||
## * uncomment the generate_messages entry below
|
||||
## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...)
|
||||
|
||||
## Generate messages in the 'msg' folder
|
||||
add_message_files(
|
||||
FILES
|
||||
Num.msg
|
||||
)
|
||||
|
||||
## Generate services in the 'srv' folder
|
||||
add_service_files(
|
||||
FILES
|
||||
AddTwoInts.srv
|
||||
)
|
||||
|
||||
## Generate actions in the 'action' folder
|
||||
# add_action_files(
|
||||
# FILES
|
||||
# Action1.action
|
||||
# Action2.action
|
||||
# )
|
||||
|
||||
## Generate added messages and services with any dependencies listed here
|
||||
generate_messages(
|
||||
DEPENDENCIES
|
||||
std_msgs
|
||||
)
|
||||
|
||||
################################################
|
||||
## Declare ROS dynamic reconfigure parameters ##
|
||||
################################################
|
||||
|
||||
## To declare and build dynamic reconfigure parameters within this
|
||||
## package, follow these steps:
|
||||
## * In the file package.xml:
|
||||
## * add a build_depend and a exec_depend tag for "dynamic_reconfigure"
|
||||
## * In this file (CMakeLists.txt):
|
||||
## * add "dynamic_reconfigure" to
|
||||
## find_package(catkin REQUIRED COMPONENTS ...)
|
||||
## * uncomment the "generate_dynamic_reconfigure_options" section below
|
||||
## and list every .cfg file to be processed
|
||||
|
||||
## Generate dynamic reconfigure parameters in the 'cfg' folder
|
||||
# generate_dynamic_reconfigure_options(
|
||||
# cfg/DynReconf1.cfg
|
||||
# cfg/DynReconf2.cfg
|
||||
# )
|
||||
|
||||
###################################
|
||||
## catkin specific configuration ##
|
||||
###################################
|
||||
## The catkin_package macro generates cmake config files for your package
|
||||
## Declare things to be passed to dependent projects
|
||||
## INCLUDE_DIRS: uncomment this if your package contains header files
|
||||
## LIBRARIES: libraries you create in this project that dependent projects also need
|
||||
## CATKIN_DEPENDS: catkin_packages dependent projects also need
|
||||
## DEPENDS: system dependencies of this project that dependent projects also need
|
||||
catkin_package(
|
||||
# INCLUDE_DIRS include
|
||||
# LIBRARIES beginner_tutorials
|
||||
# CATKIN_DEPENDS roscpp rospy std_msgs
|
||||
# DEPENDS system_lib
|
||||
CATKIN_DEPENDS message_runtime
|
||||
)
|
||||
|
||||
###########
|
||||
## Build ##
|
||||
###########
|
||||
|
||||
## Specify additional locations of header files
|
||||
## Your package locations should be listed before other locations
|
||||
include_directories(
|
||||
# include
|
||||
${catkin_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
## Declare a C++ library
|
||||
# add_library(${PROJECT_NAME}
|
||||
# src/${PROJECT_NAME}/beginner_tutorials.cpp
|
||||
# )
|
||||
|
||||
## Add cmake target dependencies of the library
|
||||
## as an example, code may need to be generated before libraries
|
||||
## either from message generation or dynamic reconfigure
|
||||
# add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
|
||||
|
||||
## Declare a C++ executable
|
||||
## With catkin_make all packages are built within a single CMake context
|
||||
## The recommended prefix ensures that target names across packages don't collide
|
||||
# add_executable(${PROJECT_NAME}_node src/beginner_tutorials_node.cpp)
|
||||
|
||||
## Rename C++ executable without prefix
|
||||
## The above recommended prefix causes long target names, the following renames the
|
||||
## target back to the shorter version for ease of user use
|
||||
## e.g. "rosrun someones_pkg node" instead of "rosrun someones_pkg someones_pkg_node"
|
||||
# set_target_properties(${PROJECT_NAME}_node PROPERTIES OUTPUT_NAME node PREFIX "")
|
||||
|
||||
## Add cmake target dependencies of the executable
|
||||
## same as for the library above
|
||||
# add_dependencies(${PROJECT_NAME}_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
|
||||
|
||||
## Specify libraries to link a library or executable target against
|
||||
# target_link_libraries(${PROJECT_NAME}_node
|
||||
# ${catkin_LIBRARIES}
|
||||
# )
|
||||
|
||||
#############
|
||||
## Install ##
|
||||
#############
|
||||
|
||||
# all install targets should use catkin DESTINATION variables
|
||||
# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html
|
||||
|
||||
## Mark executable scripts (Python etc.) for installation
|
||||
## in contrast to setup.py, you can choose the destination
|
||||
# catkin_install_python(PROGRAMS
|
||||
# scripts/my_python_script
|
||||
# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
|
||||
# )
|
||||
|
||||
## Mark executables for installation
|
||||
## See http://docs.ros.org/melodic/api/catkin/html/howto/format1/building_executables.html
|
||||
# install(TARGETS ${PROJECT_NAME}_node
|
||||
# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
|
||||
# )
|
||||
|
||||
## Mark libraries for installation
|
||||
## See http://docs.ros.org/melodic/api/catkin/html/howto/format1/building_libraries.html
|
||||
# install(TARGETS ${PROJECT_NAME}
|
||||
# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
|
||||
# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
|
||||
# RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
|
||||
# )
|
||||
|
||||
## Mark cpp header files for installation
|
||||
# install(DIRECTORY include/${PROJECT_NAME}/
|
||||
# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
|
||||
# FILES_MATCHING PATTERN "*.h"
|
||||
# PATTERN ".svn" EXCLUDE
|
||||
# )
|
||||
|
||||
## Mark other files for installation (e.g. launch and bag files, etc.)
|
||||
# install(FILES
|
||||
# # myfile1
|
||||
# # myfile2
|
||||
# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
|
||||
# )
|
||||
|
||||
#############
|
||||
## Testing ##
|
||||
#############
|
||||
|
||||
## Add gtest based cpp test target and link libraries
|
||||
# catkin_add_gtest(${PROJECT_NAME}-test test/test_beginner_tutorials.cpp)
|
||||
# if(TARGET ${PROJECT_NAME}-test)
|
||||
# target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME})
|
||||
# endif()
|
||||
|
||||
## Add folders to be run by python nosetests
|
||||
# catkin_add_nosetests(test)
|
||||
|
||||
add_executable(odomListener src/odomListener.cpp)
|
||||
target_link_libraries(odomListener ${catkin_LIBRARIES})
|
||||
add_dependencies(odomListener ti_safety_bubble_generate_messages_cpp)
|
||||
@@ -0,0 +1,10 @@
|
||||
<launch>
|
||||
<node pkg="tf" type="static_transform_publisher" name="slow_tf" args="0 0 0 0 0 0 base_link slowzone 100"/>
|
||||
<node pkg="tf" type="static_transform_publisher" name="stop_tf" args="0 0 0 0 0 0 base_link stopzone 100"/>
|
||||
|
||||
<node name="odomListener" pkg="ti_safety_bubble" type="odomListener" output="screen" >
|
||||
<param name="slow_radius" value="2.0" />
|
||||
<param name="stop_radius" value="1.0" />
|
||||
<param name="clear_costmap_period_secs" value="5" />
|
||||
</node>
|
||||
</launch>
|
||||
1
autonomous_robotics_ros/src/ti_safety_bubble/msg/Num.msg
Normal file
1
autonomous_robotics_ros/src/ti_safety_bubble/msg/Num.msg
Normal file
@@ -0,0 +1 @@
|
||||
int64 num
|
||||
77
autonomous_robotics_ros/src/ti_safety_bubble/package.xml
Normal file
77
autonomous_robotics_ros/src/ti_safety_bubble/package.xml
Normal file
@@ -0,0 +1,77 @@
|
||||
<?xml version="1.0"?>
|
||||
<package format="2">
|
||||
<name>ti_safety_bubble</name>
|
||||
<version>0.0.0</version>
|
||||
<description>The beginner_tutorials package</description>
|
||||
|
||||
<!-- One maintainer tag required, multiple allowed, one person per tag -->
|
||||
<!-- Example: -->
|
||||
<!-- <maintainer email="jane.doe@example.com">Jane Doe</maintainer> -->
|
||||
<maintainer email="sabeeh@todo.todo">sabeeh</maintainer>
|
||||
|
||||
|
||||
<!-- One license tag required, multiple allowed, one license per tag -->
|
||||
<!-- Commonly used license strings: -->
|
||||
<!-- BSD, MIT, Boost Software License, GPLv2, GPLv3, LGPLv2.1, LGPLv3 -->
|
||||
<license>TODO</license>
|
||||
|
||||
|
||||
<!-- Url tags are optional, but multiple are allowed, one per tag -->
|
||||
<!-- Optional attribute type can be: website, bugtracker, or repository -->
|
||||
<!-- Example: -->
|
||||
<!-- <url type="website">http://wiki.ros.org/beginner_tutorials</url> -->
|
||||
|
||||
|
||||
<!-- Author tags are optional, multiple are allowed, one per tag -->
|
||||
<!-- Authors do not have to be maintainers, but could be -->
|
||||
<!-- Example: -->
|
||||
<!-- <author email="jane.doe@example.com">Jane Doe</author> -->
|
||||
|
||||
|
||||
<!-- The *depend tags are used to specify dependencies -->
|
||||
<!-- Dependencies can be catkin packages or system dependencies -->
|
||||
<!-- Examples: -->
|
||||
<!-- Use depend as a shortcut for packages that are both build and exec dependencies -->
|
||||
<!-- <depend>roscpp</depend> -->
|
||||
<!-- Note that this is equivalent to the following: -->
|
||||
<!-- <build_depend>roscpp</build_depend> -->
|
||||
<!-- <exec_depend>roscpp</exec_depend> -->
|
||||
<!-- Use build_depend for packages you need at compile time: -->
|
||||
<!-- <build_depend>message_generation</build_depend> -->
|
||||
<!-- Use build_export_depend for packages you need in order to build against this package: -->
|
||||
<!-- <build_export_depend>message_generation</build_export_depend> -->
|
||||
<!-- Use buildtool_depend for build tool packages: -->
|
||||
<!-- <buildtool_depend>catkin</buildtool_depend> -->
|
||||
<!-- Use exec_depend for packages you need at runtime: -->
|
||||
<!-- <exec_depend>message_runtime</exec_depend> -->
|
||||
<!-- Use test_depend for packages you need only for testing: -->
|
||||
<!-- <test_depend>gtest</test_depend> -->
|
||||
<!-- Use doc_depend for packages you need only for building documentation: -->
|
||||
<!-- <doc_depend>doxygen</doc_depend> -->
|
||||
<buildtool_depend>catkin</buildtool_depend>
|
||||
<build_depend>roscpp</build_depend>
|
||||
<build_depend>rospy</build_depend>
|
||||
<build_depend>std_msgs</build_depend>
|
||||
<build_export_depend>roscpp</build_export_depend>
|
||||
<build_export_depend>rospy</build_export_depend>
|
||||
<build_export_depend>std_msgs</build_export_depend>
|
||||
<exec_depend>roscpp</exec_depend>
|
||||
<exec_depend>rospy</exec_depend>
|
||||
<exec_depend>std_msgs</exec_depend>
|
||||
|
||||
<build_depend>message_generation</build_depend>
|
||||
<exec_depend>message_runtime</exec_depend>
|
||||
|
||||
<build_depend>nav_msgs</build_depend>
|
||||
<exec_depend>nav_msgs</exec_depend>
|
||||
|
||||
<build_depend>geometry_msgs</build_depend>
|
||||
<exec_depend>geometry_msgs</exec_depend>
|
||||
|
||||
|
||||
<!-- The export tag contains other, unspecified, tags -->
|
||||
<export>
|
||||
<!-- Other tools can request additional information be placed here -->
|
||||
|
||||
</export>
|
||||
</package>
|
||||
@@ -0,0 +1,211 @@
|
||||
/*
|
||||
* @file odomListener.cpp
|
||||
*
|
||||
* @brief
|
||||
* Subscribes to the global obstacle layers's costmap and footprint nodes,
|
||||
* publishes velocities based on the .
|
||||
*
|
||||
* \par
|
||||
* NOTE:
|
||||
* (C) Copyright 2020 Texas Instruments, Inc.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Neither the name of Texas Instruments Incorporated 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
|
||||
* OWNER 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.
|
||||
*/
|
||||
|
||||
#include <math.h>
|
||||
#include "ros/ros.h"
|
||||
#include "std_msgs/String.h"
|
||||
#include "std_srvs/Empty.h"
|
||||
#include "nav_msgs/OccupancyGrid.h"
|
||||
#include "geometry_msgs/PolygonStamped.h"
|
||||
#include "geometry_msgs/Point32.h"
|
||||
#include "geometry_msgs/Twist.h"
|
||||
|
||||
double robotX, robotY;
|
||||
nav_msgs::OccupancyGrid gMsg;
|
||||
|
||||
/**
|
||||
* This callback receives the robot's polygon and calculates the center.
|
||||
* The center point will be used to calculate distances to objects.
|
||||
*/
|
||||
void footprintCallback(const geometry_msgs::PolygonStamped::ConstPtr& msg)
|
||||
{
|
||||
//ROS_INFO("I heard: [%s]", msg->data.c_str());
|
||||
//ROS_INFO("[%3.3f], [%3.3f]", msg->pose.pose.position.x,msg->pose.pose.position.y);
|
||||
//geometry_msgs::Point32 p
|
||||
double x, y;
|
||||
int s = (int) msg->polygon.points.size();
|
||||
if (s == 0)
|
||||
return;
|
||||
x = 0.0;
|
||||
y = 0.0;
|
||||
for (int i = 0; i < s; i++)
|
||||
{
|
||||
x += msg->polygon.points[i].x;
|
||||
y += msg->polygon.points[i].y;
|
||||
}
|
||||
robotX = x / (double) s;
|
||||
robotY = y / (double) s;
|
||||
}
|
||||
|
||||
/**
|
||||
* This callback saves the global costmap to the gMsg variable.
|
||||
*/
|
||||
void mapCallback(const nav_msgs::OccupancyGrid::ConstPtr& msg)
|
||||
{
|
||||
gMsg = *msg;
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculates the distance between p1 and p2.
|
||||
*/
|
||||
double calculateDistance(double p1x, double p1y, double p2x, double p2y)
|
||||
{
|
||||
return sqrt(pow(p1x - p2x, 2) + pow(p1y - p2y, 2));
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
|
||||
ros::init(argc, argv, "odomListener");
|
||||
|
||||
ros::NodeHandle n;
|
||||
ros::NodeHandle n2("~");
|
||||
|
||||
ros::Subscriber footprintSub = n.subscribe("/move_base/global_costmap/footprint", 10, footprintCallback);
|
||||
ros::Subscriber mapSub = n.subscribe("/move_base/global_costmap/costmap", 10, mapCallback);
|
||||
|
||||
ros::ServiceClient client = n.serviceClient<std_srvs::Empty>("/move_base/clear_costmaps");
|
||||
std_srvs::Empty srv;
|
||||
|
||||
ros::Publisher vel_pub = n.advertise<geometry_msgs::Twist>("mobile_base/commands/velocity", 1);
|
||||
ros::Publisher slowzone_pub = n.advertise<geometry_msgs::PolygonStamped>("/ti_base/slowzone", 1);
|
||||
ros::Publisher stopzone_pub = n.advertise<geometry_msgs::PolygonStamped>("/ti_base/stopzone", 1);
|
||||
|
||||
double outerLimit = 1.5; //radius in meters
|
||||
double innerLimit = 1.0; //radius in meters
|
||||
double mapsClearTime = 7.5; //seconds
|
||||
|
||||
n2.getParam("slow_radius", outerLimit);
|
||||
n2.getParam("stop_radius", innerLimit);
|
||||
n2.getParam("clear_costmap_period_secs", mapsClearTime);
|
||||
|
||||
|
||||
double rate = 20;
|
||||
ros::Rate loop_rate(rate);
|
||||
int counter = 0;
|
||||
bool stopFlag = false;
|
||||
bool slowFlag = false;
|
||||
while (ros::ok())
|
||||
{
|
||||
if (gMsg.info.width != 0) {
|
||||
double tempRobotX = robotX;
|
||||
double tempRobotY = robotY;
|
||||
stopFlag = false;
|
||||
slowFlag = false;
|
||||
|
||||
// create polygons for zones
|
||||
geometry_msgs::PolygonStamped slowzone;
|
||||
geometry_msgs::PolygonStamped stopzone;
|
||||
slowzone.header.frame_id = "slowzone";
|
||||
stopzone.header.frame_id = "stopzone";
|
||||
int numPoints = 12; // number of points for polygon
|
||||
for (int i = 0; i < numPoints; ++i) {
|
||||
double angle = i * ( 360.0 / (double) numPoints) * M_PI / 180.0;
|
||||
geometry_msgs::Point32 slow_point, stop_point;
|
||||
slow_point.z = 0.0;
|
||||
stop_point.z = 0.0;
|
||||
slow_point.x = cos(angle) * outerLimit;
|
||||
slow_point.y = sin(angle) * outerLimit;
|
||||
stop_point.x = cos(angle) * innerLimit;
|
||||
stop_point.y = sin(angle) * innerLimit;
|
||||
slowzone.polygon.points.push_back(slow_point);
|
||||
stopzone.polygon.points.push_back(stop_point);
|
||||
}
|
||||
slowzone_pub.publish(slowzone);
|
||||
stopzone_pub.publish(stopzone);
|
||||
|
||||
// calculate distance to objects
|
||||
for (int i = 0; i < gMsg.info.height; i++)
|
||||
{
|
||||
for (int j = 0; j < gMsg.info.width; j++)
|
||||
{
|
||||
int ind = (i * gMsg.info.width) + j;
|
||||
// grid spaces with probability of 80 or higher will have distance calculated
|
||||
if (gMsg.data[ind] >= 80)
|
||||
{
|
||||
double px = (i * gMsg.info.resolution) + gMsg.info.origin.position.x;
|
||||
double py = (j * gMsg.info.resolution) + gMsg.info.origin.position.y;
|
||||
double dist = calculateDistance(tempRobotX, tempRobotY, py, px);
|
||||
if (outerLimit > dist && dist > innerLimit)
|
||||
{
|
||||
slowFlag = true;
|
||||
} else if (innerLimit >= dist)
|
||||
{
|
||||
stopFlag = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// publish velocity command
|
||||
geometry_msgs::Twist vel;
|
||||
// hard-coded angular velocity to offset turtlebot2 from straying to the left
|
||||
vel.angular.z = -0.0075;
|
||||
if (stopFlag) {
|
||||
ROS_INFO("STOP");
|
||||
vel.linear.x = 0.0;
|
||||
vel.angular.z = 0.0;
|
||||
} else if (slowFlag) {
|
||||
ROS_INFO("SLOW");
|
||||
vel.linear.x = 0.1;
|
||||
} else {
|
||||
ROS_INFO("FULL");
|
||||
vel.linear.x = 0.2;
|
||||
}
|
||||
vel_pub.publish(vel);
|
||||
}
|
||||
|
||||
// calls move_base service to clear costmaps
|
||||
counter += 1;
|
||||
if (counter > (int) (rate * mapsClearTime)) {
|
||||
if (client.call(srv))
|
||||
{
|
||||
ROS_INFO("maps cleared");
|
||||
} else {
|
||||
ROS_INFO("can't call service");
|
||||
}
|
||||
counter = 0;
|
||||
}
|
||||
ros::spinOnce();
|
||||
loop_rate.sleep();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
int64 a
|
||||
int64 b
|
||||
---
|
||||
int64 sum
|
||||
22
autonomous_robotics_ros/turtlebot/turtlebot/README.md → autonomous_robotics_ros/src/turtlebot/turtlebot/README.md
Normal file → Executable file
22
autonomous_robotics_ros/turtlebot/turtlebot/README.md → autonomous_robotics_ros/src/turtlebot/turtlebot/README.md
Normal file → Executable file
@@ -1,11 +1,11 @@
|
||||
turtlebot
|
||||
=========
|
||||
|
||||
The turtlebot stack provides all the basic drivers for running and using a [TurtleBot](http://turtlebot.com) with [ROS](http://www.ros.org) and th TI mmWave EVMs.
|
||||
|
||||
ROS Wiki : (http://www.ros.org/wiki/Robots/TurtleBot)
|
||||
|
||||
|
||||
|
||||
|
||||

|
||||
turtlebot
|
||||
=========
|
||||
|
||||
The turtlebot stack provides all the basic drivers for running and using a [TurtleBot](http://turtlebot.com) with [ROS](http://www.ros.org) and th TI mmWave EVMs.
|
||||
|
||||
ROS Wiki : (http://www.ros.org/wiki/Robots/TurtleBot)
|
||||
|
||||
|
||||
|
||||
|
||||

|
||||
0
autonomous_robotics_ros/turtlebot/turtlebot/setup_create.sh → autonomous_robotics_ros/src/turtlebot/turtlebot/setup_create.sh
Normal file → Executable file
0
autonomous_robotics_ros/turtlebot/turtlebot/setup_create.sh → autonomous_robotics_ros/src/turtlebot/turtlebot/setup_create.sh
Normal file → Executable file
0
autonomous_robotics_ros/turtlebot/turtlebot/setup_kobuki.sh → autonomous_robotics_ros/src/turtlebot/turtlebot/setup_kobuki.sh
Normal file → Executable file
0
autonomous_robotics_ros/turtlebot/turtlebot/setup_kobuki.sh → autonomous_robotics_ros/src/turtlebot/turtlebot/setup_kobuki.sh
Normal file → Executable file
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 43 KiB |
@@ -0,0 +1,82 @@
|
||||
<!--
|
||||
Collection of robot-centric definitions and nodes for the turtlebot.
|
||||
-->
|
||||
<launch>
|
||||
<arg name="base"/>
|
||||
<arg name="stacks"/>
|
||||
<arg name="3d_sensor"/>
|
||||
<arg name="mmwave_device"/>
|
||||
|
||||
<include file="$(find turtlebot_bringup)/launch/includes/description.launch.xml">
|
||||
<arg name="base" value="$(arg base)" />
|
||||
<arg name="stacks" value="$(arg stacks)" />
|
||||
<arg name="3d_sensor" value="$(arg 3d_sensor)" />
|
||||
</include>
|
||||
|
||||
<!-- important generally, but specifically utilised by the current app manager -->
|
||||
<param name="robot/name" value="$(optenv ROBOT turtlebot)"/>
|
||||
<param name="robot/type" value="turtlebot"/>
|
||||
|
||||
<node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher">
|
||||
<param name="publish_frequency" type="double" value="5.0" />
|
||||
</node>
|
||||
<node pkg="diagnostic_aggregator" type="aggregator_node" name="diagnostic_aggregator" >
|
||||
<rosparam command="load" file="$(find turtlebot_bringup)/param/$(arg base)/diagnostics.yaml" />
|
||||
</node>
|
||||
|
||||
<!-- Call mmWave sensor launch file -->
|
||||
<include file="$(find ti_mmwave_rospkg)/launch/bubble_sensor_north.launch">
|
||||
<arg name="device" value="$(arg mmwave_device)" doc="TI mmWave sensor device type [1443, 1642, 1843, 6843ISK, 6843AOP]"/>
|
||||
<arg name="config" value="3d" doc="TI mmWave sensor device configuration [3d (not supported by 1642 EVM), 2d]"/>
|
||||
<arg name="max_allowed_elevation_angle_deg" value="90" doc="Maximum allowed elevation angle in degrees for detected object data [0 > value >= 90]}"/>
|
||||
<arg name="max_allowed_azimuth_angle_deg" value="90" doc="Maximum allowed azimuth angle in degrees for detected object data [0 > value >= 90]}"/>
|
||||
</include>
|
||||
<include file="$(find ti_mmwave_rospkg)/launch/bubble_sensor_south.launch">
|
||||
<arg name="device" value="$(arg mmwave_device)" doc="TI mmWave sensor device type [1443, 1642, 1843, 6843ISK, 6843AOP]"/>
|
||||
<arg name="config" value="3d" doc="TI mmWave sensor device configuration [3d (not supported by 1642 EVM), 2d]"/>
|
||||
<arg name="max_allowed_elevation_angle_deg" value="90" doc="Maximum allowed elevation angle in degrees for detected object data [0 > value >= 90]}"/>
|
||||
<arg name="max_allowed_azimuth_angle_deg" value="90" doc="Maximum allowed azimuth angle in degrees for detected object data [0 > value >= 90]}"/>
|
||||
</include>
|
||||
<include file="$(find ti_mmwave_rospkg)/launch/bubble_sensor_west.launch">
|
||||
<arg name="device" value="$(arg mmwave_device)" doc="TI mmWave sensor device type [1443, 1642, 1843, 6843ISK, 6843AOP]"/>
|
||||
<arg name="config" value="3d" doc="TI mmWave sensor device configuration [3d (not supported by 1642 EVM), 2d]"/>
|
||||
<arg name="max_allowed_elevation_angle_deg" value="90" doc="Maximum allowed elevation angle in degrees for detected object data [0 > value >= 90]}"/>
|
||||
<arg name="max_allowed_azimuth_angle_deg" value="90" doc="Maximum allowed azimuth angle in degrees for detected object data [0 > value >= 90]}"/>
|
||||
</include>
|
||||
<include file="$(find ti_mmwave_rospkg)/launch/bubble_sensor_east.launch">
|
||||
<arg name="device" value="$(arg mmwave_device)" doc="TI mmWave sensor device type [1443, 1642, 1843, 6843ISK, 6843AOP]"/>
|
||||
<arg name="config" value="3d" doc="TI mmWave sensor device configuration [3d (not supported by 1642 EVM), 2d]"/>
|
||||
<arg name="max_allowed_elevation_angle_deg" value="90" doc="Maximum allowed elevation angle in degrees for detected object data [0 > value >= 90]}"/>
|
||||
<arg name="max_allowed_azimuth_angle_deg" value="90" doc="Maximum allowed azimuth angle in degrees for detected object data [0 > value >= 90]}"/>
|
||||
</include>
|
||||
|
||||
<node pkg="hector_trajectory_server" type="hector_trajectory_server" name="hector_trajectory_server" />
|
||||
|
||||
<node pkg="tf" type="static_transform_publisher" name="tf_base_link_to_base_footprint" args="0 0 0 0 0 0 base_footprint base_link 100"/>
|
||||
|
||||
<!-- -->
|
||||
<!--
|
||||
<node pkg="tf" type="static_transform_publisher" name="static_transorm_publisher_map" args="0 0 0 0 0 0 map odom 100"/>
|
||||
-->
|
||||
<!--
|
||||
<node pkg="pointcloud_to_laserscan" type="pointcloud_to_laserscan_node" name="Radar_to_Laser">
|
||||
<param name="min_range" value="0"/>
|
||||
<param name="angle_min" value="-3.14"/>
|
||||
<param name="angle_max" value="3.14"/>
|
||||
</node>
|
||||
|
||||
<node pkg="nodelet" type="nodelet" name="passthru_manager" args="manager" />
|
||||
|
||||
Run a passthrough filter to clean NaNs
|
||||
<node pkg="nodelet" type="nodelet" name="i_filter" args="load pcl/PassThrough passthru_manager" output="screen">
|
||||
<remap from="~input" to="/mmWaveDataHdl/RScan" />
|
||||
<remap from="~output" to="/cloud_in" />
|
||||
<rosparam>
|
||||
filter_field_name: intensity
|
||||
filter_limit_min: 30
|
||||
filter_limit_max: 100
|
||||
filter_limit_negative: False
|
||||
</rosparam>
|
||||
</node>-->
|
||||
|
||||
</launch>
|
||||
@@ -0,0 +1,26 @@
|
||||
<launch>
|
||||
<!-- Turtlebot -->
|
||||
<arg name="base" default="kobuki" doc="mobile base type [create, roomba]"/>
|
||||
<arg name="battery" default="$(env TURTLEBOT_BATTERY)" doc="kernel provided locatio for battery info, use /proc/acpi/battery/BAT0 in 2.6 or earlier kernels." />
|
||||
<arg name="stacks" default="$(env TURTLEBOT_STACKS)" doc="stack type displayed in visualisation/simulation [circles, hexagons]"/>
|
||||
<arg name="3d_sensor" default="radar" doc="3d sensor types [kinect, asux_xtion_pro, radar]"/>
|
||||
<arg name="simulation" default="$(env TURTLEBOT_SIMULATION)" doc="set flags to indicate this turtle is run in simulation mode."/>
|
||||
<arg name="serialport" default="$(env TURTLEBOT_SERIAL_PORT)" doc="used by create to configure the port it is connected on [/dev/ttyUSB0, /dev/ttyS0]"/>
|
||||
<arg name="mmwave_device" default="1443" doc="TI mmWave sensor device type [1443, 1642, 1843, 6843ISK, 6843AOP]"/>
|
||||
|
||||
<param name="/use_sim_time" value="$(arg simulation)"/>
|
||||
|
||||
<include file="$(find turtlebot_bringup)/launch/includes/robot_quad_sensor.launch.xml">
|
||||
<arg name="base" value="$(arg base)" />
|
||||
<arg name="stacks" value="$(arg stacks)" />
|
||||
<arg name="3d_sensor" value="$(arg 3d_sensor)" />
|
||||
<arg name="mmwave_device" value="$(arg mmwave_device)" />
|
||||
</include>
|
||||
<include file="$(find turtlebot_bringup)/launch/includes/mobile_base.launch.xml">
|
||||
<arg name="base" value="$(arg base)" />
|
||||
<arg name="serialport" value="$(arg serialport)" />
|
||||
</include>
|
||||
<include unless="$(eval arg('battery') == 'None')" file="$(find turtlebot_bringup)/launch/includes/netbook.launch.xml">
|
||||
<arg name="battery" value="$(arg battery)" />
|
||||
</include>
|
||||
</launch>
|
||||
@@ -0,0 +1,26 @@
|
||||
<launch>
|
||||
<!-- Turtlebot -->
|
||||
<arg name="base" default="kobuki" doc="mobile base type [create, roomba]"/>
|
||||
<arg name="battery" default="$(env TURTLEBOT_BATTERY)" doc="kernel provided locatio for battery info, use /proc/acpi/battery/BAT0 in 2.6 or earlier kernels." />
|
||||
<arg name="stacks" default="$(env TURTLEBOT_STACKS)" doc="stack type displayed in visualisation/simulation [circles, hexagons]"/>
|
||||
<arg name="3d_sensor" default="radar" doc="3d sensor types [kinect, asux_xtion_pro, radar]"/>
|
||||
<arg name="simulation" default="$(env TURTLEBOT_SIMULATION)" doc="set flags to indicate this turtle is run in simulation mode."/>
|
||||
<arg name="serialport" default="$(env TURTLEBOT_SERIAL_PORT)" doc="used by create to configure the port it is connected on [/dev/ttyUSB0, /dev/ttyS0]"/>
|
||||
<arg name="mmwave_device" default="1443" doc="TI mmWave sensor device type [1443, 1642, 1843, 6843ISK, 6843AOP]"/>
|
||||
|
||||
<param name="/use_sim_time" value="$(arg simulation)"/>
|
||||
|
||||
<include file="$(find turtlebot_bringup)/launch/includes/robot_single_sensor.launch.xml">
|
||||
<arg name="base" value="$(arg base)" />
|
||||
<arg name="stacks" value="$(arg stacks)" />
|
||||
<arg name="3d_sensor" value="$(arg 3d_sensor)" />
|
||||
<arg name="mmwave_device" value="$(arg mmwave_device)" />
|
||||
</include>
|
||||
<include file="$(find turtlebot_bringup)/launch/includes/mobile_base.launch.xml">
|
||||
<arg name="base" value="$(arg base)" />
|
||||
<arg name="serialport" value="$(arg serialport)" />
|
||||
</include>
|
||||
<include unless="$(eval arg('battery') == 'None')" file="$(find turtlebot_bringup)/launch/includes/netbook.launch.xml">
|
||||
<arg name="battery" value="$(arg battery)" />
|
||||
</include>
|
||||
</launch>
|
||||
@@ -10,12 +10,14 @@
|
||||
|
||||
<param name="/use_sim_time" value="$(arg simulation)"/>
|
||||
|
||||
<!--
|
||||
<include file="$(find turtlebot_bringup)/launch/includes/robot.launch.xml">
|
||||
<arg name="base" value="$(arg base)" />
|
||||
<arg name="stacks" value="$(arg stacks)" />
|
||||
<arg name="3d_sensor" value="$(arg 3d_sensor)" />
|
||||
<arg name="mmwave_device" value="$(arg mmwave_device)" />
|
||||
</include>
|
||||
-->
|
||||
<include file="$(find turtlebot_bringup)/launch/includes/mobile_base.launch.xml">
|
||||
<arg name="base" value="$(arg base)" />
|
||||
<arg name="serialport" value="$(arg serialport)" />
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user