Initial version baselined from ITB 4.5.1

Signed-off-by: Yogesh Siraswar <yogeshs@ti.com>
This commit is contained in:
Yogesh Siraswar
2020-11-30 15:24:10 -06:00
commit 33b26c8afe
573 changed files with 289126 additions and 0 deletions

View File

@@ -0,0 +1,96 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Autonomous Robotics with ROS for mmWave Release Notes - Version 1.6</title>
</head>
<!-- START PRE -->
<link rel="stylesheet" href="../../../../.metadata/.html/scripts/strapdown/v/0.2/fonts/ubuntu-regular-woff.css"/>
<link rel="stylesheet" href="../../../../.metadata/.html/scripts/strapdown/v/0.2/fonts/glyphicons-halflings-regular.css"/>
<link rel="stylesheet" href="../../../../.metadata/.html/scripts/strapdown/v/0.2/themes/united2.min.css"/>
<link rel="stylesheet" href="../../../../.metadata/.html/scripts/strapdown/v/0.2/themes/bootstrap-responsive.min.css"/>
<link rel="stylesheet" href="../../../../.metadata/.html/scripts/strapdown/v/0.2/strapdown.css"/>
<link rel="stylesheet" href="../../../../.metadata/.html/styles/link.css"/>
<!-- END PRE -->
<xmp style="display:none;" class="col-xs-6">
Autonomous Robotics with ROS for mmWave Release Notes
=============
Overview
========
This lab allows for the TI mmWave sensor to be used with popular mapping and
navigation libraries in the Robot Operating System (ROS) environment, familiar to
many robotics engineers. The lab uses the Octomap server and move_base libraries
with TIs mmWave ROS Driver Package software interface to the TI mmWave sensor
IWR6843ISK EVM or the IWR6843AOP EVM running the mmWave
SDK out-of-box demo. With this TI driver and the software from the
ROS community (ros.org) engineers may evaluate robot navigation and object
avoidance quickly and easily.
Features
========
* Integrates the TI mmWave ROS driver into the ROS Turtlebot2 platform to allow
the TI mmWave sensor IWR6843ISK EVM, or TI mmWave sensor IWR6843AOP EVM to be used as a 3-D sensor
* Demonstrates mapping using the the TI mmWave sensor with the ROS Octomap
package
* Demonstrates navigation with collision-avoidance using the TI mmWave sensor
with the ROS move_base package
New and Updated Features
========================
The following is a list of changes present in this version of the driver compared to
the previous release.
* Chirp profile config (.cfg) file name changed 'IWR6843ISK_3d_custom.cfg' to 'IWR6843ISK_3d.cfg'
* Chirp profile config (.cfg) added to support IWR6843AOP.
* Added note on editing configuration to Navigation Demo section of user's guide
Resolved Incident Reports
=========================
The following are Incident Reports resolved in this release:
* N/A
Known Limitations
============
The following are Known Limitations in this release:
* Currently supported/tested for IWR6843ISK
ES2.0 EVM, IWR6843AOP ES2.0 EVM only
* The mmWave EVM must be flashed with:
* The mmWave SDK version 3.4.0.2 out-of-box demo firmware for IWR6843ISK ES2.0
* The mmWave SDK version 3.4.0.2 out-of-box demo firmware for IWR6843AOP ES2.0
* The fake_localization ROS navigation package is used to allow direct setting of
the robots initial pose (position/orientation) and goal pose. Therefore, the
gmapping and amcl ROS navigation packages are not used.
Work Arounds for Major Known Issues
===================================
The following are workarounds for each known issue with a major severity that exists in this release:
* N/A
</xmp>
<link rel="stylesheet" href="../../../../.metadata/.html/scripts/highlight/styles/zenburn.css"/>
<script src="../../../../.metadata/.html/scripts/strapdown/vendor/jquery-1.11.2.min.js"></script>
<script src="../../../../.metadata/.html/scripts/strapdown/vendor/bootstrap.min.js"></script>
<script src="../../../../.metadata/.html/scripts/highlight/highlight.pack.js"></script>
<script src="../../../../.metadata/.html/scripts/strapdown/v/0.2/strapdown.js"></script>
<script src="../../../../.metadata/.html/scripts/toolbox.js"></script>
<script src="../../../../.metadata/.html/scripts/toolbox_fixes.js"></script>
</html>

View File

@@ -0,0 +1,579 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Autonomous Robotics with ROS for mmWave User's Guide - Version 1.6 </title>
</head>
<!-- START PRE -->
<link rel="stylesheet" href="../../../../.metadata/.html/scripts/strapdown/v/0.2/fonts/ubuntu-regular-woff.css"/>
<link rel="stylesheet" href="../../../../.metadata/.html/scripts/strapdown/v/0.2/fonts/glyphicons-halflings-regular.css"/>
<link rel="stylesheet" href="../../../../.metadata/.html/scripts/strapdown/v/0.2/themes/united2.min.css"/>
<link rel="stylesheet" href="../../../../.metadata/.html/scripts/strapdown/v/0.2/themes/bootstrap-responsive.min.css"/>
<link rel="stylesheet" href="../../../../.metadata/.html/scripts/strapdown/v/0.2/strapdown.css"/>
<link rel="stylesheet" href="../../../../.metadata/.html/styles/link.css"/>
<!-- END PRE -->
<xmp style="display:none;" class="col-xs-6">
Autonomous Robotics with ROS for mmWave
===========
This lab allows for the TI mmWave sensor to be used with popular mapping and navigation libraries in the Robot Operating System (ROS) environment, familiar to many robotics engineers.
The lab uses the Octomap server and move_base libraries with TIs mmWave ROS Driver Package software to interface to the TI mmWave sensor. The lab supports use of IWR6843ISK or IWR6843AOP ES2.0 EVMs.
With this TI driver and the software from the ROS community (ros.org) engineers may evaluate robot navigation and object avoidance quickly and easily.
<img src="images/intro_senseavoid.gif" class="img-responsive"/>
# Requirements
### Prerequisite
[[y! Run Out of Box Demo
Before continuing with this lab, users should first run the out of box demo for the EVM.
This will enable users to gain familiarity with the sensor's capabilities as well as the various tools used across all labs in the mmWave Industrial Toolbox. ]]
### Required and Supported mmWave Evaluation Modules (EVM)
#### ISK module with MMWAVEICBOOST
Quantity | Item
------------------|-----------------
1 | Antenna Module Board: [IWR6843ISK](http://www.ti.com/tool/IWR6843ISK)
1 | OPTIONAL: [Industrial mmWave Carrier Board](http://www.ti.com/tool/MMWAVEICBOOST) for CCS based debugging
OR
#### AOP EVM
Quantity | Item
------------------|-----------------
1 | [IWR6843AOPEVM](http://www.ti.com/tool/IWR6843AOPEVM)
1 | OPTIONAL: [Industrial mmWave Carrier Board](http://www.ti.com/tool/MMWAVEICBOOST) for CCS based debugging
[[r! IWR6843 ES2.0 Only
This lab is only compatible with ES2.0 version of IWR6843.
On ISK or ODS, check the device version on your IWR6843 using the on-chip device markings as shown below
1. If line 4 reads `678A`, you have an ES2 device. In this case, this lab is compatible with your EVM.
2. If line 4 reads `60 GHZi`, you have an older ES1 device. In this case, the lab is NOT compatible with your EVM. ES2 IWR6843ISK/IWR6843ISK-ODS boards are orderable from the EVM link above.
<img src="images/iwr6843_silicon_revision.png" width="300"/>
On AOP, the EVM must be Rev F or later. This can be distinguished by the shape of the EVM if it is as shown above.
]]
[[r! AoP ES2.0 EVM only
The IWR6843 AoP version of this lab is only compatible with ES2.0 silicon and the corresponding EVM. Please ensure your EVM is the same as in the below image.
<img src="images/iwr6843aopevm1.png" width="300"/>
]]
### Additional Hardware Requirements
Quantity | Item | Details
---------|--------------------------|-----------------
1 | Robot | [TurtleBot2](https://www.turtlebot.com/turtlebot2/) with plate and standoff kit
1 | Computer (preferably laptop) | Running Linux Ubuntu 16.04. Used for remote operation and visualization
1 | Laptop<span style="color:blue">*</span> | Used on Turtlebot2. Running Linux Ubuntu 16.04.
1 | USB 2.0 printer-style cable (A-Male to B-Male) | Used to connect laptop to Turtlebot2
1 | Micro USB Cable | Used to connect laptop to the mmWave EVM (cable comes with the EVM and should be connected to XDS110 USB port on EVM)
1 | 12V to 5V DC to DC converter | Must be able to output at least 2.5Amps at 5V. Used to allow the EVM to be powered from the Turtlebot2 (this converter is required since the normal 5V output port on the TurtleBot2 cannot supply 2.5Amps)
1 | 2-pin miniFit JR connector/cable | Used to go from Turtlebot2 12V output port to the 12V input on the converter (for example, Molex cable part number 245135-0210 or 245135-0220 can be used by cutting it in half so the connector end goes to the TurtleBot2 12V output port and the cut wire end goes to the 12V input of the converter)
1 | 2.1mm barrel jack connector | Center positive with cable/wire to go from the 5V output on the converter to the EVM
| Misc. small bolts and nuts and brackets | For mounting mmWave sensor and DC converter to TurtleBot platform (not included with EVM or TurtleBot)
[[b *Sitara AM572x processor can be used instead of a laptop for the Turtlebot2
For instructions on how to implement the Sitara based alternative please refer to the [Autonomous robotics reference design with Sitara™ processors and mmWave sensors using ROS](http://www.ti.com/tool/TIDEP-01006).
The reference design demonstrates an embedded robotic system where point-cloud data from the mmWave radar sensing is processed by the Sitara AM57x processor which runs Robot Operating System (ROS) and is the main processor for the overall system control.
]]
### Software
Tool | Version | Download Link
----------------------------|---------------------------|--------
TI mmWave SDK | 3.4.x.x | [Link to Latest mmWave SDK](http://software-dl.ti.com/ra-processors/esd/MMWAVE-SDK/latest/index_FDS.html). To access a previous version of the mmWave SDK scroll to the bottom of the table and click the link under "MMWAVE-SDK previous release". Repeat to continue stepping back to previous versions.
mmWave Industrial Toolbox | Latest | Download and install the toolbox. Go to [Using TI Resource Explorer & the mmWave Industrial Toolbox](../../../../docs/readme.html) for instructions.
Uniflash | Latest | Uniflash tool is used for flashing TI mmWave Radar devices. [Download offline tool](http://www.ti.com/tool/UNIFLASH) or use the [Cloud version](https://dev.ti.com/uniflash/#!/)
Silicon Labs CP210x USB to UART Bridge VCP Drivers | Latest | Only needed for AOP EVM. [https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers](https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers)
-----------
### Laptops
Both laptops need to have:
* Linux Ubuntu 16.04 natively installed (Ubuntu 16.04 Virtual Machine running on Windows can be used for remote control laptop if desired)
* ROS Kinetic Kame LTS with specified ROS packages
* TI mmWave ROS Driver
* Additional ROS packages supplied with this lab
Quickstart
===========
The quickstart guide will cover setting up the EVM, flashing firmware, and running the demo.
## 1. Setup the EVM for Flashing Mode
* For MMWAVEICBOOST + Antenna Module setup: Follow the instructions for [Hardware Setup for Flashing in MMWAVEICBOOST Mode](../../../common/docs/hardware_setup/hw_setup_mmwaveicboost_mode_flashing.html)
* For IWR6843ISK in Standalone/Modular Mode: Follow the instructions for [Hardware Setup of IWR6843ISK for Flashing Mode](../../../common/docs/hardware_setup/hw_setup_isk_ods_modular_mode_flashing.html)
* For AOP in Standalone/Modular Mode: Follow the instructions for [Hardware Setup of IWR6843AOPEVM for Flashing Mode](../../../common/docs/hardware_setup/hw_setup_aop_modular_mode_flashing.html)
## 2. Flash the EVM using Uniflash
Flash the binary listed below using UniFlash. Follow the instructions for [using UniFlash](../../../common/docs/software_setup/using_uniflash_with_mmwave.html)
BIN Name | Board | Location
------------------------------|-----------------|-----------
xwr68xx_mmw_demo.bin | IWR6843ISK | `<INDUSTRIAL_TOOLBOX_INSTALL_DIR>\mmwave_industrial_toolbox_<VER>\out_of_box_demo\`<br>`68xx_mmwave_sdk_dsp\prebuilt_binaries\xwr68xx_mmw_demo.bin`
xwr64xxAOP_mmw_demo.bin | IWR6843AOPEVM | `<INDUSTRIAL_TOOLBOX_INSTALL_DIR>\mmwave_industrial_toolbox_<VER>\out_of_box_demo\`<br>`68xx_aop_mmwave_sdk_hwa\prebuilt_binaries\xwr64xxAOP_mmw_demo.bin`
## 3. Setup the EVM for Functional Mode
* For MMWAVEICBOOST + Antenna Module setup: Follow the instructions for [Hardware Setup of MMWAVEICBOOST + Antenna Module for Functional Mode](../../../common/docs/hardware_setup/hw_setup_mmwaveicboost_mode_functional.html)
* For IWR6843ISK in Standalone/Modular Mode: Follow the instructions for [Hardware Setup of IWR6843ISK for Functional Mode](../../../common/docs/hardware_setup/hw_setup_isk_ods_modular_mode_functional.html)
* For AOP: follow the instructions for [Hardware Setup of IWR6843AOPEVM for Functional Mode](../../../common/docs/hardware_setup/hw_setup_aop_modular_mode_functional.html)
## 4. Verification using online Visualizer
-----------
* Power up the EVM and connect it to the Windows PC with the provided USB cable (make sure that the SOP2 jumper is removed).
* Using Google Chrome, navigate to the following URL: https://dev.ti.com/mmWaveDemoVisualizer
* If prompted, follow the on-screen instructions for installing TI Cloud Agent (this is need the first time on a new PC)
* In the GUI menu, select Options &rarr; Serial Port
* In the serial port window, enter the appropriate port in each of the drop down menus based on your port numbers from the "flash the evm" section
* Click on Configure to connect the GUI to the EVM. The GUI Status bar should show <b>Conected:</b> <img src="images/mmwave_demo_visualizer_connected.png" width="30" height="20"/>
<img src="images/mmwave_demo_visualizer_ports.png" width="600"/>
## 4. Setting up the TurtleBot2
-----------
* The TurtleBot2 is a low-cost, personal robotics platform that is well supported within the ROS
community. There are many existing demos that work out-of-the-box with the TurtleBot2 including
teleoperation (remote control), mapping, and navigation.
* In this guide we will have a look at how to modify these demos to integrate the TI mmWave sensor as the 3-D sensor.
* The TurtleBot2 should be assembled and mmWave EVM mounted as shown in the following pictures to work with this lab. There may be slight variation in mounting depending on EVM option.
* In the example shown, the 12V to 5V converter is mounted underneath the center of the top plate.
* The Turtlebot and EVM is connected to the laptop using USB cables
IWR6843ISK with MMWAVEICBOOST carrier board front view (shown without required laptop):
<img src="images/setup/turtlebot2_front.png" class="img-responsive"/>
IWR6843ISK with MMWAVEICBOOST carrier board side view (shown without required laptop):
<img src="images/setup/turtlebot2_side.png" class="img-responsive"/>
## 5. Installing ROS and the TI mmWave ROS Driver
---------------
* Please follow the instructions in the TI mmWave ROS Driver Setup Guide (available on the **TI Resource Explorer under Labs > TI mmWave ROS Driver**) to install ROS and the TI mmWave ROS Driver on each laptop before continuing.
* ROS must be installed on both the TurtleBot laptop and the Remote Control laptop.
* It is a good idea to test out the installation on each laptop by connecting the TI mmWave EVM and trying out the point cloud visualization.
## 6. Installing the mmWave Mapping and Navigation Demo Packages
---------------
After installing ROS and the TI mmWave ROS Driver, follow the steps below on both laptops for interchangeability.
Install the Required Dependent ROS Packages
1. Install the following ROS packages which are required dependencies to run the demos:
```
$ sudo apt-get install ros-kinetic-navigation
```
```
$ sudo apt-get install ros-kinetic-hector-slam
```
```
$ sudo apt-get install ros-kinetic-octomap-server
```
```
$ sudo apt-get install ros-kinetic-kobuki
```
```
$ sudo apt-get install ros-kinetic-octomap-rviz-plugins
```
```
$ sudo apt-get install ros-kinetic-vision-opencv
```
```
$ sudo apt-get install ros-kinetic-depth-image-proc
```
```
$ sudo apt-get install ros-kinetic-joy
```
2. Download the source code for the specific version of the ROS fake_localization package required
to run the demos:
```
$ mkdir -p ~/catkin_ws/src/navigation/fake_localization
```
```
$ cd ~/catkin_ws/src/navigation/fake_localization
```
```
$ wget https://raw.githubusercontent.com/ros-planning/navigation/1.14.2/fake_localization/fake_localization.cpp
```
```
$ wget https://raw.githubusercontent.com/ros-planning/navigation/1.14.2/fake_localization/CMakeLists.txt
```
```
$ wget https://raw.githubusercontent.com/ros-planning/navigation/1.14.2/fake_localization/package.xml
```
## 7. Download the TurtleBot mmWave Mapping and Navigation Packages
---------------
1. Download the **ti\_mmwave\_ros\_map\_nav\_`<ver>`.tar.gz** Linux archive file from the
<a href="javascript:void(0)" onclick="window.parent.jumpToTirexNodeInCurrentPackage (' AN-1gXp4Kn1RRFC9mOFTZQ ')"> Robotics </a> / Autonomous Robotics with ROS for mmWave folder and copy it to your catkin `<workspace_dir>/src` directory.
[[y! Note
Downloading and extracting the TurtleBot mmWave Mapping and Navigation Packages should be done on both laptops
]]
a) Point your web browser to the mmwave sensor software package: https://dev.ti.com/tirex/#/?link=Software
b) Click on “mmWave Sensors” and then click on “Industrial Toolbox”
c) Click on the link for “Labs”
d) Click on the “Autonomous Robotics with ROS for mmWave” lab in the table in the center
e) Click on the “Download All” button on the right side as shown in the following
image and accept the user license agreement when prompted. Choose to save the
downloaded zip file if prompted or save it to disk first and then open it by doubleclicking
it from the downloaded location.
<img src="images/setup_sw/download_lab.png" class="img-responsive"/>
f) Navigate into the folder structure of the opened zip file to the path shown in the
following figure. (Note that the path may start with mmwave\_sensors/industrial\_toolbox\_<ver> depending on package version.)
<img src="images/setup_sw/ros_pkg_source.png" class="img-responsive"/>
g) Open a new file browser window and navigate to your catkin `<workspace_dir>/src`
directory as shown in the right window in the following screenshot. Copy the
**ti\_mmwave\_ros\_map\_nav\_`<ver>`.tar.gz** file to your `<workspace_dir>/src` directory
by dragging it from the source (left) window to the destination (right) window.
<img src="images/setup_sw/ros_pkg_dest.png" class="img-responsive"/>
h) You should now see the **ti\_mmwave\_ros\_map\_nav\_`<ver>`.tar.gz** file in your
`<workspace_dir>/src` directory as shown in the following screenshot.
<img src="images/setup_sw/ros_pkg_in_src.png" class="img-responsive"/>
2. Extract the turtlebot, navigation, and turtlebot\_mmwave\_launchers folders (as well as a
custom mmWave chirp config file which gets placed in the ti_mmwave_rospkg/cfg
directory) from the archive (.tar.gz) file using the following command executed from the
`<workspace_dir>/src` directory. Change <ver> to match the actual filename.
```
$ tar xzf ti_mmwave_ros_map_nav_<ver>.tar.gz
```
3. Go back to your catkin `<workspace_dir>` directory and build the workspace:
```
$ cd <workspace_dir>
```
```
$ catkin_make
```
If all of the installation steps were followed and both ROS environment scripts were sourced
the driver should build successfully and you should see [100%] on the lines at the end of the
build output.
## 8. Networking
---------------
ROS is a distributed system, meaning that it can communicate over a local network with other ROS
components. For this demo, both laptops mentioned above must be on the exact same network and
must be able to ping (icmp) each other by IP address. The Remote Control laptop must also be able to
ssh (tcp/ip) into the TurtleBot laptop by IP address. You may need to install ssh on the laptops using the
following command:
```
$ sudo apt-get install ssh
```
For more information regarding ROSs networking visit the link: <http://wiki.ros.org/ROS/NetworkSetup>
Additionally a ROS system may only have one “roscore” across all machines. In order for machines to
recognize this “roscore” they must have an environment variable defined which specifies the IP address
of the “roscore” machine.
###On the TurtleBot machine
Edit your **~/.bashrc** file to include the following lines at the bottom:
```
export ROS_MASTER_URI=http://localhost:11311
export ROS_IP=<IP_OF_THIS_MACHINE>
```
You can check your IP by running `$ ifconfig` on the command line. Note that the line
exporting the ROS_IP environment variable may not be required if your network is setup where
each machine can contact/ping the other by hostname. You must close and re-open the shell
for the updated **~/.bashrc** file to take effect.
###On the Remote machine
Edit your **~/.bashrc** file to include the following lines at the bottom:
```
export ROS_MASTER_URI=http://<IP_OF_TURTLEBOT_MACHINE>:11311
export ROS_IP=<IP_OF_THIS_MACHINE>
```
You can check your IP by running `$ ifconfig` on the command line. Note that if your network
is setup where each machine can contact/ping the other by hostname then you can use
<NAME_OF_TURTLEBOT_MACHINE> instead of <IP_OF_TURTLEBOT_MACHINE> in the first line
and the line exporting the ROS_IP environment variable may not be required. You must close
and re-open the shell for the updated **~/.bashrc** file to take effect.
## 9. Remote Control Demo (TurtleBot Bring-up and Teleoperation)
---------------
These steps must take place from the remote machine, “ssh-ing” into the TurtleBot laptop when
necessary.
##TurtleBot Bring-up
To start the TurtleBot, open a terminal window on the remote machine, ssh into the TurtleBot laptop
and run the following command.
* For IWR6843ISK:
```
$ roslaunch turtlebot_bringup minimal.launch mmwave_device:=6843ISK
```
* For IWR6843AOP:
```
$ roslaunch turtlebot_bringup minimal.launch mmwave_device:=6843AOP
```
If the EVM was not in a good state the roslaunch command will fail. Try resetting the EVM by pressing
the NRST button on the EVM and then run the desired roslaunch command again.
After the Turtlebot and mmWave sensor are configured, you may see periodic “Kobuki : malformed subpayload
detected” errors. These errors appear to come from the Turtlebot driver and do not affect the
operation of the demo.
##Teleoperation (Remote Control)
Open a new terminal window on the remote machine and run the following command to bring up the
teleoperation (remote control) of the TurtleBot:
```
$ roslaunch turtlebot_teleop keyboard_teleop.launch
```
Follow the instructions shown in the window to control the TurtleBot. You can exit out of the remote
control application by pressing `CTRL-C`.
## 10. Mapping Demo
---------------
The Mapping Demo is an example of how to use TIs mmWave Radar EVMs within the ROS framework
on a robot to build a map.
* The demo runs the octomap_server package in ROS. There are several filters that have been brought up
for use: Pass Through filters for all the point cloud fields, and a Statistical Outlier Removal filter for
filtering the raw map.
* **Pass Through Filters**: remove values outside a certain range for a given field (X, Y, Z, intensity)
* **Statistical Outlier Removal**: removes values based off their distance from their closest neighbors
* The parameters/limits for these filters can be found and modified in the
**turtlebot\_mmwave\_launchers/launch/radar\_limit\_filters.launch** file. The **radar_mapping.launch** file
mentioned below must be re-started after changing the **radar_limit_filters.launch** file in order for the
new parameters to take effect.
The processing graph for the incoming point cloud data is shown below:
<img src="images/setup_sw/ros_processing_graph.png" class="img-responsive"/>
##Start-up
To run the mapping demo, first follow the TurtleBot Bring-up and Remote Control instructions in the
“TurtleBot Bring-up and Teleoperation (Remote Control)” section to bring up and remote control the
TurtleBot. Then, to run the mapping demo open a new terminal window, ssh into the TurtleBot laptop
and run the following command:
```
$ roslaunch turtlebot_mmwave_launchers radar_mapping.launch
```
You may see a few warnings immediately after the launch file is run. It may also output a warning saying
“Nothing to publish, octree is empty” whenever there are no objects detected in front of the mmWave
sensor.
##Visualization
To view the TurtleBot, Radar data, and map data in Rviz open a new terminal window on the remote
machine and run the following command which will open a pre-defined Rviz configuration customized
for the mapping demo (the command is all one line):
```
$ rosrun rviz rviz -d ~/catkin_ws/src/turtlebot_mmwave_launchers/launch/mapping_visualization.rviz
```
Alternatively, you can run the following command to open a blank Rviz screen and then manually add
the same topics to the visualization as follows:
```
$ rosrun rviz rviz
```
* Once Rviz has started, add the radar data by selecting Add-> PointCloud2 and selecting /mmWaveDataHdl/RScan under the Topic dropdown menu for the PointCloud2.
* Make the following changes to improve the visualiation:
* Size to 0.03
* Style to Spheres
* Decay to 0.25
* To visualize the TurtleBot on the screen select Add->Robot Model and Rviz will automatically detect the robot
description and display the TurtleBot.
* To view the path the TurtleBot is taking select Add->Path and choose /trajectory under the Topic dropdown for the Path.
* To visualize the octomap output in Rviz, select Add->PointCloud2 and select `<raw_or_filtered>_point_cloud_centers`
* To color points by elevation change ColorTransformer to AxisColor.
* Changing the Size to 0.03 and Style to Spheres will improve the visualization.
You can also save a custom Rviz configuration and load it in the future for convenience.
##Saving a Map
* The TurtleBot laptop is now running the Radar and TurtleBot drivers, as well as all the filtering and
mapping nodes shown in the flow chart above.
* Move the TurtleBot around your environment manually until you are satisfied with your map.
* Then open a new terminal window on the remote machine, ssh into the TurtleBot laptop, and run the following command to save the map:
```
$ rosrun octomap_server octomap_saver f <your_file_name>.bt
```
##Viewing a Previously Saved Map
* To view a saved `<map>.bt` file, you must first shutdown the mapping demo launch file if it was launched
by pressing CTRL-C in the window where the radar_mapping.launch file was launched.
* Rviz will need to be opened and configured as mentioned in the Visualization section above if it is not already open.
* Then, open a new terminal window on the remote machine, ssh into the TurtleBot laptop, and run the following command to serve the saved map (the command is all one line):
```
$ rosrun octomap_server octomap_server_node /path/to/<map>.bt octomap_point_cloud_centers:=filtered_point_cloud_centers
```
You should see the saved map displayed in Rviz. Note that the other topics in Rviz may show a
warning/error since they are not active.
## 11. Navigation Demo
---------------
The TurtleBot navigation demo runs on the nodes mentioned in the image below.
<img src="images/setup_sw/ros_nodes.png" class="img-responsive"/>
Here are the steps to run the navigation demo.
1. Close all previous terminal windows if any were open
2. Open a new terminal window on the remote machine, ssh into the TurtleBot laptop and bring up the
TurtleBot and mmWave EVM with the following command.
* For IWR6843ISK:
```
$ roslaunch turtlebot_bringup minimal.launch mmwave_device:=6843ISK
```
* For IWR6843AOP:
```
$ roslaunch turtlebot_bringup minimal.launch mmwave_device:=6843AOP
```
If the EVM was not in a good state the roslaunch command will fail. Try resetting the EVM by
pressing the NRST button on the EVM and then run the desired roslaunch command again.
The configuration files are included in the ti_mmwave_ros_map_nav_v1p4.tar.gz package ...\ti_mmwave_ros_map_nav_v1p4\ti_mmwave_rospkg\cfg. To change the parameter, edit and save the file using a text editor. For example, to update the demo to run using the IWR6843ISK-ODS and configuration file used with the ODS point cloud demo
- Edit the "6843ISK_3d.cfg" configuration file to one that works with the ODS point cloud demo.
- Flash the IWR6843ISK-ODS with the ODS point cloud binary.
- Run the demo as documented for 6843ISK EVM.
3. To bring up the move_base and fake_localization nodes and load a prebuilt map using the
octomap_server, open a new terminal window on the remote machine, ssh into the TurtleBot
laptop and run the following command:
```
$ roslaunch turtlebot_mmwave_launchers radar_navigation.launch
```
**Note 1**: By default, this launch file loads a specific prebuilt map file containing a map of a simple
rectangular space roughly 4ft x 6ft which can be used to make the robot stay within a space of that
size for demo and testing purposes.
* To load your own map, edit the radar_navigation.launch file and change the map filename shown in
bold below to your own saved map file.
*node name="octomap_server" pkg="octomap_server" type="octomap_server_node" args**="$(find
turtlebot_mmwave_launchers)/launch/map_4ft_by_6ft_border_large.bt** projected_map:=map" />*
* Alternatively, this static map can be completely disabled/removed as follows if desired to allow the
robot to plan paths freely without any artificial boundaries.
* Remove the line containing “costmap_2d::StaticLayer” in the global_costmap_params.yaml
and local_costmap_params.yaml param files
* Remove the line containing “octomap_server_node” in the ~catkin_ws/src/turtlebot_mmwave_launchers/launch/radar_navigation.launch file
* The size of the global and local costmaps can also be increased in the global_costmap_params.yaml and local_costmap_params.yaml param files to allow setting goals that are farther away
**Note2**: You may see “octree is empty” warnings when there are no objects detected in front of the mmWave sensor.
4. Open a new terminal window on the remote machine and run the following command which will
open a pre-defined Rviz configuration customized for the navigation demo.
* To show the inflation layer which is used for path planning (the command is all one line):
```
$ rosrun rviz rviz -d ~/catkin_ws/src/turtlebot_mmwave_launchers/launch/navigation_visualization.rviz
```
* To not show the inflation layer which is used for path planning (the command is all one line):
```
$ rosrun rviz rviz -d ~/catkin_ws/src/turtlebot_mmwave_launchers/launch/navigation_visualization_2.rviz
```
* Alternatively, you can run the following command to open a blank Rviz screen and then manually add the same topics to the visualization as follows:
```
$ rosrun rviz rviz
```
* “Add” three Map displays, one PointCloud2, the Robot Model, and one PosewithCovariance. Use the
Topic dropdowns on the displays you added in Rviz to select topics for each one.
* For the maps, choose “map” for one and the local and global cost maps for the other two.
* Select /initialpose for PosewithCovariance.
* You can select /mmWaveDataHdl/RScan or /xyzi_filt_out for the PointCloud2.
* Changing the Size to 0.03, Style to Spheres, and Decay to 0.25 will improve the PointCloud2 visualization.
* You can also add two Path topics (one for /move_base/DWAPlannerROS/local_plan and one for /move_base/DWAPlannerROS/global_plan) and a Polygon for /move_base/local_costmap/footprint.
* There is also an alternate pre-defined Rviz configuration file as an additional visualization example
located at “turtlebot_mmwave_launchers/launch/navigation_visualization_2.rviz” that adds a PointCloud for the voxel grid (/move_base/local_costmap/obstacle_layer/marked_cloud) and disables the costmaps.
5. Start the navigation by first providing an initial pose estimate. Select 2D Pose Estimate (along the
top of screen) and click on the location where the TurtleBot is within the map and drag in the
direction it is facing. You should see the TurtleBot appear on the same spot you click immediately
after releasing.
Note: Please do not choose a starting position or goal that is too close to the boundaries of the
current map as the navigation stack will not be able to create what it considers to be a valid path.
6. Now, give the TurtleBot a navigation goal by selecting 2D Nav Goal and clicking the location you
would like the TurtleBot to navigate towards and dragging in the direction you would like it to face.
The TurtleBot should then begin navigation to its goal. If you need to stop it, terminate the
radar_navigation.launch roslaunch command by clicking on the terminal window that was used to
launch it and pressing CTRL-C.
7. As an alternative to manually specifying the initial pose and goal using Rviz, there is also an example
shell script in the “turtlebot_mmwave_launchers/scripts” directory that you can call from the Linux
command prompt to set the initial pose and goal. It is intended to be used with the default 4ft x 6ft
prebuilt map where you start the robot on one of three starting points (a, b, or c) at one end of the
rectangular space facing the opposite end and then send it to one of the three goal points at the
other end. This is useful for demonstrating obstacle avoidance in a 4ft x 6ft space as shown in the
following picture. To run the script, go to the “turtlebot_mmwave_launchers/scripts” directory and
type “./start_nav.sh” at the Linux prompt.
<img src="images/setup_sw/turtlebot_sense_avoid_setup.png" class="img-responsive"/>
Need More Help?
===========
* Fort Turtlebot2 issues and questions: <http://wiki.ros.org/Robots/TurtleBot#Robots.2BAC8-TurtleBot.2BAC8-kinetic.TurtleBot2>
* For ROS related questions: <https://answers.ros.org/questions/>
* Additional resources in the documentation of the mmWave SDK (note hyperlinks will only work if the mmWave SDK has been installed on PC):
* [mmWave SDK Module Doc located at `<mmwave_sdk_install_dir>/docs/mmwave_sdk_module_documentation.html`](file:///C:/ti/mmwave_sdk_03_04_00_03/docs/mmwave_sdk_module_documentation.html)
* [mmWave SDK User's Guide located at `<mmwave_sdk_install_dir>/docs/mmwave_sdk_user_guide.pdf`](file:///C:/ti/mmwave_sdk_03_04_00_03/docs/mmwave_sdk_user_guide.pdf)
* [mmWave SDK Release Notes located at `<mmwave_sdk_install_dir>/docs/mmwave_sdk_release_notes.pdf`](file:///C:/ti/mmwave_sdk_03_04_00_03/docs/mmwave_sdk_release_notes.pdf)
* Find answers to common questions on [mmWave E2E FAQ](https://e2e.ti.com/support/sensors/f/1023/t/595725)
* Search for your issue or post a new question on the [mmWave E2E forum](https://e2e.ti.com/support/sensor/mmwave_sensors/f/1023)
</xmp>
<link rel="stylesheet" href="../../../../.metadata/.html/scripts/highlight/styles/zenburn.css"/>
<script src="../../../../.metadata/.html/scripts/strapdown/vendor/jquery-1.11.2.min.js"></script>
<script src="../../../../.metadata/.html/scripts/strapdown/vendor/bootstrap.min.js"></script>
<script src="../../../../.metadata/.html/scripts/highlight/highlight.pack.js"></script>
<script src="../../../../.metadata/.html/scripts/strapdown/v/0.2/strapdown.js"></script>
<script src="../../../../.metadata/.html/scripts/toolbox.js"></script>
<script src="../../../../.metadata/.html/scripts/toolbox_fixes.js"></script>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 179 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 267 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 496 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 360 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 333 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 KiB

View File

@@ -0,0 +1,46 @@
cmake_minimum_required(VERSION 2.8.3)
project(fake_localization)
find_package(catkin REQUIRED
COMPONENTS
angles
geometry_msgs
message_filters
nav_msgs
rosconsole
roscpp
rospy
tf
)
find_package(Boost REQUIRED COMPONENTS signals)
catkin_package(
CATKIN_DEPENDS
geometry_msgs
nav_msgs
roscpp
rospy
)
include_directories(${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS})
add_executable(fake_localization fake_localization.cpp)
target_link_libraries(fake_localization
${catkin_LIBRARIES}
${Boost_LIBRARIES}
)
add_dependencies(fake_localization ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
install(
PROGRAMS
static_odom_broadcaster.py
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
install(
TARGETS
fake_localization
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)

View File

@@ -0,0 +1,245 @@
/*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2008, Willow Garage, Inc.
* All rights reserved.
*
* 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 the Willow Garage 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.
*********************************************************************/
/** \author Ioan Sucan */
/**
@mainpage
@htmlinclude manifest.html
@b odom_localization Takes in ground truth pose information for a robot
base (e.g., from a simulator or motion capture system) and republishes
it as if a localization system were in use.
<hr>
@section usage Usage
@verbatim
$ fake_localization
@endverbatim
<hr>
@section topic ROS topics
Subscribes to (name/type):
- @b "base_pose_ground_truth" nav_msgs/Odometry : robot's odometric pose. Only the position information is used (velocity is ignored).
Publishes to (name / type):
- @b "amcl_pose" geometry_msgs/PoseWithCovarianceStamped : robot's estimated pose in the map, with covariance
- @b "particlecloud" geometry_msgs/PoseArray : fake set of poses being maintained by the filter (one paricle only).
<hr>
@section parameters ROS parameters
- "~odom_frame_id" (string) : The odometry frame to be used, default: "odom"
**/
#include <ros/ros.h>
#include <ros/time.h>
#include <nav_msgs/Odometry.h>
#include <geometry_msgs/PoseArray.h>
#include <geometry_msgs/PoseWithCovarianceStamped.h>
#include <angles/angles.h>
#include "ros/console.h"
#include "tf/transform_broadcaster.h"
#include "tf/transform_listener.h"
#include "tf/message_filter.h"
#include "message_filters/subscriber.h"
class FakeOdomNode
{
public:
FakeOdomNode(void)
{
m_posePub = m_nh.advertise<geometry_msgs::PoseWithCovarianceStamped>("amcl_pose",1,true);
m_particlecloudPub = m_nh.advertise<geometry_msgs::PoseArray>("particlecloud",1,true);
m_tfServer = new tf::TransformBroadcaster();
m_tfListener = new tf::TransformListener();
m_base_pos_received = false;
ros::NodeHandle private_nh("~");
private_nh.param("odom_frame_id", odom_frame_id_, std::string("odom"));
private_nh.param("base_frame_id", base_frame_id_, std::string("base_link"));
private_nh.param("global_frame_id", global_frame_id_, std::string("/map"));
private_nh.param("delta_x", delta_x_, 0.0);
private_nh.param("delta_y", delta_y_, 0.0);
private_nh.param("delta_yaw", delta_yaw_, 0.0);
private_nh.param("transform_tolerance", transform_tolerance_, 0.1);
m_particleCloud.header.stamp = ros::Time::now();
m_particleCloud.header.frame_id = global_frame_id_;
m_particleCloud.poses.resize(1);
ros::NodeHandle nh;
m_offsetTf = tf::Transform(tf::createQuaternionFromRPY(0, 0, -delta_yaw_ ), tf::Point(-delta_x_, -delta_y_, 0.0));
stuff_sub_ = nh.subscribe("base_pose_ground_truth", 100, &FakeOdomNode::stuffFilter, this);
filter_sub_ = new message_filters::Subscriber<nav_msgs::Odometry>(nh, "", 100);
filter_ = new tf::MessageFilter<nav_msgs::Odometry>(*filter_sub_, *m_tfListener, base_frame_id_, 100);
filter_->registerCallback(boost::bind(&FakeOdomNode::update, this, _1));
// subscription to "2D Pose Estimate" from RViz:
m_initPoseSub = new message_filters::Subscriber<geometry_msgs::PoseWithCovarianceStamped>(nh, "initialpose", 1);
m_initPoseFilter = new tf::MessageFilter<geometry_msgs::PoseWithCovarianceStamped>(*m_initPoseSub, *m_tfListener, global_frame_id_, 1);
m_initPoseFilter->registerCallback(boost::bind(&FakeOdomNode::initPoseReceived, this, _1));
}
~FakeOdomNode(void)
{
if (m_tfServer)
delete m_tfServer;
}
private:
ros::NodeHandle m_nh;
ros::Publisher m_posePub;
ros::Publisher m_particlecloudPub;
message_filters::Subscriber<geometry_msgs::PoseWithCovarianceStamped>* m_initPoseSub;
tf::TransformBroadcaster *m_tfServer;
tf::TransformListener *m_tfListener;
tf::MessageFilter<geometry_msgs::PoseWithCovarianceStamped>* m_initPoseFilter;
tf::MessageFilter<nav_msgs::Odometry>* filter_;
ros::Subscriber stuff_sub_;
message_filters::Subscriber<nav_msgs::Odometry>* filter_sub_;
double delta_x_, delta_y_, delta_yaw_;
bool m_base_pos_received;
double transform_tolerance_;
nav_msgs::Odometry m_basePosMsg;
geometry_msgs::PoseArray m_particleCloud;
geometry_msgs::PoseWithCovarianceStamped m_currentPos;
tf::Transform m_offsetTf;
//parameter for what odom to use
std::string odom_frame_id_;
std::string base_frame_id_;
std::string global_frame_id_;
public:
void stuffFilter(const nav_msgs::OdometryConstPtr& odom_msg){
//we have to do this to force the message filter to wait for transforms
//from odom_frame_id_ to base_frame_id_ to be available at time odom_msg.header.stamp
//really, the base_pose_ground_truth should come in with no frame_id b/c it doesn't make sense
boost::shared_ptr<nav_msgs::Odometry> stuff_msg(new nav_msgs::Odometry);
*stuff_msg = *odom_msg;
stuff_msg->header.frame_id = odom_frame_id_;
filter_->add(stuff_msg);
}
void update(const nav_msgs::OdometryConstPtr& message){
tf::Pose txi;
tf::poseMsgToTF(message->pose.pose, txi);
txi = m_offsetTf * txi;
tf::Stamped<tf::Pose> odom_to_map;
try
{
m_tfListener->transformPose(odom_frame_id_, tf::Stamped<tf::Pose>(txi.inverse(), message->header.stamp, base_frame_id_), odom_to_map);
}
catch(tf::TransformException &e)
{
ROS_ERROR("Failed to transform to %s from %s: %s\n", odom_frame_id_.c_str(), base_frame_id_.c_str(), e.what());
return;
}
m_tfServer->sendTransform(tf::StampedTransform(odom_to_map.inverse(),
message->header.stamp + ros::Duration(transform_tolerance_),
global_frame_id_, message->header.frame_id));
tf::Pose current;
tf::poseMsgToTF(message->pose.pose, current);
//also apply the offset to the pose
current = m_offsetTf * current;
geometry_msgs::Pose current_msg;
tf::poseTFToMsg(current, current_msg);
// Publish localized pose
m_currentPos.header = message->header;
m_currentPos.header.frame_id = global_frame_id_;
m_currentPos.pose.pose = current_msg;
m_posePub.publish(m_currentPos);
// The particle cloud is the current position. Quite convenient.
m_particleCloud.header = m_currentPos.header;
m_particleCloud.poses[0] = m_currentPos.pose.pose;
m_particlecloudPub.publish(m_particleCloud);
}
void initPoseReceived(const geometry_msgs::PoseWithCovarianceStampedConstPtr& msg){
tf::Pose pose;
tf::poseMsgToTF(msg->pose.pose, pose);
if (msg->header.frame_id != global_frame_id_){
ROS_WARN("Frame ID of \"initialpose\" (%s) is different from the global frame %s", msg->header.frame_id.c_str(), global_frame_id_.c_str());
}
// set offset so that current pose is set to "initialpose"
tf::StampedTransform baseInMap;
try{
// just get the latest
m_tfListener->lookupTransform(base_frame_id_, global_frame_id_, ros::Time(0), baseInMap);
} catch(tf::TransformException){
ROS_WARN("Failed to lookup transform!");
return;
}
tf::Transform delta = pose * baseInMap;
m_offsetTf = delta * m_offsetTf;
}
};
int main(int argc, char** argv)
{
ros::init(argc, argv, "fake_localization");
FakeOdomNode odom;
ros::spin();
return 0;
}

View File

@@ -0,0 +1,31 @@
<package>
<name>fake_localization</name>
<version>1.14.2</version>
<description>A ROS node that simply forwards odometry information.</description>
<author>Ioan A. Sucan</author>
<author>contradict@gmail.com</author>
<maintainer email="davidvlu@gmail.com">David V. Lu!!</maintainer>
<maintainer email="mferguson@fetchrobotics.com">Michael Ferguson</maintainer>
<license>BSD</license>
<url>http://wiki.ros.org/fake_localization</url>
<buildtool_depend>catkin</buildtool_depend>
<build_depend>angles</build_depend>
<build_depend>roscpp</build_depend>
<build_depend>rosconsole</build_depend>
<build_depend>nav_msgs</build_depend>
<build_depend>geometry_msgs</build_depend>
<build_depend>tf</build_depend>
<build_depend>message_filters</build_depend>
<build_depend>rospy</build_depend>
<run_depend>roscpp</run_depend>
<run_depend>rosconsole</run_depend>
<run_depend>nav_msgs</run_depend>
<run_depend>geometry_msgs</run_depend>
<run_depend>tf</run_depend>
<run_depend>message_filters</run_depend>
<run_depend>rospy</run_depend>
</package>

View File

@@ -0,0 +1,89 @@
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Changelog for package move_base
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1.14.2 (2017-08-14)
-------------------
1.14.1 (2017-08-07)
-------------------
* Add a max_planning_retries parameter to move_base [kinetic] (`#539 <https://github.com/ros-planning/navigation/issues/539>`_)
* Fixed deadlock when changing global planner
* Fix CMakeLists + package.xmls (`#548 <https://github.com/ros-planning/navigation/issues/548>`_)
* Added deps to amcl costmap_2d move_base (`#512 <https://github.com/ros-planning/navigation/issues/512>`_)
* move_base: Add move_base_msgs to find_package.
* Contributors: Jorge Santos Simón, Maarten de Vries, Martin Günther, Vincent Rabaud, mryellow, ne0
1.14.0 (2016-05-20)
-------------------
1.13.1 (2015-10-29)
-------------------
* Removes installation of nonexistent directories
* use correct size for clearing window
* full name has been required for eons, this code just adds unneeded complexity
* remove ancient conversion scripts from v0.2 to v0.3
* proper locking during costmap update
* Contributors: Michael Ferguson, Thiago de Freitas Oliveira Araujo
1.13.0 (2015-03-17)
-------------------
* Fixing various memory freeing operations
* Contributors: Alex Bencz
1.12.0 (2015-02-04)
-------------------
* update maintainer email
* Contributors: Michael Ferguson
1.11.15 (2015-02-03)
--------------------
* Disable global planner when resetting state.
* Mark move_base headers for installation
* Add ARCHIVE DESTINATION for move_base
* Break infinite loop when tolerance 0 is used
* remove partial usage of <tab> in the code
* Contributors: Gary Servin, Michael Ferguson, ohendriks, v4hn
1.11.14 (2014-12-05)
--------------------
* use timer rather than rate for immediate wakeup
* adding lock to planner makePlan fail case
* Contributors: Michael Ferguson, phil0stine
1.11.13 (2014-10-02)
--------------------
1.11.12 (2014-10-01)
--------------------
1.11.11 (2014-07-23)
--------------------
* removes trailing spaces and empty lines
* Contributors: Enrique Fernández Perdomo
1.11.10 (2014-06-25)
--------------------
* Remove unnecessary colons
* move_base planService now searches out from desired goal
* Contributors: David Lu!!, Kaijen Hsiao
1.11.9 (2014-06-10)
-------------------
* uses ::hypot(x, y) instead of sqrt(x*x, y*y)
* Contributors: Enrique Fernández Perdomo
1.11.8 (2014-05-21)
-------------------
1.11.7 (2014-05-21)
-------------------
* update build to find eigen using cmake_modules
* Fix classloader warnings on exit of move_base
* Contributors: Michael Ferguson
1.11.4 (2013-09-27)
-------------------
* Package URL Updates
* Reintroduce ClearCostmaps Service
* Add dependencies to recovery behaviors.

View File

@@ -0,0 +1,78 @@
cmake_minimum_required(VERSION 2.8.3)
project(move_base)
find_package(catkin REQUIRED
COMPONENTS
actionlib
base_local_planner
clear_costmap_recovery
cmake_modules
costmap_2d
dynamic_reconfigure
geometry_msgs
message_generation
move_base_msgs
nav_core
nav_msgs
navfn
pluginlib
roscpp
rospy
rotate_recovery
std_srvs
tf
)
find_package(Eigen3 REQUIRED)
add_definitions(${EIGEN3_DEFINITIONS})
# dynamic reconfigure
generate_dynamic_reconfigure_options(
cfg/MoveBase.cfg
)
catkin_package(
CATKIN_DEPENDS
dynamic_reconfigure
geometry_msgs
move_base_msgs
nav_msgs
roscpp
)
include_directories(
include
${catkin_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIRS}
)
# move_base
add_library(move_base
src/move_base.cpp
)
target_link_libraries(move_base
${Boost_LIBRARIES}
${catkin_LIBRARIES}
)
add_dependencies(move_base ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
add_executable(move_base_node
src/move_base_node.cpp
)
add_dependencies(move_base_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
target_link_libraries(move_base_node move_base)
set_target_properties(move_base_node PROPERTIES OUTPUT_NAME move_base)
install(
TARGETS
move_base
move_base_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"
)

View File

@@ -0,0 +1,30 @@
#!/usr/bin/env python
PACKAGE = 'move_base'
from dynamic_reconfigure.parameter_generator_catkin import ParameterGenerator, str_t, double_t, bool_t, int_t
gen = ParameterGenerator()
gen.add("base_global_planner", str_t, 0, "The name of the plugin for the global planner to use with move_base.", "navfn/NavfnROS")
gen.add("base_local_planner", str_t, 0, "The name of the plugin for the local planner to use with move_base.", "base_local_planner/TrajectoryPlannerROS")
#gen.add("recovery_behaviors", str_t, 0, "A list of recovery behavior plugins to use with move_base.", "[{name: conservative_reset, type: clear_costmap_recovery/ClearCostmapRecovery}, {name: rotate_recovery, type: rotate_recovery/RotateRecovery}, {name: aggressive_reset, type: clear_costmap_recovery/ClearCostmapRecovery}]")
gen.add("planner_frequency", double_t, 0, "The rate in Hz at which to run the planning loop.", 0, 0, 100)
gen.add("controller_frequency", double_t, 0, "The rate in Hz at which to run the control loop and send velocity commands to the base.", 20, 0, 100)
gen.add("planner_patience", double_t, 0, "How long the planner will wait in seconds in an attempt to find a valid plan before space-clearing operations are performed.", 5.0, 0, 100)
gen.add("controller_patience", double_t, 0, "How long the controller will wait in seconds without receiving a valid control before space-clearing operations are performed.", 5.0, 0, 100)
gen.add("max_planning_retries", int_t, 0, "How many times we will recall the planner in an attempt to find a valid plan before space-clearing operations are performed", -1, -1, 1000)
gen.add("conservative_reset_dist", double_t, 0, "The distance away from the robot in meters at which obstacles will be cleared from the costmap when attempting to clear space in the map.", 3, 0, 50)
gen.add("recovery_behavior_enabled", bool_t, 0, "Whether or not to enable the move_base recovery behaviors to attempt to clear out space.", True)
# Doesnt exist
gen.add("clearing_rotation_allowed", bool_t, 0, "Determines whether or not the robot will attempt an in-place rotation when attempting to clear out space.", True)
gen.add("shutdown_costmaps", bool_t, 0, "Determines whether or not to shutdown the costmaps of the node when move_base is in an inactive state", False)
gen.add("oscillation_timeout", double_t, 0, "How long in seconds to allow for oscillation before executing recovery behaviors.", 0.0, 0, 60)
gen.add("oscillation_distance", double_t, 0, "How far in meters the robot must move to be considered not to be oscillating.", 0.5, 0, 10)
gen.add("restore_defaults", bool_t, 0, "Restore to the original configuration", False)
exit(gen.generate(PACKAGE, "move_base_node", "MoveBase"))

View File

@@ -0,0 +1,235 @@
/*********************************************************************
*
* Software License Agreement (BSD License)
*
* Copyright (c) 2008, Willow Garage, Inc.
* All rights reserved.
*
* 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 the Willow Garage 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.
*
* Author: Eitan Marder-Eppstein
*********************************************************************/
#ifndef NAV_MOVE_BASE_ACTION_H_
#define NAV_MOVE_BASE_ACTION_H_
#include <vector>
#include <string>
#include <ros/ros.h>
#include <actionlib/server/simple_action_server.h>
#include <move_base_msgs/MoveBaseAction.h>
#include <nav_core/base_local_planner.h>
#include <nav_core/base_global_planner.h>
#include <nav_core/recovery_behavior.h>
#include <geometry_msgs/PoseStamped.h>
#include <costmap_2d/costmap_2d_ros.h>
#include <costmap_2d/costmap_2d.h>
#include <nav_msgs/GetPlan.h>
#include <pluginlib/class_loader.h>
#include <std_srvs/Empty.h>
#include <dynamic_reconfigure/server.h>
#include "move_base/MoveBaseConfig.h"
namespace move_base {
//typedefs to help us out with the action server so that we don't hace to type so much
typedef actionlib::SimpleActionServer<move_base_msgs::MoveBaseAction> MoveBaseActionServer;
enum MoveBaseState {
PLANNING,
CONTROLLING,
CLEARING
};
enum RecoveryTrigger
{
PLANNING_R,
CONTROLLING_R,
OSCILLATION_R
};
/**
* @class MoveBase
* @brief A class that uses the actionlib::ActionServer interface that moves the robot base to a goal location.
*/
class MoveBase {
public:
/**
* @brief Constructor for the actions
* @param name The name of the action
* @param tf A reference to a TransformListener
*/
MoveBase(tf::TransformListener& tf);
/**
* @brief Destructor - Cleans up
*/
virtual ~MoveBase();
/**
* @brief Performs a control cycle
* @param goal A reference to the goal to pursue
* @param global_plan A reference to the global plan being used
* @return True if processing of the goal is done, false otherwise
*/
bool executeCycle(geometry_msgs::PoseStamped& goal, std::vector<geometry_msgs::PoseStamped>& global_plan);
private:
/**
* @brief A service call that clears the costmaps of obstacles
* @param req The service request
* @param resp The service response
* @return True if the service call succeeds, false otherwise
*/
bool clearCostmapsService(std_srvs::Empty::Request &req, std_srvs::Empty::Response &resp);
/**
* @brief A service call that can be made when the action is inactive that will return a plan
* @param req The goal request
* @param resp The plan request
* @return True if planning succeeded, false otherwise
*/
bool planService(nav_msgs::GetPlan::Request &req, nav_msgs::GetPlan::Response &resp);
/**
* @brief Make a new global plan
* @param goal The goal to plan to
* @param plan Will be filled in with the plan made by the planner
* @return True if planning succeeds, false otherwise
*/
bool makePlan(const geometry_msgs::PoseStamped& goal, std::vector<geometry_msgs::PoseStamped>& plan);
/**
* @brief Load the recovery behaviors for the navigation stack from the parameter server
* @param node The ros::NodeHandle to be used for loading parameters
* @return True if the recovery behaviors were loaded successfully, false otherwise
*/
bool loadRecoveryBehaviors(ros::NodeHandle node);
/**
* @brief Loads the default recovery behaviors for the navigation stack
*/
void loadDefaultRecoveryBehaviors();
/**
* @brief Clears obstacles within a window around the robot
* @param size_x The x size of the window
* @param size_y The y size of the window
*/
void clearCostmapWindows(double size_x, double size_y);
/**
* @brief Publishes a velocity command of zero to the base
*/
void publishZeroVelocity();
/**
* @brief Reset the state of the move_base action and send a zero velocity command to the base
*/
void resetState();
void goalCB(const geometry_msgs::PoseStamped::ConstPtr& goal);
void planThread();
void executeCb(const move_base_msgs::MoveBaseGoalConstPtr& move_base_goal);
bool isQuaternionValid(const geometry_msgs::Quaternion& q);
double distance(const geometry_msgs::PoseStamped& p1, const geometry_msgs::PoseStamped& p2);
geometry_msgs::PoseStamped goalToGlobalFrame(const geometry_msgs::PoseStamped& goal_pose_msg);
/**
* @brief This is used to wake the planner at periodic intervals.
*/
void wakePlanner(const ros::TimerEvent& event);
tf::TransformListener& tf_;
MoveBaseActionServer* as_;
boost::shared_ptr<nav_core::BaseLocalPlanner> tc_;
costmap_2d::Costmap2DROS* planner_costmap_ros_, *controller_costmap_ros_;
boost::shared_ptr<nav_core::BaseGlobalPlanner> planner_;
std::string robot_base_frame_, global_frame_;
std::vector<boost::shared_ptr<nav_core::RecoveryBehavior> > recovery_behaviors_;
unsigned int recovery_index_;
tf::Stamped<tf::Pose> global_pose_;
double planner_frequency_, controller_frequency_, inscribed_radius_, circumscribed_radius_;
double planner_patience_, controller_patience_;
int32_t max_planning_retries_;
uint32_t planning_retries_;
double conservative_reset_dist_, clearing_radius_;
ros::Publisher current_goal_pub_, vel_pub_, action_goal_pub_;
ros::Subscriber goal_sub_;
ros::ServiceServer make_plan_srv_, clear_costmaps_srv_;
bool shutdown_costmaps_, clearing_rotation_allowed_, recovery_behavior_enabled_;
double oscillation_timeout_, oscillation_distance_;
MoveBaseState state_;
RecoveryTrigger recovery_trigger_;
ros::Time last_valid_plan_, last_valid_control_, last_oscillation_reset_;
geometry_msgs::PoseStamped oscillation_pose_;
pluginlib::ClassLoader<nav_core::BaseGlobalPlanner> bgp_loader_;
pluginlib::ClassLoader<nav_core::BaseLocalPlanner> blp_loader_;
pluginlib::ClassLoader<nav_core::RecoveryBehavior> recovery_loader_;
//set up plan triple buffer
std::vector<geometry_msgs::PoseStamped>* planner_plan_;
std::vector<geometry_msgs::PoseStamped>* latest_plan_;
std::vector<geometry_msgs::PoseStamped>* controller_plan_;
//set up the planner's thread
bool runPlanner_;
boost::recursive_mutex planner_mutex_;
boost::condition_variable_any planner_cond_;
geometry_msgs::PoseStamped planner_goal_;
boost::thread* planner_thread_;
boost::recursive_mutex configuration_mutex_;
dynamic_reconfigure::Server<move_base::MoveBaseConfig> *dsrv_;
void reconfigureCB(move_base::MoveBaseConfig &config, uint32_t level);
move_base::MoveBaseConfig last_config_;
move_base::MoveBaseConfig default_config_;
bool setup_, p_freq_change_, c_freq_change_;
bool new_global_plan_;
};
};
#endif

View File

@@ -0,0 +1,57 @@
<package>
<name>move_base</name>
<version>1.14.2</version>
<description>
The move_base package provides an implementation of an action (see the <a href="http://www.ros.org/wiki/actionlib">actionlib</a> package) that, given a goal in the world, will attempt to reach it with a mobile base. The move_base node links together a global and local planner to accomplish its global navigation task. It supports any global planner adhering to the nav_core::BaseGlobalPlanner interface specified in the <a href="http://www.ros.org/wiki/nav_core">nav_core</a> package and any local planner adhering to the nav_core::BaseLocalPlanner interface specified in the <a href="http://www.ros.org/wiki/nav_core">nav_core</a> package. The move_base node also maintains two costmaps, one for the global planner, and one for a local planner (see the <a href="http://www.ros.org/wiki/costmap_2d">costmap_2d</a> package) that are used to accomplish navigation tasks.
</description>
<author>Eitan Marder-Eppstein</author>
<author>contradict@gmail.com</author>
<maintainer email="davidvlu@gmail.com">David V. Lu!!</maintainer>
<maintainer email="mferguson@fetchrobotics.com">Michael Ferguson</maintainer>
<license>BSD</license>
<url>http://wiki.ros.org/move_base</url>
<buildtool_depend>catkin</buildtool_depend>
<build_depend>actionlib</build_depend>
<build_depend>cmake_modules</build_depend>
<build_depend>costmap_2d</build_depend>
<build_depend>dynamic_reconfigure</build_depend>
<build_depend>geometry_msgs</build_depend>
<build_depend>message_generation</build_depend>
<build_depend>move_base_msgs</build_depend>
<build_depend>nav_core</build_depend>
<build_depend>nav_msgs</build_depend>
<build_depend>pluginlib</build_depend>
<build_depend>roscpp</build_depend>
<build_depend>rospy</build_depend>
<build_depend>std_srvs</build_depend>
<build_depend>tf</build_depend>
<!--These deps aren't strictly needed, but given the default parameters require them to work, we'll enforce that they build -->
<build_depend>base_local_planner</build_depend>
<build_depend>clear_costmap_recovery</build_depend>
<build_depend>navfn</build_depend>
<build_depend>rotate_recovery</build_depend>
<run_depend>base_local_planner</run_depend>
<run_depend>clear_costmap_recovery</run_depend>
<run_depend>navfn</run_depend>
<run_depend>rotate_recovery</run_depend>
<run_depend>actionlib</run_depend>
<run_depend>costmap_2d</run_depend>
<run_depend>dynamic_reconfigure</run_depend>
<run_depend>geometry_msgs</run_depend>
<run_depend>message_runtime</run_depend>
<run_depend>move_base_msgs</run_depend>
<run_depend>nav_core</run_depend>
<run_depend>nav_msgs</run_depend>
<run_depend>pluginlib</run_depend>
<run_depend>roscpp</run_depend>
<run_depend>rospy</run_depend>
<run_depend>std_srvs</run_depend>
<run_depend>tf</run_depend>
</package>

View File

@@ -0,0 +1,12 @@
<launch>
<master auto="start"/>
<group name="wg">
<node pkg="map_server" type="map_server" args="$(find 2dnav_stage)/maps/willow-full-0.05.pgm 0.05" respawn="false" />
<node pkg="stage" type="stageros" name="stageros" args="$(find 2dnav_stage)/worlds/willow-pr2-5cm.world" respawn="false" >
<param name="base_watchdog_timeout" value="0.2"/>
</node>
<node pkg="fake_localization" type="fake_localization" respawn="false" />
<node pkg="nav_view" type="nav_view" respawn="false"/>
<node pkg="nav" type="planner_test" output="screen" />
</group>
</launch>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,42 @@
/*
* Copyright (c) 2013, Willow Garage, Inc.
* All rights reserved.
*
* 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 the Willow Garage, Inc. 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 <move_base/move_base.h>
int main(int argc, char** argv){
ros::init(argc, argv, "move_base_node");
tf::TransformListener tf(ros::Duration(10));
move_base::MoveBase move_base( tf );
//ros::MultiThreadedSpinner s;
ros::spin();
return(0);
}

View File

@@ -0,0 +1,60 @@
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Changelog for package rotate_recovery
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1.14.2 (2017-08-14)
-------------------
1.14.1 (2017-08-07)
-------------------
* Fix CMakeLists + package.xmls (`#548 <https://github.com/ros-planning/navigation/issues/548>`_)
* Contributors: Martin Günther, Vincent Rabaud
1.14.0 (2016-05-20)
-------------------
1.13.1 (2015-10-29)
-------------------
1.13.0 (2015-03-17)
-------------------
1.12.0 (2015-02-04)
-------------------
* update maintainer email
* Contributors: Michael Ferguson
1.11.15 (2015-02-03)
--------------------
* Add ARCHIVE_DESTINATION for static builds
* Contributors: Gary Servin
1.11.14 (2014-12-05)
--------------------
1.11.13 (2014-10-02)
--------------------
1.11.12 (2014-10-01)
--------------------
1.11.11 (2014-07-23)
--------------------
1.11.10 (2014-06-25)
--------------------
1.11.9 (2014-06-10)
-------------------
1.11.8 (2014-05-21)
-------------------
1.11.7 (2014-05-21)
-------------------
* update build to find eigen using cmake_modules
* Contributors: Michael Ferguson
1.11.4 (2013-09-27)
-------------------
* Package URL Updates

View File

@@ -0,0 +1,48 @@
cmake_minimum_required(VERSION 2.8.3)
project(rotate_recovery)
find_package(catkin REQUIRED
COMPONENTS
cmake_modules
roscpp
tf
costmap_2d
nav_core
pluginlib
base_local_planner
)
find_package(Eigen3 REQUIRED)
include_directories(
include
${catkin_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIRS}
)
add_definitions(${EIGEN3_DEFINITIONS})
catkin_package(
INCLUDE_DIRS include
LIBRARIES rotate_recovery
CATKIN_DEPENDS
roscpp
pluginlib
)
add_library(rotate_recovery src/rotate_recovery.cpp)
add_dependencies(rotate_recovery ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
target_link_libraries(rotate_recovery ${catkin_LIBRARIES})
install(TARGETS rotate_recovery
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
)
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
FILES_MATCHING PATTERN "*.h"
)
install(FILES rotate_plugin.xml
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)

View File

@@ -0,0 +1,91 @@
/*********************************************************************
*
* Software License Agreement (BSD License)
*
* Copyright (c) 2009, Willow Garage, Inc.
* All rights reserved.
*
* 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 Willow Garage, Inc. 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.
*
* Author: Eitan Marder-Eppstein
*********************************************************************/
#ifndef ROTATE_RECOVERY_H_
#define ROTATE_RECOVERY_H_
#include <nav_core/recovery_behavior.h>
#include <costmap_2d/costmap_2d_ros.h>
#include <tf/transform_listener.h>
#include <ros/ros.h>
#include <base_local_planner/costmap_model.h>
#include <geometry_msgs/Twist.h>
#include <geometry_msgs/Point.h>
#include <angles/angles.h>
namespace rotate_recovery{
/**
* @class RotateRecovery
* @brief A recovery behavior that rotates the robot in-place to attempt to clear out space
*/
class RotateRecovery : public nav_core::RecoveryBehavior {
public:
/**
* @brief Constructor, make sure to call initialize in addition to actually initialize the object
* @param
* @return
*/
RotateRecovery();
/**
* @brief Initialization function for the RotateRecovery recovery behavior
* @param tf A pointer to a transform listener
* @param global_costmap A pointer to the global_costmap used by the navigation stack
* @param local_costmap A pointer to the local_costmap used by the navigation stack
*/
void initialize(std::string name, tf::TransformListener* tf,
costmap_2d::Costmap2DROS* global_costmap, costmap_2d::Costmap2DROS* local_costmap);
/**
* @brief Run the RotateRecovery recovery behavior.
*/
void runBehavior();
/**
* @brief Destructor for the rotate recovery behavior
*/
~RotateRecovery();
private:
costmap_2d::Costmap2DROS* global_costmap_, *local_costmap_;
costmap_2d::Costmap2D costmap_;
std::string name_;
tf::TransformListener* tf_;
bool initialized_;
double sim_granularity_, min_rotational_vel_, max_rotational_vel_, acc_lim_th_, tolerance_, frequency_;
base_local_planner::CostmapModel* world_model_;
};
};
#endif

View File

@@ -0,0 +1,39 @@
<package>
<name>rotate_recovery</name>
<version>1.14.2</version>
<description>
This package provides a recovery behavior for the navigation stack that attempts to clear space by performing a 360 degree rotation of the robot.
</description>
<author>Eitan Marder-Eppstein</author>
<author>contradict@gmail.com</author>
<maintainer email="davidvlu@gmail.com">David V. Lu!!</maintainer>
<maintainer email="mferguson@fetchrobotics.com">Michael Ferguson</maintainer>
<license>BSD</license>
<url>http://wiki.ros.org/rotate_recovery</url>
<buildtool_depend>catkin</buildtool_depend>
<build_depend>cmake_modules</build_depend>
<build_depend>roscpp</build_depend>
<build_depend>tf</build_depend>
<build_depend>costmap_2d</build_depend>
<build_depend>nav_core</build_depend>
<build_depend>pluginlib</build_depend>
<build_depend>eigen</build_depend>
<build_depend>base_local_planner</build_depend>
<run_depend>roscpp</run_depend>
<run_depend>tf</run_depend>
<run_depend>costmap_2d</run_depend>
<run_depend>nav_core</run_depend>
<run_depend>pluginlib</run_depend>
<run_depend>eigen</run_depend>
<export>
<nav_core plugin="${prefix}/rotate_plugin.xml" />
</export>
</package>

View File

@@ -0,0 +1,7 @@
<library path="lib/librotate_recovery">
<class name="rotate_recovery/RotateRecovery" type="rotate_recovery::RotateRecovery" base_class_type="nav_core::RecoveryBehavior">
<description>
A recovery behavior that performs a 360 degree in-place rotation to attempt to clear out space.
</description>
</class>
</library>

View File

@@ -0,0 +1,169 @@
/*********************************************************************
*
* Software License Agreement (BSD License)
*
* Copyright (c) 2009, Willow Garage, Inc.
* Copyright (c) 2017, Texas Instruments Incorporated
* All rights reserved.
*
* 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 Willow Garage, Inc. 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.
*
* Author: Eitan Marder-Eppstein
*********************************************************************/
#include <rotate_recovery/rotate_recovery.h>
#include <pluginlib/class_list_macros.h>
//register this planner as a RecoveryBehavior plugin
PLUGINLIB_EXPORT_CLASS(rotate_recovery::RotateRecovery, nav_core::RecoveryBehavior)
namespace rotate_recovery {
RotateRecovery::RotateRecovery(): global_costmap_(NULL), local_costmap_(NULL),
tf_(NULL), initialized_(false), world_model_(NULL) {}
void RotateRecovery::initialize(std::string name, tf::TransformListener* tf,
costmap_2d::Costmap2DROS* global_costmap, costmap_2d::Costmap2DROS* local_costmap){
if(!initialized_){
name_ = name;
tf_ = tf;
global_costmap_ = global_costmap;
local_costmap_ = local_costmap;
//get some parameters from the parameter server
ros::NodeHandle private_nh("~/" + name_);
ros::NodeHandle blp_nh("~/DWAPlannerROS");
//we'll simulate every degree by default
private_nh.param("sim_granularity", sim_granularity_, 0.017);
private_nh.param("frequency", frequency_, 20.0);
blp_nh.param("acc_lim_th", acc_lim_th_, 3.2);
blp_nh.param("max_rotational_vel", max_rotational_vel_, 1.0);
blp_nh.param("min_in_place_rotational_vel", min_rotational_vel_, 0.4);
blp_nh.param("yaw_goal_tolerance", tolerance_, 0.10);
world_model_ = new base_local_planner::CostmapModel(*local_costmap_->getCostmap());
initialized_ = true;
}
else{
ROS_ERROR("You should not call initialize twice on this object, doing nothing");
}
}
RotateRecovery::~RotateRecovery(){
delete world_model_;
}
void RotateRecovery::runBehavior(){
if(!initialized_){
ROS_ERROR("This object must be initialized before runBehavior is called");
return;
}
if(global_costmap_ == NULL || local_costmap_ == NULL){
ROS_ERROR("The costmaps passed to the RotateRecovery object cannot be NULL. Doing nothing.");
return;
}
ROS_WARN("mmWave customized rotate recovery behavior started.");
ROS_WARN("Clearing costmaps...");
global_costmap_->resetLayers();
local_costmap_->resetLayers();
ROS_WARN("Performing rotation...");
ros::Rate r(frequency_);
ros::NodeHandle n;
ros::Publisher vel_pub = n.advertise<geometry_msgs::Twist>("cmd_vel", 10);
tf::Stamped<tf::Pose> global_pose;
local_costmap_->getRobotPose(global_pose);
double current_angle = -1.0 * M_PI;
bool got_180 = false;
double start_offset = angles::normalize_angle_positive(tf::getYaw(global_pose.getRotation()));
while(n.ok()){
local_costmap_->getRobotPose(global_pose);
double norm_angle = angles::normalize_angle_positive(tf::getYaw(global_pose.getRotation()));
current_angle = angles::normalize_angle_positive(norm_angle - start_offset);
//compute the distance left to rotate
double dist_left = (2 * M_PI) - current_angle;
double x = global_pose.getOrigin().x(), y = global_pose.getOrigin().y();
//check if that velocity is legal by forward simulating
double sim_angle = 0.0;
while(sim_angle < dist_left){
double theta = tf::getYaw(global_pose.getRotation()) + sim_angle;
//make sure that the point is legal, if it isn't... we'll abort
double footprint_cost = world_model_->footprintCost(x, y, theta, local_costmap_->getRobotFootprint(), 0.0, 0.0);
if(footprint_cost < 0.0){
ROS_ERROR("Rotate recovery can't rotate in place because there is a potential collision. Cost: %.2f", footprint_cost);
return;
}
sim_angle += sim_granularity_;
}
//compute the velocity that will let us stop by the time we reach the goal
double vel = sqrt(2 * acc_lim_th_ * dist_left);
//make sure that this velocity falls within the specified limits
vel = std::min(std::max(vel, min_rotational_vel_), max_rotational_vel_);
geometry_msgs::Twist cmd_vel;
cmd_vel.linear.x = 0.0;
cmd_vel.linear.y = 0.0;
cmd_vel.angular.z = vel;
vel_pub.publish(cmd_vel);
//makes sure that we won't decide we're done right after we start
if ((fabs(current_angle - M_PI) < M_PI/2) && (got_180 == false))
{
got_180 = true;
}
//if we're done with our in-place rotation... then return
if(got_180 && ((current_angle >= (2*M_PI - tolerance_)) || (current_angle <= (M_PI/2))))
{
cmd_vel.angular.z = 0;
vel_pub.publish(cmd_vel);
ROS_WARN("Completed rotation...");
return;
}
r.sleep();
}
}
};

View File

@@ -0,0 +1,230 @@
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)

View File

@@ -0,0 +1,39 @@
% ***************************************************************
% 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

View File

@@ -0,0 +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 + 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

View File

@@ -0,0 +1,46 @@
% ***************************************************************
% Created for SDK ver:02.00
% Created using Visualizer ver:2.0.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.08
% 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
% ***************************************************************
sensorStop
flushCfg
dfeDataOutputMode 1
channelCfg 15 3 0
adcCfg 2 1
adcbufCfg -1 0 0 1 0
profileCfg 0 77 39 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 33.333 1 0
lowPower 0 1
guiMonitor -1 1 0 0 0 0 0
cfarCfg -1 0 0 8 4 4 0 3072
cfarCfg -1 1 0 4 2 3 0 3072
peakGrouping -1 1 0 1 1 255
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
nearFieldCfg -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 123 0
CQSigImgMonitor 0 127 4
analogMonitor 1 1
sensorStart

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

View File

@@ -0,0 +1,45 @@
% ***************************************************************
% Created for SDK ver:01.02
% Created using Visualizer ver:1.2.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.08
% 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
% ***************************************************************
sensorStop
flushCfg
dfeDataOutputMode 1
channelCfg 15 3 0
adcCfg 2 1
adcbufCfg -1 0 0 1 0
profileCfg 0 77 39 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 33.333 1 0
guiMonitor -1 1 0 0 0 0 0
cfarCfg -1 0 0 8 4 4 0 3072
cfarCfg -1 1 0 4 2 3 0 3072
peakGrouping -1 1 0 1 1 255
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
nearFieldCfg -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 123 0
CQSigImgMonitor 0 127 4
analogMonitor 1 1
sensorStart

View File

@@ -0,0 +1,50 @@
% ***************************************************************
% 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

View File

@@ -0,0 +1,50 @@
% ***************************************************************
% Created for SDK ver:03.02
% Created using Visualizer ver:3.2.0.0_AOP
% Frequency:60
% Platform:xWR68xx_AOP
% Scene Classifier:best_range_res
% Azimuth Resolution(deg):30 + 30
% Range Resolution(m):0.047
% Maximum unambiguous Range(m):9.02
% Maximum Radial Velocity(m/s):4.99
% Radial velocity resolution(m/s):0.63
% 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 43 7 40 0 0 100 1 224 7000 0 0 30
chirpCfg 0 0 0 0 0 0 0 1
chirpCfg 1 1 0 0 0 0 0 2
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
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 4 99 0
CQSigImgMonitor 0 111 4
analogMonitor 0 0
aoaFovCfg -1 -90 90 -90 90
cfarFovCfg -1 0 0 8.40
cfarFovCfg -1 1 -5.02 5.02
sensorStart

View File

@@ -0,0 +1,51 @@
% ***************************************************************
% 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

View File

@@ -0,0 +1,44 @@
% ***************************************************************
% 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

View File

@@ -0,0 +1,51 @@
% ***************************************************************
% 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

View File

@@ -0,0 +1,152 @@
/*
* 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

View File

@@ -0,0 +1,194 @@
/*
* 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

View File

@@ -0,0 +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

View File

@@ -0,0 +1,79 @@
/*
* mmWaveDataFmt.hpp
*
*
*
* 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_FMT_H
#define MMWAVE_DATA_FMT_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>
namespace ti_mmwave_rospkg
{
class mmWaveDataFmt : public nodelet::Nodelet
{
public:
mmWaveDataFmt();
private:
virtual void onInit();
//laserscan publisher
ros::Publisher ;
//pcl publisher
ros::Publisher ;
//radar message subscriber
ros::Subscriber ;
}; //Class mmWaveDataFmt
} //namespace ti_mmwave_rospkg
#endif

View File

@@ -0,0 +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

View File

@@ -0,0 +1,145 @@
Panels:
- Class: rviz/Displays
Help Height: 78
Name: Displays
Property Tree Widget:
Expanded:
- /Grid1
- /Grid1/Offset1
- /PointCloud21
- /PointCloud21/Autocompute Value Bounds1
Splitter Ratio: 0.5
Tree Height: 565
- Class: rviz/Selection
Name: Selection
- Class: rviz/Tool Properties
Expanded:
- /2D Pose Estimate1
- /2D Nav Goal1
- /Publish Point1
Name: Tool Properties
Splitter Ratio: 0.588679016
- Class: rviz/Views
Expanded:
- /Current View1
- /Current View1/Focal Point1
Name: Views
Splitter Ratio: 0.5
- Class: rviz/Time
Experimental: false
Name: Time
SyncMode: 0
SyncSource: PointCloud2
Visualization Manager:
Class: ""
Displays:
- Alpha: 0.5
Cell Size: 1
Class: rviz/Grid
Color: 160; 160; 164
Enabled: true
Line Style:
Line Width: 0.0299999993
Value: Lines
Name: Grid
Normal Cell Count: 0
Offset:
X: 5
Y: 0
Z: 0
Plane: XY
Plane Cell Count: 10
Reference Frame: <Fixed Frame>
Value: true
- Alpha: 1
Autocompute Intensity Bounds: true
Autocompute Value Bounds:
Max Value: 0.5
Min Value: -0.5
Value: false
Axis: Z
Channel Name: intensity
Class: rviz/PointCloud2
Color: 255; 255; 255
Color Transformer: AxisColor
Decay Time: 0.25
Enabled: true
Invert Rainbow: false
Max Color: 255; 255; 255
Max Intensity: 37.8426056
Min Color: 0; 0; 255
Min Intensity: 3.01029992
Name: PointCloud2
Position Transformer: XYZ
Queue Size: 10
Selectable: true
Size (Pixels): 3
Size (m): 0.0299999993
Style: Spheres
Topic: /mmWaveDataHdl/RScan
Unreliable: false
Use Fixed Frame: true
Use rainbow: false
Value: true
Enabled: true
Global Options:
Background Color: 48; 48; 48
Fixed Frame: map
Frame Rate: 30
Name: root
Tools:
- Class: rviz/Interact
Hide Inactive Objects: true
- Class: rviz/MoveCamera
- Class: rviz/Select
- Class: rviz/FocusCamera
- Class: rviz/Measure
- Class: rviz/SetInitialPose
Topic: /initialpose
- Class: rviz/SetGoal
Topic: /move_base_simple/goal
- Class: rviz/PublishPoint
Single click: true
Topic: /clicked_point
Value: true
Views:
Current:
Class: rviz/Orbit
Distance: 7.18657684
Enable Stereo Rendering:
Stereo Eye Separation: 0.0599999987
Stereo Focal Distance: 1
Swap Stereo Eyes: false
Value: false
Focal Point:
X: 2
Y: 0
Z: 0
Focal Shape Fixed Size: true
Focal Shape Size: 0.0500000007
Invert Z Axis: false
Name: Current View
Near Clip Distance: 0.00999999978
Pitch: 0.599798262
Target Frame: <Fixed Frame>
Value: Orbit (rviz)
Yaw: 0
Saved: ~
Window Geometry:
Displays:
collapsed: false
Height: 846
Hide Left Dock: false
Hide Right Dock: true
QMainWindow State: 000000ff00000000fd00000004000000000000016a000002c4fc0200000008fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000006400fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c0061007900730100000028000002c4000000dd00fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261000000010000010f000002c4fc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a005600690065007700730000000028000002c4000000b000fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000004b00000003efc0100000002fb0000000800540069006d00650100000000000004b00000030000fffffffb0000000800540069006d0065010000000000000450000000000000000000000340000002c400000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
Selection:
collapsed: false
Time:
collapsed: false
Tool Properties:
collapsed: false
Views:
collapsed: true
Width: 1200
X: 183
Y: 63

View File

@@ -0,0 +1,145 @@
Panels:
- Class: rviz/Displays
Help Height: 78
Name: Displays
Property Tree Widget:
Expanded:
- /Grid1
- /Grid1/Offset1
- /PointCloud21
- /PointCloud21/Autocompute Value Bounds1
Splitter Ratio: 0.5
Tree Height: 565
- Class: rviz/Selection
Name: Selection
- Class: rviz/Tool Properties
Expanded:
- /2D Pose Estimate1
- /2D Nav Goal1
- /Publish Point1
Name: Tool Properties
Splitter Ratio: 0.588679016
- Class: rviz/Views
Expanded:
- /Current View1
- /Current View1/Focal Point1
Name: Views
Splitter Ratio: 0.5
- Class: rviz/Time
Experimental: false
Name: Time
SyncMode: 0
SyncSource: PointCloud2
Visualization Manager:
Class: ""
Displays:
- Alpha: 0.5
Cell Size: 1
Class: rviz/Grid
Color: 160; 160; 164
Enabled: true
Line Style:
Line Width: 0.0299999993
Value: Lines
Name: Grid
Normal Cell Count: 0
Offset:
X: 5
Y: 0
Z: 0
Plane: XY
Plane Cell Count: 10
Reference Frame: <Fixed Frame>
Value: true
- Alpha: 1
Autocompute Intensity Bounds: true
Autocompute Value Bounds:
Max Value: 0.5
Min Value: -0.5
Value: false
Axis: Z
Channel Name: intensity
Class: rviz/PointCloud2
Color: 255; 255; 255
Color Transformer: Intensity
Decay Time: 0.25
Enabled: true
Invert Rainbow: false
Max Color: 255; 255; 255
Max Intensity: 34.3759193
Min Color: 0; 0; 255
Min Intensity: 6.02059984
Name: PointCloud2
Position Transformer: XYZ
Queue Size: 10
Selectable: true
Size (Pixels): 3
Size (m): 0.0299999993
Style: Spheres
Topic: /mmWaveDataHdl/RScan
Unreliable: false
Use Fixed Frame: true
Use rainbow: false
Value: true
Enabled: true
Global Options:
Background Color: 48; 48; 48
Fixed Frame: map
Frame Rate: 30
Name: root
Tools:
- Class: rviz/Interact
Hide Inactive Objects: true
- Class: rviz/MoveCamera
- Class: rviz/Select
- Class: rviz/FocusCamera
- Class: rviz/Measure
- Class: rviz/SetInitialPose
Topic: /initialpose
- Class: rviz/SetGoal
Topic: /move_base_simple/goal
- Class: rviz/PublishPoint
Single click: true
Topic: /clicked_point
Value: true
Views:
Current:
Class: rviz/Orbit
Distance: 7.18657684
Enable Stereo Rendering:
Stereo Eye Separation: 0.0599999987
Stereo Focal Distance: 1
Swap Stereo Eyes: false
Value: false
Focal Point:
X: 2
Y: 0
Z: 0
Focal Shape Fixed Size: true
Focal Shape Size: 0.0500000007
Invert Z Axis: false
Name: Current View
Near Clip Distance: 0.00999999978
Pitch: 1.56979632
Target Frame: <Fixed Frame>
Value: Orbit (rviz)
Yaw: 0.000380992889
Saved: ~
Window Geometry:
Displays:
collapsed: false
Height: 846
Hide Left Dock: false
Hide Right Dock: true
QMainWindow State: 000000ff00000000fd00000004000000000000016a000002c4fc0200000008fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000006400fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c0061007900730100000028000002c4000000dd00fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261000000010000010f000002abfc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a005600690065007700730000000041000002ab000000b000fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000004b00000003efc0100000002fb0000000800540069006d00650100000000000004b00000030000fffffffb0000000800540069006d0065010000000000000450000000000000000000000340000002c400000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
Selection:
collapsed: false
Time:
collapsed: false
Tool Properties:
collapsed: false
Views:
collapsed: true
Width: 1200
X: 183
Y: 63

View File

@@ -0,0 +1,21 @@
<!--
This file will launch rViz along with the mmWave sensor node and configure a TI mmWave 1443 sensor using a 2D config
-->
<launch>
<!-- Call mmWave sensor launch file -->
<include file="$(find ti_mmwave_rospkg)/launch/ti_mmwave_sensor.launch">
<arg name="device" value="1443" doc="TI mmWave sensor device type [1443, 1642]"/>
<arg name="config" value="2d" 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>
<!-- Static transform from map to base_radar_link for visualization of stand-alone mmWave sensor using Rviz -->
<node pkg="tf" type="static_transform_publisher" name="static_tf_map_to_base_radar_link" args="0 0 0 0 0 0 map base_radar_link 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/radar_det_obj_color_by_intensity.rviz"/>
</launch>

View File

@@ -0,0 +1,21 @@
<!--
This file will launch rViz along with the mmWave sensor node and configure a TI mmWave 1443 sensor using a 3D config
-->
<launch>
<!-- Call mmWave sensor launch file -->
<include file="$(find ti_mmwave_rospkg)/launch/ti_mmwave_sensor.launch">
<arg name="device" value="1443" doc="TI mmWave sensor device type [1443, 1642]"/>
<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>
<!-- Static transform from map to base_radar_link for visualization of stand-alone mmWave sensor using Rviz -->
<node pkg="tf" type="static_transform_publisher" name="static_tf_map_to_base_radar_link" args="0 0 0 0 0 0 map base_radar_link 100"/>
<!-- Launch Rviz with pre-defined configuration to view mmWave sensor detected object data (color by elevation) -->
<node pkg="rviz" type="rviz" name="rviz" args="-d $(find ti_mmwave_rospkg)/launch/radar_det_obj_color_by_elev.rviz"/>
</launch>

View File

@@ -0,0 +1,21 @@
<!--
This file will launch rViz along with the mmWave sensor node and configure a TI mmWave 1642 sensor using a 2D config
-->
<launch>
<!-- Call mmWave sensor launch file -->
<include file="$(find ti_mmwave_rospkg)/launch/ti_mmwave_sensor.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 (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>
<!-- Static transform from map to base_radar_link for visualization of stand-alone mmWave sensor using Rviz -->
<node pkg="tf" type="static_transform_publisher" name="static_tf_map_to_base_radar_link" args="0 0 0 0 0 0 map base_radar_link 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/radar_det_obj_color_by_intensity.rviz"/>
</launch>

View File

@@ -0,0 +1,21 @@
<!--
This file will launch rViz along with the mmWave sensor node and configure a TI mmWave 1843 sensor using a 3D config
-->
<launch>
<!-- Call mmWave sensor launch file -->
<include file="$(find ti_mmwave_rospkg)/launch/ti_mmwave_sensor.launch">
<arg name="device" value="1843" doc="TI mmWave sensor device type [1443, 1642, 6843,1843,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>
<!-- Static transform from map to base_radar_link for visualization of stand-alone mmWave sensor using Rviz -->
<node pkg="tf" type="static_transform_publisher" name="static_tf_map_to_base_radar_link" args="0 0 0 0 0 0 map base_radar_link 100"/>
<!-- Launch Rviz with pre-defined configuration to view mmWave sensor detected object data (color by elevation) -->
<node pkg="rviz" type="rviz" name="rviz" args="-d $(find ti_mmwave_rospkg)/launch/radar_det_obj_color_by_elev.rviz"/>
</launch>

View File

@@ -0,0 +1,21 @@
<!--
This file will launch rViz along with the mmWave sensor node and configure a TI mmWave 6843AOP sensor using a 3D config
-->
<launch>
<!-- Call mmWave sensor launch file -->
<include file="$(find ti_mmwave_rospkg)/launch/ti_mmwave_sensor.launch">
<arg name="device" value="6843AOP" doc="TI mmWave sensor device type [1443, 1642, 6843, 1843, 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>
<!-- Static transform from map to base_radar_link for visualization of stand-alone mmWave sensor using Rviz -->
<node pkg="tf" type="static_transform_publisher" name="static_tf_map_to_base_radar_link" args="0 0 0 0 0 0 map base_radar_link 100"/>
<!-- Launch Rviz with pre-defined configuration to view mmWave sensor detected object data (color by elevation) -->
<node pkg="rviz" type="rviz" name="rviz" args="-d $(find ti_mmwave_rospkg)/launch/radar_det_obj_color_by_elev.rviz"/>
</launch>

View File

@@ -0,0 +1,21 @@
<!--
This file will launch rViz along with the mmWave sensor node and configure a TI mmWave 6843 sensor using a 2D config
-->
<launch>
<!-- Call mmWave sensor launch file -->
<include file="$(find ti_mmwave_rospkg)/launch/ti_mmwave_sensor.launch">
<arg name="device" value="6843" doc="TI mmWave sensor device type [1443, 1642, 6843]"/>
<arg name="config" value="2d" 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>
<!-- Static transform from map to base_radar_link for visualization of stand-alone mmWave sensor using Rviz -->
<node pkg="tf" type="static_transform_publisher" name="static_tf_map_to_base_radar_link" args="0 0 0 0 0 0 map base_radar_link 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/radar_det_obj_color_by_intensity.rviz"/>
</launch>

View File

@@ -0,0 +1,21 @@
<!--
This file will launch rViz along with the mmWave sensor node and configure a TI mmWave 6843 sensor using a 3D config
-->
<launch>
<!-- Call mmWave sensor launch file -->
<include file="$(find ti_mmwave_rospkg)/launch/ti_mmwave_sensor.launch">
<arg name="device" value="6843" doc="TI mmWave sensor device type [1443, 1642, 6843]"/>
<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>
<!-- Static transform from map to base_radar_link for visualization of stand-alone mmWave sensor using Rviz -->
<node pkg="tf" type="static_transform_publisher" name="static_tf_map_to_base_radar_link" args="0 0 0 0 0 0 map base_radar_link 100"/>
<!-- Launch Rviz with pre-defined configuration to view mmWave sensor detected object data (color by elevation) -->
<node pkg="rviz" type="rviz" name="rviz" args="-d $(find ti_mmwave_rospkg)/launch/radar_det_obj_color_by_elev.rviz"/>
</launch>

View File

@@ -0,0 +1,26 @@
<!--
ti_mmwave_rospkg Launch
-->
<launch>
<!-- Input arguments -->
<arg name="device" doc="TI mmWave sensor device type [1443, 1642, 1843, 6843, 6843AOP]"/>
<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="mmWave_Manager" 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)" />
</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" />
</launch>

View File

@@ -0,0 +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>

View File

@@ -0,0 +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>

View File

@@ -0,0 +1,842 @@
/*
* DataHandlerClass.cpp
*
* This is the implementation of the DataHandlerClass.h
* Three threads are spawned when start() is called.
* 1) readIncomingData() thread
* 2) sortIncomingData() thread
* 3) syncedBufferSwap() thread
*
* Together they implement a double-buffered read from the data serial port
* which sorts the data into the class's mmwDataPacket struct.
*
*
* 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.
*
*/
#include <DataHandlerClass.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 <cmath>
DataUARTHandler::DataUARTHandler(ros::NodeHandle* nh) : currentBufp(&pingPongBuffers[0]) , nextBufp(&pingPongBuffers[1])
{
nodeHandle = nh;
DataUARTHandler_pub = nodeHandle->advertise< sensor_msgs::PointCloud2 >("RScan", 100);
maxAllowedElevationAngleDeg = 90; // Use max angle if none specified
maxAllowedAzimuthAngleDeg = 90; // Use max angle if none specified
}
/*Implementation of setUARTPort*/
void DataUARTHandler::setUARTPort(char* mySerialPort)
{
dataSerialPort = mySerialPort;
}
/*Implementation of setBaudRate*/
void DataUARTHandler::setBaudRate(int myBaudRate)
{
dataBaudRate = myBaudRate;
}
/*Implementation of setMaxAllowedElevationAngleDeg*/
void DataUARTHandler::setMaxAllowedElevationAngleDeg(int myMaxAllowedElevationAngleDeg)
{
maxAllowedElevationAngleDeg = myMaxAllowedElevationAngleDeg;
}
/*Implementation of setMaxAllowedAzimuthAngleDeg*/
void DataUARTHandler::setMaxAllowedAzimuthAngleDeg(int myMaxAllowedAzimuthAngleDeg)
{
maxAllowedAzimuthAngleDeg = myMaxAllowedAzimuthAngleDeg;
}
/*Implementation of readIncomingData*/
void *DataUARTHandler::readIncomingData(void)
{
int firstPacketReady = 0;
uint8_t last8Bytes[8] = {0};
/*Open UART Port and error checking*/
serial::Serial mySerialObject("", dataBaudRate, serial::Timeout::simpleTimeout(100));
mySerialObject.setPort(dataSerialPort);
try
{
mySerialObject.open();
} catch (std::exception &e1) {
ROS_INFO("DataUARTHandler Read Thread: Failed to open Data serial port with error: %s", e1.what());
ROS_INFO("DataUARTHandler Read Thread: 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("DataUARTHandler Read Thread: Failed second time to open Data serial port, error: %s", e1.what());
ROS_ERROR("DataUARTHandler Read Thread: Port could not be opened. Port is \"%s\" and baud rate is %d", dataSerialPort, dataBaudRate);
pthread_exit(NULL);
}
}
if(mySerialObject.isOpen())
ROS_INFO("DataUARTHandler Read Thread: Port is open");
else
ROS_ERROR("DataUARTHandler Read Thread: Port could not be opened");
/*Quick magicWord check to synchronize program with data Stream*/
while(!isMagicWord(last8Bytes))
{
last8Bytes[0] = last8Bytes[1];
last8Bytes[1] = last8Bytes[2];
last8Bytes[2] = last8Bytes[3];
last8Bytes[3] = last8Bytes[4];
last8Bytes[4] = last8Bytes[5];
last8Bytes[5] = last8Bytes[6];
last8Bytes[6] = last8Bytes[7];
mySerialObject.read(&last8Bytes[7], 1);
}
/*Lock nextBufp before entering main loop*/
pthread_mutex_lock(&nextBufp_mutex);
while(ros::ok())
{
/*Start reading UART data and writing to buffer while also checking for magicWord*/
last8Bytes[0] = last8Bytes[1];
last8Bytes[1] = last8Bytes[2];
last8Bytes[2] = last8Bytes[3];
last8Bytes[3] = last8Bytes[4];
last8Bytes[4] = last8Bytes[5];
last8Bytes[5] = last8Bytes[6];
last8Bytes[6] = last8Bytes[7];
mySerialObject.read(&last8Bytes[7], 1);
nextBufp->push_back( last8Bytes[7] ); //push byte onto buffer
//ROS_INFO("DataUARTHandler Read Thread: last8bytes = %02x%02x %02x%02x %02x%02x %02x%02x", last8Bytes[7], last8Bytes[6], last8Bytes[5], last8Bytes[4], last8Bytes[3], last8Bytes[2], last8Bytes[1], last8Bytes[0]);
/*If a magicWord is found wait for sorting to finish and switch buffers*/
if( isMagicWord(last8Bytes) )
{
//ROS_INFO("Found magic word");
/*Lock countSync Mutex while unlocking nextBufp so that the swap thread can use it*/
pthread_mutex_lock(&countSync_mutex);
pthread_mutex_unlock(&nextBufp_mutex);
/*increment countSync*/
countSync++;
/*If this is the first packet to be found, increment countSync again since Sort thread is not reading data yet*/
if(firstPacketReady == 0)
{
countSync++;
firstPacketReady = 1;
}
/*Signal Swap Thread to run if countSync has reached its max value*/
if(countSync == COUNT_SYNC_MAX)
{
pthread_cond_signal(&countSync_max_cv);
}
/*Wait for the Swap thread to finish swapping pointers and signal us to continue*/
pthread_cond_wait(&read_go_cv, &countSync_mutex);
/*Unlock countSync so that Swap Thread can use it*/
pthread_mutex_unlock(&countSync_mutex);
pthread_mutex_lock(&nextBufp_mutex);
nextBufp->clear();
memset(last8Bytes, 0, sizeof(last8Bytes));
}
}
mySerialObject.close();
pthread_exit(NULL);
}
int DataUARTHandler::isMagicWord(uint8_t last8Bytes[8])
{
int val = 0, i = 0, j = 0;
for(i = 0; i < 8 ; i++)
{
if( last8Bytes[i] == magicWord[i])
{
j++;
}
}
if( j == 8)
{
val = 1;
}
return val;
}
void *DataUARTHandler::syncedBufferSwap(void)
{
while(ros::ok())
{
pthread_mutex_lock(&countSync_mutex);
while(countSync < COUNT_SYNC_MAX)
{
pthread_cond_wait(&countSync_max_cv, &countSync_mutex);
pthread_mutex_lock(&currentBufp_mutex);
pthread_mutex_lock(&nextBufp_mutex);
std::vector<uint8_t>* tempBufp = currentBufp;
this->currentBufp = this->nextBufp;
this->nextBufp = tempBufp;
pthread_mutex_unlock(&currentBufp_mutex);
pthread_mutex_unlock(&nextBufp_mutex);
countSync = 0;
pthread_cond_signal(&sort_go_cv);
pthread_cond_signal(&read_go_cv);
}
pthread_mutex_unlock(&countSync_mutex);
}
pthread_exit(NULL);
}
void *DataUARTHandler::sortIncomingData( void )
{
MmwDemo_Output_TLV_Types tlvType = MMWDEMO_OUTPUT_MSG_NULL;
uint32_t tlvLen = 0;
uint32_t headerSize;
unsigned int currentDatap = 0;
SorterState sorterState = READ_HEADER;
int i = 0, tlvCount = 0, offset = 0;
int j = 0;
float maxElevationAngleRatioSquared;
float maxAzimuthAngleRatio;
boost::shared_ptr<pcl::PointCloud<pcl::PointXYZI>> RScan(new pcl::PointCloud<pcl::PointXYZI>);
//wait for first packet to arrive
pthread_mutex_lock(&countSync_mutex);
pthread_cond_wait(&sort_go_cv, &countSync_mutex);
pthread_mutex_unlock(&countSync_mutex);
pthread_mutex_lock(&currentBufp_mutex);
while(ros::ok())
{
switch(sorterState)
{
case READ_HEADER:
//init variables
mmwData.numObjOut = 0;
//make sure packet has at least first three fields (12 bytes) before we read them (does not include magicWord since it was already removed)
if(currentBufp->size() < 12)
{
sorterState = SWAP_BUFFERS;
break;
}
//get version (4 bytes)
memcpy( &mmwData.header.version, &currentBufp->at(currentDatap), sizeof(mmwData.header.version));
currentDatap += ( sizeof(mmwData.header.version) );
//get totalPacketLen (4 bytes)
memcpy( &mmwData.header.totalPacketLen, &currentBufp->at(currentDatap), sizeof(mmwData.header.totalPacketLen));
currentDatap += ( sizeof(mmwData.header.totalPacketLen) );
//get platform (4 bytes)
memcpy( &mmwData.header.platform, &currentBufp->at(currentDatap), sizeof(mmwData.header.platform));
currentDatap += ( sizeof(mmwData.header.platform) );
//if packet doesn't have correct header size (which is based on platform), throw it away
// (does not include magicWord since it was already removed)
if ((mmwData.header.platform & 0xFFFF) == 0x1443) // platform is xWR1443)
{
headerSize = 7 * 4; // xWR1443 SDK demo header does not have subFrameNumber field
}
else
{
headerSize = 8 * 4; // header includes subFrameNumber field
}
if(currentBufp->size() < headerSize)
{
sorterState = SWAP_BUFFERS;
break;
}
//get frameNumber (4 bytes)
memcpy( &mmwData.header.frameNumber, &currentBufp->at(currentDatap), sizeof(mmwData.header.frameNumber));
currentDatap += ( sizeof(mmwData.header.frameNumber) );
//get timeCpuCycles (4 bytes)
memcpy( &mmwData.header.timeCpuCycles, &currentBufp->at(currentDatap), sizeof(mmwData.header.timeCpuCycles));
currentDatap += ( sizeof(mmwData.header.timeCpuCycles) );
//get numDetectedObj (4 bytes)
memcpy( &mmwData.header.numDetectedObj, &currentBufp->at(currentDatap), sizeof(mmwData.header.numDetectedObj));
currentDatap += ( sizeof(mmwData.header.numDetectedObj) );
//get numTLVs (4 bytes)
memcpy( &mmwData.header.numTLVs, &currentBufp->at(currentDatap), sizeof(mmwData.header.numTLVs));
currentDatap += ( sizeof(mmwData.header.numTLVs) );
//get subFrameNumber (4 bytes) (not used for XWR1443)
if ((mmwData.header.platform & 0xFFFF) == 0x1443) // platform is xWR1443)
{
// xWR1443 SDK demo header does not have subFrameNumber field
}
else
{
memcpy( &mmwData.header.subFrameNumber, &currentBufp->at(currentDatap), sizeof(mmwData.header.subFrameNumber));
currentDatap += ( sizeof(mmwData.header.subFrameNumber) );
}
//if packet lengths do not match, throw it away
if(mmwData.header.totalPacketLen == currentBufp->size() )
{
sorterState = CHECK_TLV_TYPE;
}
else sorterState = SWAP_BUFFERS;
break;
case READ_OBJ_STRUCT:
// CHECK_TLV_TYPE code has already read tlvType and tlvLen
i = 0;
offset = 0;
if (((mmwData.header.version >> 24) & 0xFF) < 3) // SDK version is older than 3.x
{
//get number of objects
memcpy( &mmwData.numObjOut, &currentBufp->at(currentDatap), sizeof(mmwData.numObjOut));
currentDatap += ( sizeof(mmwData.numObjOut) );
//get xyzQFormat
memcpy( &mmwData.xyzQFormat, &currentBufp->at(currentDatap), sizeof(mmwData.xyzQFormat));
currentDatap += ( sizeof(mmwData.xyzQFormat) );
}
else // SDK version is at least 3.x
{
mmwData.numObjOut = mmwData.header.numDetectedObj;
}
RScan->header.seq = 0;
//RScan->header.stamp = (uint32_t) mmwData.header.timeCpuCycles;
RScan->header.frame_id = "base_radar_link";
RScan->height = 1;
RScan->width = mmwData.numObjOut;
RScan->is_dense = 1;
RScan->points.resize(RScan->width * RScan->height);
// Calculate ratios for max desired elevation and azimuth angles
if ((maxAllowedElevationAngleDeg >= 0) && (maxAllowedElevationAngleDeg < 90))
{
maxElevationAngleRatioSquared = tan(maxAllowedElevationAngleDeg * M_PI / 180.0);
maxElevationAngleRatioSquared = maxElevationAngleRatioSquared * maxElevationAngleRatioSquared;
}
else
{
maxElevationAngleRatioSquared = -1;
}
if ((maxAllowedAzimuthAngleDeg >= 0) && (maxAllowedAzimuthAngleDeg < 90))
{
maxAzimuthAngleRatio = tan(maxAllowedAzimuthAngleDeg * M_PI / 180.0);
}
else
{
maxAzimuthAngleRatio = -1;
}
//ROS_INFO("maxElevationAngleRatioSquared = %f", maxElevationAngleRatioSquared);
//ROS_INFO("maxAzimuthAngleRatio = %f", maxAzimuthAngleRatio);
//ROS_INFO("mmwData.numObjOut before = %d", mmwData.numObjOut);
// Populate pointcloud
while( i < mmwData.numObjOut )
{
if (((mmwData.header.version >> 24) & 0xFF) < 3) // SDK version is older than 3.x
{
//get object range index
memcpy( &mmwData.objOut.rangeIdx, &currentBufp->at(currentDatap), sizeof(mmwData.objOut.rangeIdx));
currentDatap += ( sizeof(mmwData.objOut.rangeIdx) );
//get object doppler index
memcpy( &mmwData.objOut.dopplerIdx, &currentBufp->at(currentDatap), sizeof(mmwData.objOut.dopplerIdx));
currentDatap += ( sizeof(mmwData.objOut.dopplerIdx) );
//get object peak intensity value
memcpy( &mmwData.objOut.peakVal, &currentBufp->at(currentDatap), sizeof(mmwData.objOut.peakVal));
currentDatap += ( sizeof(mmwData.objOut.peakVal) );
//get object x-coordinate
memcpy( &mmwData.objOut.x, &currentBufp->at(currentDatap), sizeof(mmwData.objOut.x));
currentDatap += ( sizeof(mmwData.objOut.x) );
//get object y-coordinate
memcpy( &mmwData.objOut.y, &currentBufp->at(currentDatap), sizeof(mmwData.objOut.y));
currentDatap += ( sizeof(mmwData.objOut.y) );
//get object z-coordinate
memcpy( &mmwData.objOut.z, &currentBufp->at(currentDatap), sizeof(mmwData.objOut.z));
currentDatap += ( sizeof(mmwData.objOut.z) );
//convert from Qformat to float(meters)
float temp[4];
temp[0] = (float) mmwData.objOut.x;
temp[1] = (float) mmwData.objOut.y;
temp[2] = (float) mmwData.objOut.z;
//temp[4] = //doppler
for(int j = 0; j < 3; j++)
{
if(temp[j] > 32767)
temp[j] -= 65535;
temp[j] = temp[j] / pow(2,mmwData.xyzQFormat);
}
// Convert intensity to dB
temp[3] = 10 * log10(mmwData.objOut.peakVal + 1); // intensity
// Map mmWave sensor coordinates to ROS coordinate system
RScan->points[i].x = temp[1]; // ROS standard coordinate system X-axis is forward which is the mmWave sensor Y-axis
RScan->points[i].y = -temp[0]; // ROS standard coordinate system Y-axis is left which is the mmWave sensor -(X-axis)
RScan->points[i].z = temp[2]; // ROS standard coordinate system Z-axis is up which is the same as mmWave sensor Z-axis
RScan->points[i].intensity = temp[3];
}
else // SDK version is 3.x+
{
//get object x-coordinate (meters)
memcpy( &mmwData.newObjOut.x, &currentBufp->at(currentDatap), sizeof(mmwData.newObjOut.x));
currentDatap += ( sizeof(mmwData.newObjOut.x) );
//get object y-coordinate (meters)
memcpy( &mmwData.newObjOut.y, &currentBufp->at(currentDatap), sizeof(mmwData.newObjOut.y));
currentDatap += ( sizeof(mmwData.newObjOut.y) );
//get object z-coordinate (meters)
memcpy( &mmwData.newObjOut.z, &currentBufp->at(currentDatap), sizeof(mmwData.newObjOut.z));
currentDatap += ( sizeof(mmwData.newObjOut.z) );
//get object velocity (m/s)
memcpy( &mmwData.newObjOut.velocity, &currentBufp->at(currentDatap), sizeof(mmwData.newObjOut.velocity));
currentDatap += ( sizeof(mmwData.newObjOut.velocity) );
// Map mmWave sensor coordinates to ROS coordinate system
RScan->points[i].x = mmwData.newObjOut.y; // ROS standard coordinate system X-axis is forward which is the mmWave sensor Y-axis
RScan->points[i].y = -mmwData.newObjOut.x; // ROS standard coordinate system Y-axis is left which is the mmWave sensor -(X-axis)
RScan->points[i].z = mmwData.newObjOut.z; // ROS standard coordinate system Z-axis is up which is the same as mmWave sensor Z-axis
// For SDK 3.x, intensity is replaced by snr in sideInfo and is parsed in the READ_SIDE_INFO code
}
i++;
}
sorterState = CHECK_TLV_TYPE;
break;
case READ_SIDE_INFO:
// Make sure we already received and parsed detected obj list (READ_OBJ_STRUCT)
if (mmwData.numObjOut > 0)
{
for (i = 0; i < mmwData.numObjOut; i++)
{
//get snr (unit is 0.1 steps of dB)
memcpy( &mmwData.sideInfo.snr, &currentBufp->at(currentDatap), sizeof(mmwData.sideInfo.snr));
currentDatap += ( sizeof(mmwData.sideInfo.snr) );
//get noise (unit is 0.1 steps of dB)
memcpy( &mmwData.sideInfo.noise, &currentBufp->at(currentDatap), sizeof(mmwData.sideInfo.noise));
currentDatap += ( sizeof(mmwData.sideInfo.noise) );
RScan->points[i].intensity = (float) mmwData.sideInfo.snr / 10.0; // Use snr for "intensity" field (divide by 10 since unit of snr is 0.1dB)
}
}
else // else just skip side info section if we have not already received and parsed detected obj list
{
i = 0;
while (i++ < tlvLen - 1)
{
//ROS_INFO("DataUARTHandler Sort Thread : Parsing Side Info i=%d and tlvLen = %u", i, tlvLen);
}
currentDatap += tlvLen;
}
sorterState = CHECK_TLV_TYPE;
break;
case READ_LOG_MAG_RANGE:
{
sorterState = CHECK_TLV_TYPE;
}
break;
case READ_NOISE:
{
i = 0;
while (i++ < tlvLen - 1)
{
//ROS_INFO("DataUARTHandler Sort Thread : Parsing Noise Profile i=%d and tlvLen = %u", i, tlvLen);
}
currentDatap += tlvLen;
sorterState = CHECK_TLV_TYPE;
}
break;
case READ_AZIMUTH:
{
i = 0;
while (i++ < tlvLen - 1)
{
//ROS_INFO("DataUARTHandler Sort Thread : Parsing Azimuth Profile i=%d and tlvLen = %u", i, tlvLen);
}
currentDatap += tlvLen;
sorterState = CHECK_TLV_TYPE;
}
break;
case READ_DOPPLER:
{
i = 0;
while (i++ < tlvLen - 1)
{
//ROS_INFO("DataUARTHandler Sort Thread : Parsing Doppler Profile i=%d and tlvLen = %u", i, tlvLen);
}
currentDatap += tlvLen;
sorterState = CHECK_TLV_TYPE;
}
break;
case READ_STATS:
{
i = 0;
while (i++ < tlvLen - 1)
{
//ROS_INFO("DataUARTHandler Sort Thread : Parsing Stats Profile i=%d and tlvLen = %u", i, tlvLen);
}
currentDatap += tlvLen;
sorterState = CHECK_TLV_TYPE;
}
break;
case CHECK_TLV_TYPE:
//ROS_INFO("DataUARTHandler Sort Thread : tlvCount = %d, numTLV = %d", tlvCount, mmwData.header.numTLVs);
if(tlvCount++ >= mmwData.header.numTLVs) // Done parsing all received TLV sections
{
// Publish detected object pointcloud
if (mmwData.numObjOut > 0)
{
j = 0;
for (i = 0; i < mmwData.numObjOut; i++)
{
// Keep point if elevation and azimuth angles are less than specified max values
// (NOTE: The following calculations are done using ROS standard coordinate system axis definitions where X is forward and Y is left)
if (((maxElevationAngleRatioSquared == -1) ||
(((RScan->points[i].z * RScan->points[i].z) / (RScan->points[i].x * RScan->points[i].x +
RScan->points[i].y * RScan->points[i].y)
) < maxElevationAngleRatioSquared)
) &&
((maxAzimuthAngleRatio == -1) || (fabs(RScan->points[i].y / RScan->points[i].x) < maxAzimuthAngleRatio)) &&
(RScan->points[i].x != 0)
)
{
//ROS_INFO("Kept point");
// copy: points[i] => points[j]
memcpy( &RScan->points[j], &RScan->points[i], sizeof(RScan->points[i]));
j++;
}
// Otherwise, remove the point
else
{
//ROS_INFO("Removed point");
}
}
mmwData.numObjOut = j; // update number of objects as some points may have been removed
// Resize point cloud since some points may have been removed
RScan->width = mmwData.numObjOut;
RScan->points.resize(RScan->width * RScan->height);
//ROS_INFO("mmwData.numObjOut after = %d", mmwData.numObjOut);
//ROS_INFO("DataUARTHandler Sort Thread: number of obj = %d", mmwData.numObjOut );
DataUARTHandler_pub.publish(RScan);
}
//ROS_INFO("DataUARTHandler Sort Thread : CHECK_TLV_TYPE state says tlvCount max was reached, going to switch buffer state");
sorterState = SWAP_BUFFERS;
}
else // More TLV sections to parse
{
//get tlvType (32 bits) & remove from queue
memcpy( &tlvType, &currentBufp->at(currentDatap), sizeof(tlvType));
currentDatap += ( sizeof(tlvType) );
//ROS_INFO("DataUARTHandler Sort Thread : sizeof(tlvType) = %d", sizeof(tlvType));
//get tlvLen (32 bits) & remove from queue
memcpy( &tlvLen, &currentBufp->at(currentDatap), sizeof(tlvLen));
currentDatap += ( sizeof(tlvLen) );
//ROS_INFO("DataUARTHandler Sort Thread : sizeof(tlvLen) = %d", sizeof(tlvLen));
//ROS_INFO("DataUARTHandler Sort Thread : tlvType = %d, tlvLen = %d", (int) tlvType, tlvLen);
switch(tlvType)
{
case MMWDEMO_OUTPUT_MSG_NULL:
break;
case MMWDEMO_OUTPUT_MSG_DETECTED_POINTS:
//ROS_INFO("DataUARTHandler Sort Thread : Object TLV");
sorterState = READ_OBJ_STRUCT;
break;
case MMWDEMO_OUTPUT_MSG_RANGE_PROFILE:
//ROS_INFO("DataUARTHandler Sort Thread : Range TLV");
sorterState = READ_LOG_MAG_RANGE;
break;
case MMWDEMO_OUTPUT_MSG_NOISE_PROFILE:
//ROS_INFO("DataUARTHandler Sort Thread : Noise TLV");
sorterState = READ_NOISE;
break;
case MMWDEMO_OUTPUT_MSG_AZIMUTH_STATIC_HEAT_MAP:
//ROS_INFO("DataUARTHandler Sort Thread : Azimuth Heat TLV");
sorterState = READ_AZIMUTH;
break;
case MMWDEMO_OUTPUT_MSG_RANGE_DOPPLER_HEAT_MAP:
//ROS_INFO("DataUARTHandler Sort Thread : R/D Heat TLV");
sorterState = READ_DOPPLER;
break;
case MMWDEMO_OUTPUT_MSG_STATS:
//ROS_INFO("DataUARTHandler Sort Thread : Stats TLV");
sorterState = READ_STATS;
break;
case MMWDEMO_OUTPUT_MSG_DETECTED_POINTS_SIDE_INFO:
//ROS_INFO("DataUARTHandler Sort Thread : Side info TLV");
sorterState = READ_SIDE_INFO;
break;
case MMWDEMO_OUTPUT_MSG_MAX:
//ROS_INFO("DataUARTHandler Sort Thread : Header TLV");
sorterState = READ_HEADER;
break;
default: break;
}
}
break;
case SWAP_BUFFERS:
pthread_mutex_lock(&countSync_mutex);
pthread_mutex_unlock(&currentBufp_mutex);
countSync++;
if(countSync == COUNT_SYNC_MAX)
{
pthread_cond_signal(&countSync_max_cv);
}
pthread_cond_wait(&sort_go_cv, &countSync_mutex);
pthread_mutex_unlock(&countSync_mutex);
pthread_mutex_lock(&currentBufp_mutex);
currentDatap = 0;
tlvCount = 0;
sorterState = READ_HEADER;
break;
default: break;
}
}
pthread_exit(NULL);
}
void DataUARTHandler::start(void)
{
pthread_t uartThread, sorterThread, swapThread;
int iret1, iret2, iret3;
pthread_mutex_init(&countSync_mutex, NULL);
pthread_mutex_init(&nextBufp_mutex, NULL);
pthread_mutex_init(&currentBufp_mutex, NULL);
pthread_cond_init(&countSync_max_cv, NULL);
pthread_cond_init(&read_go_cv, NULL);
pthread_cond_init(&sort_go_cv, NULL);
countSync = 0;
/* Create independent threads each of which will execute function */
iret1 = pthread_create( &uartThread, NULL, this->readIncomingData_helper, this);
if(iret1)
{
ROS_INFO("Error - pthread_create() return code: %d\n",iret1);
ros::shutdown();
}
iret2 = pthread_create( &sorterThread, NULL, this->sortIncomingData_helper, this);
if(iret2)
{
ROS_INFO("Error - pthread_create() return code: %d\n",iret1);
ros::shutdown();
}
iret3 = pthread_create( &swapThread, NULL, this->syncedBufferSwap_helper, this);
if(iret3)
{
ROS_INFO("Error - pthread_create() return code: %d\n",iret1);
ros::shutdown();
}
ros::spin();
pthread_join(iret1, NULL);
ROS_INFO("DataUARTHandler Read Thread joined");
pthread_join(iret2, NULL);
ROS_INFO("DataUARTHandler Sort Thread joined");
pthread_join(iret3, NULL);
ROS_INFO("DataUARTHandler Swap Thread joined");
pthread_mutex_destroy(&countSync_mutex);
pthread_mutex_destroy(&nextBufp_mutex);
pthread_mutex_destroy(&currentBufp_mutex);
pthread_cond_destroy(&countSync_max_cv);
pthread_cond_destroy(&read_go_cv);
pthread_cond_destroy(&sort_go_cv);
}
void* DataUARTHandler::readIncomingData_helper(void *context)
{
return (static_cast<DataUARTHandler*>(context)->readIncomingData());
}
void* DataUARTHandler::sortIncomingData_helper(void *context)
{
return (static_cast<DataUARTHandler*>(context)->sortIncomingData());
}
void* DataUARTHandler::syncedBufferSwap_helper(void *context)
{
return (static_cast<DataUARTHandler*>(context)->syncedBufferSwap());
}

View File

@@ -0,0 +1,115 @@
/*
* mmWaveCommSrv.cpp
* Description: This file implements 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.
*
*/
#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();
private_nh.getParam("/mmWave_Manager/command_port", mySerialPort);
private_nh.getParam("/mmWave_Manager/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;
}
}

View File

@@ -0,0 +1,64 @@
/*
* mmWaveDataFmt.cpp
* Description:
*
* 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.
*
*/
#include "mmWaveDataFmt.hpp"
namespace ti_mmwave_rospkg
{
PLUGINLIB_EXPORT_CLASS(ti_mmwave_rospkg::mmWaveDataFmt, nodelet::Nodelet);
mmWaveDataFmt::mmWaveDataFmt() {}
void mmWaveDataFmt::onInit()
{
ros::NodeHandle private_nh = getPrivateNodeHandle();
}
//TODO: callback for radar message
void mmWaveDataFmt::something_here()
{
}
//TODO: callback for type
void mmWaveDataFmt::something_else_here()
{
}
}

View File

@@ -0,0 +1,91 @@
/*
* mmWaveDataHdl.cpp
*
* Description:This file implements 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.
*
*/
#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 = getPrivateNodeHandle();
std::string mySerialPort;
int myBaudRate;
int myMaxAllowedElevationAngleDeg;
int myMaxAllowedAzimuthAngleDeg;
private_nh.getParam("/mmWave_Manager/data_port", mySerialPort);
private_nh.getParam("/mmWave_Manager/data_rate", myBaudRate);
if (!(private_nh.getParam("/mmWave_Manager/max_allowed_elevation_angle_deg", myMaxAllowedElevationAngleDeg)))
{
myMaxAllowedElevationAngleDeg = 90; // Use max angle if none specified
}
if (!(private_nh.getParam("/mmWave_Manager/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.setUARTPort( (char*) mySerialPort.c_str() );
DataHandler.setBaudRate( myBaudRate );
DataHandler.setMaxAllowedElevationAngleDeg( myMaxAllowedElevationAngleDeg );
DataHandler.setMaxAllowedAzimuthAngleDeg( myMaxAllowedAzimuthAngleDeg );
DataHandler.start();
NODELET_DEBUG("mmWaveDataHdl: Finished onInit function");
}
}

View File

@@ -0,0 +1,66 @@
/*
* mmWaveLoader.cpp
*
*
* This file implements a ROS node which will load the mmWaveDataHdl and mmWaveCommSrv nodelets at runtime.
* Use the following command to start this node:
*
* rosrun ti_mmwave_rospkg ti_mmwave_rospkg _data_port:=/dev/ttyACM1 _data_rate:=921600 _command_port:=/dev/ttyACM0 _command_rate:=115200
*
* And replace the ports with the proper name on your system.
*
*
* 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.
*
*/
#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;
}

View File

@@ -0,0 +1,134 @@
/*
* mmWaveQuickConfig.cpp
*
* This file will load a .txt file specified at the command line
* and parse it, sending each line to the mmWaveCLI service as a command.
* Examples configurations are provided under the cfg folder.
*
* 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.
*
*/
#include "ros/ros.h"
#include "ti_mmwave_rospkg/mmWaveCLI.h"
#include <cstdlib>
#include <fstream>
#include <stdio.h>
#include <regex>
int main(int argc, char **argv)
{
ros::init(argc, argv, "mmWaveQuickConfig");
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::NodeHandle n;
ros::ServiceClient client = n.serviceClient<ti_mmwave_rospkg::mmWaveCLI>("/mmWaveCommSrv/mmWaveCLI");
ti_mmwave_rospkg::mmWaveCLI srv;
std::ifstream myParams;
//wait for service to become available
ros::service::waitForService("/mmWaveCommSrv/mmWaveCLI", 100000);
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: Ignored blank or comment line: '%s'", srv.request.comm.c_str() );
}
// Send commands to mmWave sensor
else
{
ROS_INFO("mmWaveQuickConfig: Sending command: '%s'", srv.request.comm.c_str() );
int numTries = 0;
// Try each command twice if first time fails (in case serial port connection had initial error)
while (numTries < 2)
{
if( client.call(srv) )
{
if (std::regex_search(srv.response.resp, std::regex("Done") ))
{
ROS_INFO("mmWaveQuickConfig: Command successful (mmWave sensor responded with 'Done')");
break;
}
else if (numTries == 0)
{
ROS_INFO("mmWaveQuickConfig: Command failed (mmWave sensor did not respond with 'Done')");
ROS_INFO("mmWaveQuickConfig: Response: '%s'", srv.response.resp.c_str() );
}
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;
}
numTries++;
}
}
}
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;
}

View File

@@ -0,0 +1,3 @@
string comm
---
string resp

View File

@@ -0,0 +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 Logo](http://www.turtlebot.com/assets/images/turtlebot_logo.png)

View File

@@ -0,0 +1,13 @@
# This configures the environment variables for a create based turtlebot
# running the Turtlebot 2.0 software. This is necessary to run after
# setup.bash to ensure the create drivers and nodes are all correctly launched.
#
# You may wish to set the 3d sensor to asus_xtion_pro if you do not have a kinect
# though. While the kinect settings work for the asus in terms of 3d sensing (openni
# handles the abstraction) the asus settiing makes sure the mesh shown in rviz/gazebo
# is the asus.
export TURTLEBOT_BASE=create
export TURTLEBOT_STACKS=circles
export TURTLEBOT_3D_SENSOR=kinect
export TURTLEBOT_SIMULATION=false

View File

@@ -0,0 +1,13 @@
# This configures the environment variables for a kobuki based turtlebot.
# Currently this script isn't actually needed as the values below are
# defaults.
#
# You may wish to set the 3d sensor to asus_xtion_pro if you do not have a kinect
# though. While the kinect settings work for the asus in terms of 3d sensing (openni
# handles the abstraction) the asus settiing makes sure the mesh shown in rviz/gazebo
# is the asus.
export TURTLEBOT_BASE=kobuki
export TURTLEBOT_STACKS=hexagons
export TURTLEBOT_3D_SENSOR=radar
export TURTLEBOT_SIMULATION=false

View File

@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?fileVersion 4.0.0?>
<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
<storageModule moduleId="org.eclipse.cdt.core.settings">
<cconfiguration id="cdt.managedbuild.toolchain.gnu.base.647447099">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.toolchain.gnu.base.647447099" moduleId="org.eclipse.cdt.core.settings" name="Default">
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration buildProperties="" id="cdt.managedbuild.toolchain.gnu.base.647447099" name="Default" parent="org.eclipse.cdt.build.core.emptycfg">
<folderInfo id="cdt.managedbuild.toolchain.gnu.base.647447099.152571619" name="/" resourcePath="">
<toolChain id="cdt.managedbuild.toolchain.gnu.base.584652511" name="cdt.managedbuild.toolchain.gnu.base" superClass="cdt.managedbuild.toolchain.gnu.base">
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.target.gnu.platform.base.867259224" name="Debug Platform" osList="linux,hpux,aix,qnx" superClass="cdt.managedbuild.target.gnu.platform.base"/>
<builder id="cdt.managedbuild.target.gnu.builder.base.629026303" managedBuildOn="false" name="Gnu Make Builder.Default" superClass="cdt.managedbuild.target.gnu.builder.base"/>
<tool id="cdt.managedbuild.tool.gnu.archiver.base.1183691927" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.base.79254247" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.base"/>
<tool id="cdt.managedbuild.tool.gnu.c.compiler.base.1809545855" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.base"/>
<tool id="cdt.managedbuild.tool.gnu.c.linker.base.1559981847" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.base"/>
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.base.165109707" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.base"/>
<tool id="cdt.managedbuild.tool.gnu.assembler.base.638281991" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.base"/>
</toolChain>
</folderInfo>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="turtlebot.null.2019119152" name="turtlebot"/>
</storageModule>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</storageModule>
</cproject>

View File

@@ -0,0 +1,79 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>turtlebot</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<triggers>clean,full,incremental,</triggers>
<arguments>
<dictionary>
<key>?name?</key>
<value></value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.append_environment</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
<value>all</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.buildArguments</key>
<value></value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.buildCommand</key>
<value>make</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
<value>clean</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.contents</key>
<value>org.eclipse.cdt.make.core.activeConfigSettings</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
<value>false</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableFullBuild</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
<value>all</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.stopOnError</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
<value>true</value>
</dictionary>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.cdt.core.cnature</nature>
<nature>org.eclipse.cdt.core.ccnature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
</natures>
</projectDescription>

View File

@@ -0,0 +1,78 @@
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Changelog for package turtlebot
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2.4.2 (2016-12-22)
------------------
2.4.1 (2016-12-22)
------------------
2.4.0 (2016-11-01)
------------------
2.3.12 (2016-06-27)
-------------------
2.3.11 (2015-04-15)
-------------------
2.3.10 (2015-04-02)
-------------------
2.3.9 (2015-03-30)
------------------
2.3.8 (2015-03-23)
------------------
2.3.7 (2015-03-02)
------------------
2.3.6 (2015-02-27)
------------------
2.3.5 (2015-01-12)
------------------
2.3.4 (2015-01-07)
------------------
2.3.3 (2015-01-05)
------------------
2.3.2 (2014-12-30)
------------------
* cleanup metapackage. add teleop and remove laptop battery_monitor
* Contributors: Jihoon Lee
2.3.1 (2014-12-30)
------------------
2.3.0 (2014-11-30)
------------------
* migrate linux_hardware as linux_peripheral_interfaces repo
* adds turtlebot_capabilities package and related changes
* Contributors: Jihoon Lee, Marcus Liebhardt
2.2.2 (2013-10-14)
------------------
2.2.1 (2013-09-14)
------------------
* CMake logic bugfixes.
2.2.0 (2013-08-29)
------------------
* Changelogs at package level.
* Add eclipse project files.
Release 2.1.x - hydro, unstable
===============================
2.1.1 (2013-08-06)
------------------
2.1.0 (2013-07-15)
------------------
* Remove obsolete turtlebot_app_manager, as on Hydro we use rocon_app_manager

View File

@@ -0,0 +1,4 @@
cmake_minimum_required(VERSION 2.8.3)
project(turtlebot)
find_package(catkin REQUIRED)
catkin_metapackage()

View File

@@ -0,0 +1,29 @@
<package>
<name>turtlebot</name>
<version>2.4.2</version>
<description>
The turtlebot meta package provides all the basic drivers for running and using a TurtleBot.
</description>
<author>Tully Foote</author>
<author>Michael Ferguson</author>
<author>Melonee Wise</author>
<maintainer email="stonier@rnd.yujinrobot.com">Daniel Stonier</maintainer>
<maintainer email="tfoote@osrfoundation.org">Tully Foote</maintainer>
<maintainer email="mferguson@willowgarage.com">Michael Ferguson</maintainer>
<maintainer email="mwise@willowgarage.com">Melonee Wise</maintainer>
<license>BSD</license>
<url type="website">http://ros.org/wiki/turtlebot</url>
<url type="repository">https://github.com/turtlebot/turtlebot</url>
<url type="bugtracker">https://github.com/turtlebot/turtlebot/issues</url>
<buildtool_depend>catkin</buildtool_depend>
<run_depend>turtlebot_bringup</run_depend>
<run_depend>turtlebot_capabilities</run_depend>
<run_depend>turtlebot_description</run_depend>
<run_depend>turtlebot_teleop</run_depend>
<export>
<metapackage/>
</export>
</package>

View File

@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?fileVersion 4.0.0?>
<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
<storageModule moduleId="org.eclipse.cdt.core.settings">
<cconfiguration id="cdt.managedbuild.toolchain.gnu.base.594254725">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.toolchain.gnu.base.594254725" moduleId="org.eclipse.cdt.core.settings" name="Default">
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration buildProperties="" id="cdt.managedbuild.toolchain.gnu.base.594254725" name="Default" parent="org.eclipse.cdt.build.core.emptycfg">
<folderInfo id="cdt.managedbuild.toolchain.gnu.base.594254725.272292205" name="/" resourcePath="">
<toolChain id="cdt.managedbuild.toolchain.gnu.base.1706939857" name="cdt.managedbuild.toolchain.gnu.base" superClass="cdt.managedbuild.toolchain.gnu.base">
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.target.gnu.platform.base.2059153274" name="Debug Platform" osList="linux,hpux,aix,qnx" superClass="cdt.managedbuild.target.gnu.platform.base"/>
<builder id="cdt.managedbuild.target.gnu.builder.base.628433825" managedBuildOn="false" name="Gnu Make Builder.Default" superClass="cdt.managedbuild.target.gnu.builder.base"/>
<tool id="cdt.managedbuild.tool.gnu.archiver.base.317344600" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.base.1842856607" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.base"/>
<tool id="cdt.managedbuild.tool.gnu.c.compiler.base.1570123029" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.base"/>
<tool id="cdt.managedbuild.tool.gnu.c.linker.base.1454829730" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.base"/>
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.base.8971692" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.base"/>
<tool id="cdt.managedbuild.tool.gnu.assembler.base.350800188" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.base"/>
</toolChain>
</folderInfo>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
</storageModule>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="turtlebot_bringup.null.531423875" name="turtlebot_bringup"/>
</storageModule>
</cproject>

View File

@@ -0,0 +1,85 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>turtlebot_bringup</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.python.pydev.PyDevBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<triggers>clean,full,incremental,</triggers>
<arguments>
<dictionary>
<key>?name?</key>
<value></value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.append_environment</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
<value>all</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.buildArguments</key>
<value></value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.buildCommand</key>
<value>make</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
<value>clean</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.contents</key>
<value>org.eclipse.cdt.make.core.activeConfigSettings</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
<value>false</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableFullBuild</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
<value>all</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.stopOnError</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
<value>true</value>
</dictionary>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.cdt.core.cnature</nature>
<nature>org.eclipse.cdt.core.ccnature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
<nature>org.python.pydev.pythonNature</nature>
</natures>
</projectDescription>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?eclipse-pydev version="1.0"?>
<pydev_project>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
</pydev_project>

View File

@@ -0,0 +1,241 @@
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Changelog for package turtlebot_bringup
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2.4.2 (2016-12-22)
------------------
2.4.1 (2016-12-22)
------------------
* Modify R200 launch file.
Modified the R200 3D sensor launch file
to conform more closely to the other
open_ni2-style sensor launch files. This
allows the data processing arguments passed
in to correctly pass through and control
image processing.
This allows the turtlebot_follower package,
for example, to set "depth_processing" to
true to enable the /camera/depth/depth_rect/
topic with the R200 as it can with other
cameras.
* Refactor cmd_vel_mux.
Moved mobile_base_nodelet_manager and cmd_vel_mux to a
common, higher-level launch file.
Currently each base-specific mobile_base.launch.xml
loaded the same cmd_vel_mux node with the same configuration.
To reduce this redundancy, launching this nodelet has been
moved to the common, higher-level mobile_base.launch.xml.
The mobile_base_nodelet_manager has been moved up to facilitate
this change.
* Remove unnecessary mobile_base.launch.xml layer
mobile_base.launch.xml currently is just a pass-through to
include the TURTLEBOT_BASE-specific launch file. Simply
removed this unnecessary layer.
* Contributors: Kevin C. Wells
2.4.0 (2016-11-01)
------------------
* Add support for Intel R200 camera
Added necessary launch, urdf, etc. files to
add support for the R200 camera in Turtlebot.
Updated r200 URDF to inclue proper mounting.
Added runtime dependency on realsense_camera package.
* [bringup] remove outdated broken comment
* refactor concert content out of minimal and create separate concert_minimal.launch
The concert_minimal.launch includes minmal.launch
* propagate netbook battery to other similar launch file
* disable the battery node if TURTLEBOT_BATTERY is set to None
Fixes `#224 <https://github.com/turtlebot/turtlebot/issues/224>`_
* Contributors: Daniel Stonier, Kevin C. Wells, Tully Foote
2.3.12 (2016-06-27)
-------------------
* update xacro usage for jade deprecations
comment out unused arguments generating errors
* add support for Orbbec Astra
* add the teleop switch script as a default input to support joystick interactive follower
* use rocon_apps/make_a_map for make a map interaction closes `#210 <https://github.com/turtlebot/turtlebot/issues/210>`_
* Fix icon for interactions.
* Contributors: Jihoon Lee, Tully Foote, commaster90
2.3.11 (2015-04-15)
-------------------
* interaction fix closes `#208 <https://github.com/turtlebot/turtlebot/issues/208>`_
* Contributors: Jihoon Lee
2.3.10 (2015-04-02)
-------------------
* update interaction name regarding android pairing as change of android apps name
* Contributors: dwlee
2.3.9 (2015-03-30)
------------------
* add chirp in android pairing closes `#205 <https://github.com/turtlebot/turtlebot/issues/205>`_
* Contributors: Jihoon Lee
2.3.8 (2015-03-23)
------------------
* update compatibility for upgrade turtlebot android apps
* Merge pull request `#201 <https://github.com/turtlebot/turtlebot/issues/201>`_ from dwlee/indigo_teleop
Update interaction
* [turtlebot_bringup] fix conflicts in the turtlebot base launchers
* [turtlebot_bringup] doc strings for roslaunch args.
* update android teleop remapping rule and add kitkat in compatibility
* add rapp preferred configuration
* expose the interactions list in a way that conforms to the rest of the turtlebot environment settings.
* doc'ified some url args.
* bugfixes incorrect concert_whitelist arg default, fixes `#199 <https://github.com/turtlebot/turtlebot/issues/199>`_.
* Merge branch 'indigo' of https://github.com/turtlebot/turtlebot into indigo
* visualisation interactions
* add ps3 joystick interactions closes `#196 <https://github.com/turtlebot/turtlebot/issues/196>`_
* Contributors: Daniel Stonier, Jihoon Lee, dwlee
2.3.7 (2015-03-02)
------------------
* switch openni driver to openni2 for asus xtion pro
* Contributors: Jihoon Lee
2.3.6 (2015-02-27)
------------------
* Merge pull request `#194 <https://github.com/turtlebot/turtlebot/issues/194>`_ from turtlebot/asus_center
Configurable 3d sensor
* update urdf. now new position uses asus_xtion_pro. Old position is asus_xtion_pro_offset
* update env hook to to use centered asus
* add 3dsensor aluncher
* asus is now default
* updates
* Merge branch 'indigo' into 3dsensor_config
* separate launchers for kinect and asus
* Contributors: Daniel Stonier, Jihoon Lee
2.3.5 (2015-01-12)
------------------
* bringup depend on capabilities. capabilities should not depend on bringup `#185 <https://github.com/turtlebot/turtlebot/issues/185>`_
* Contributors: Jihoon Lee
2.3.4 (2015-01-07)
------------------
* remove turtlebot_capabilities from run_depend closes `#185 <https://github.com/turtlebot/turtlebot/issues/185>`_
* Contributors: Jihoon Lee
2.3.3 (2015-01-05)
------------------
* add kobuki_capabilities and turtlebot_capabilities as run_depend in turtlebot_bring fixes `#184 <https://github.com/turtlebot/turtlebot/issues/184>`_
* Contributors: Jihoon Lee
2.3.2 (2014-12-30)
------------------
2.3.1 (2014-12-30)
------------------
* use env for rapp parsing
* use turtlebot as envinroment variable prefixes
* install interactions directory closes `#176 <https://github.com/turtlebot/turtlebot/issues/176>`_
* Contributors: Jihoon Lee
2.3.0 (2014-11-30)
------------------
* removing unused args
* move out turtlebot map file environment variable to turtlebot_navigation, refs `#163 <https://github.com/turtlebot/turtlebot/issues/163>`_.
* fixing typo in concert_client.launch
* add interaction icons to fix `#162 <https://github.com/turtlebot/turtlebot/issues/162>`_
* migrate linux_hardware as linux_peripheral_interfaces repo
* Revert "Adding the rosbridge setting for using rosbridge on pairing mode"
* align the arg
* add the rosbridge setting for using rosbridge on pairing mode
* Change env-vars to not overwrite already set vars
* concert version turtlebot
* proper remappings and use video_teleop virtual rapp
* Merge pull request `#148 <https://github.com/turtlebot/turtlebot/issues/148>`_ from turtlebot/irdevel
Update to use environment hooks for turtlebot_bringup / Android pairing updates
* Move robot name and type to environment variable as mentioned in `#134 <https://github.com/turtlebot/turtlebot/issues/134>`_
* Fix compatibility uri's to filter out PC interactions on Android
* Split Android and PC Pairing into seperate roles
* Update to use env-hooks for Turtlebot
* Initial Android fixes
* Update to account for turtlebot_rapps/teleop change to implement rocon_apps/teleop
* cleanup legacy install rule. and remove concert directory which is not valid anymore
* Rolled android and qt make_a_map and map_nav into one
* Remove unncessary launchers as app manager and capabilities are rolled into minimal now
* Enable capabilities server for turtlebot on indigo
* Fix mapping for Qt teleop
* Bugfix changes - small
* Added more interactions
* Added interactions to Turtlebot on indigo, collapsed minimal_with_appmanager into just minimal
* better acceleration defaults after experimental observations.
* refactor turtlebot_core_apps -> turtlebot_rapps
* Remap cmd_vel for the calibration script
It needs to match the turtlebot node in order to monitor for changes
* Load calibration on turtlebot bringup
* add depth argument to configure scan_processing. With this configuration scan works for both depth_regratation false and true
* add blacklist argument
* compatible with new app manager
* rapp exporting for new rocon_app_manager
* patches to keep the consistency of arguments `#114 <https://github.com/turtlebot/turtlebot/issues/114>`_
* Merge pull request `#114 <https://github.com/turtlebot/turtlebot/issues/114>`_ from mayrjohannes/hydro-devel
Added serial port as parameter to launch files (Issue https://github.com/turtlebot/turtlebot/issues/111)
* Fixing "Error with diagnostics.yaml for roomba `#110 <https://github.com/turtlebot/turtlebot/issues/110>`_"
* updates capabilities-specific rosinstaller
* adds turtlebot_capabilities package and related changes
* Trivial comment spelling fix rhoomba -> roomba
* turtlebot_bringup: adds capabilities (server + default provider configs)
* adding name for rapp list
* Added serial port as parameter to launch files
modified: create/mobile_base.launch.xml
modified: kobuki/mobile_base.launch.xml
modified: mobile_base.launch.xml
modified: roomba/mobile_base.launch.xml
modified: ../minimal.launch
Committer: mayrjohannes <joh.mayr@jku.at>
Author: mayrjohannes <joh.mayr@jku.at>
* Contributors: Daniel Stonier, DongWook Lee, Jihoon Lee, Kenneth Bogert, Luka Čehovin, Marcus Liebhardt, Yujin, kentsommer, wheeled_robin
2.2.2 (2013-10-14)
------------------
* Rename cmd_vel_mux as yocs_cmd_vel_mux.
* Temporary fix for hub whitelists so pairing doesn't get distracted by concerts.
2.2.1 (2013-09-14)
------------------
* remove cmake install rule for now obsoleted upstart files.
2.2.0 (2013-08-29)
------------------
* convenient paired launchers (no uuids, auto-invitations).
* Robot description in paired master.
* Modularising robot description to use with paired masters.
* Remove outdated upstart directory.
* Rename include launchers to xyz.launch.xml.
* Changelogs at package level.
* Remove _mobile_base_soft.launch
* Do not use robot_pose_ekf for kobuki base. Instead, use imu for heading and encoders por x and y.
* A bunch of fixes on absolute and application namespaces
* Depend on turtlebot_description rather than the specific instances kobuki, create.
* Update dependency to openni_launch and remove component dependencies.
2.1.x - hydro, unstable
=======================
2.1.1 (2013-08-06)
------------------
* Fix TurtleBot name
* Add map manager rapp and rapp-related namespace changes to 3dsensor.launch
* Change 3dsensor.launch so we maximize use of openni_launch
* Use the new app manager
* Use the new app manager app list format. Remove turtlebot_sounds, as it's already included on rocon apps
* Public master for android app is 11311, and private master is 11312
* Add turtlebot2 icons
2.1.0 (2013-07-15)
------------------
* Catkinized
* Use more aggressive acceleration limits
* Use the new Rocon app manager: http://www.ros.org/wiki/rocon_app_manager
Previous versions, bugfixing
============================
Available in ROS wiki: http://ros.org/wiki/turtlebot/ChangeList

View File

@@ -0,0 +1,30 @@
cmake_minimum_required(VERSION 2.8.3)
project(turtlebot_bringup)
find_package(catkin REQUIRED COMPONENTS)
catkin_package()
catkin_add_env_hooks(25.turtlebot SHELLS sh DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/env-hooks)
install(
PROGRAMS
scripts/turtlebot_addr.py
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
install(DIRECTORY launch
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
install(DIRECTORY param
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
install(DIRECTORY icons
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
install(DIRECTORY interactions
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)

View File

@@ -0,0 +1,34 @@
# Set some sane defaults for the turtlebot launch environment
##Documentation:
# The colon command simply has its arguments evaluated and then succeeds.
# It is the original shell comment notation (before '#' to end of line). For a long time, Bourne shell scripts had a colon as the first character.
# The C Shell would read a script and use the first character to determine whether it was for the C Shell (a '#' hash) or the Bourne shell (a ':' colon).
# Then the kernel got in on the act and added support for '#!/path/to/program' and the Bourne shell got '#' comments, and the colon convention went by the wayside.
# But if you come across a script that starts with a colon (Like this one), now you will know why. ~ Jonathan Leffler
: ${TURTLEBOT_BASE:=kobuki} # create, roomba
: ${TURTLEBOT_BATTERY:=/sys/class/power_supply/BAT0} # /proc/acpi/battery/BAT0 in 2.6 or earlier kernels, /sys/class/power_supply/ (kernels 3.0+)
: ${TURTLEBOT_STACKS:=hexagons} # circles, hexagons
: ${TURTLEBOT_3D_SENSOR:=asus_xtion_pro} # kinect, asus_xtion_pro, asus_xtion_pro_offset
: ${TURTLEBOT_SIMULATION:=false}
: ${TURTLEBOT_SERIAL_PORT:=/dev/kobuki} # /dev/ttyUSB0, /dev/ttyS0
: ${TURTLEBOT_NAME:=turtlebot}
: ${TURTLEBOT_TYPE:=turtlebot}
: ${TURTLEBOT_RAPP_PACKAGE_WHITELIST:=[rocon_apps, turtlebot_rapps]}
: ${TURTLEBOT_RAPP_PACKAGE_BLACKLIST:=[]}
: ${TURTLEBOT_INTERACTIONS_LIST:=[turtlebot_bringup/admin.interactions, turtlebot_bringup/documentation.interactions, turtlebot_bringup/pairing.interactions, turtlebot_bringup/visualisation.interactions]}
# Exports
export TURTLEBOT_BASE
export TURTLEBOT_BATTERY
export TURTLEBOT_STACKS
export TURTLEBOT_3D_SENSOR
export TURTLEBOT_SIMULATION
export TURTLEBOT_SERIAL_PORT
export TURTLEBOT_NAME
export TURTLEBOT_TYPE
export TURTLEBOT_RAPP_PACKAGE_WHITELIST
export TURTLEBOT_RAPP_PACKAGE_BLACKLIST
export TURTLEBOT_INTERACTIONS_LIST

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

View File

@@ -0,0 +1,36 @@
# .-----------------------------------------------------------------.
# / .-. .-. \
#| / \ / \ |
#| |\_. | Admin Interactions | /| |
#|\| | /| |\ | |/|
#| `---' | | `---' |
#| | | | *
#| |-----------------------------------------------------| |
#\ | | /
# \ / \ /
# `---' `---'
- name: rocon_master_info
role: 'Admin'
compatibility: rocon:/pc/*/hydro|indigo/precise|quantal|raring|saucy|trusty
display_name: Rocon Master Info (Direct Executable)
description: Generic information about this master.
max: -1
- name: rqt_graph/rqt_graph
role: 'Admin'
compatibility: rocon:/pc/*/hydro|indigo/precise|quantal|raring|saucy|trusty
display_name: Rqt Graph (Ros Runnable)
description: Graph of all topics and services in the concert workspace.
max: -1
icon:
resource_name: rocon_bubble_icons/rqt.png
- name: rqt_console/rqt_console
role: 'Admin'
compatibility: rocon:/pc/*/hydro|indigo/precise|quantal|raring|saucy|trusty
display_name: Rqt Console (Ros Runnable)
description: Shows the Rqt Console
max: -1
icon:
resource_name: rocon_bubble_icons/rqt.png

View File

@@ -0,0 +1,52 @@
# .-----------------------------------------------------------------.
# / .-. .-. \
#| / \ / \ |
#| |\_. | Documentation Interactions | /| |
#|\| | /| |\ | |/|
#| `---' | | `---' |
#| | | | *
#| |-----------------------------------------------------| |
#\ | | /
# \ / \ /
# `---' `---'
- name: web_url(http://wiki.ros.org/Robots/TurtleBot?distro=indigo)
role: 'Documentation'
compatibility: rocon:/pc
display_name: Ros Wiki - TurtleBot
description: Documentation for TurtleBot on the ros wiki
icon:
resource_name: rocon_bubble_icons/ros.png
- name: web_url(https://plus.google.com/+TurtleBot/posts)
role: 'Documentation'
compatibility: rocon:/pc
display_name: TurtleBot Google+
description: Official TurtleBot Google+
icon:
resource_name: rocon_bubble_icons/ros.png
- name: web_url(http://kobuki.yujinrobot.com/home-en/)
role: 'Documentation'
compatibility: rocon:/pc
display_name: TurtleBot 2 Kobuki Page
description: Official TurtleBot 2 Kobuki Page
icon:
resource_name: rocon_bubble_icons/ros.png
- name: web_url(https://groups.google.com/forum/#!forum/ros-sig-turtlebot)
role: 'Documentation'
compatibility: rocon:/pc
display_name: ROS TurtleBot Special Interest Group
description: Google Groups page for ROS TurtleBot Special Interest Group
icon:
resource_name: rocon_bubble_icons/ros.png
- name: web_url(http://answers.ros.org/questions/scope:all/sort:activity-desc/page:1/query:turtlebot%7Ckobuki%7Cturtlebot2/)
role: 'Documentation'
compatibility: rocon:/pc
display_name: ROS Answers
description: ROS Answers for TurtleBot, Kobuki, and TurtleBot 2
icon:
resource_name: rocon_bubble_icons/ros.png

View File

@@ -0,0 +1,247 @@
# .-----------------------------------------------------------------.
# / .-. .-. \
#| / \ / \ |
#| |\_. | Pairing Interactions | /| |
#|\| | /| |\ | |/|
#| `---' | | `---' |
#| | | | *
#| |-----------------------------------------------------| |
#\ | | /
# \ / \ /
# `---' `---'
#####################
# PC Pairing #
#####################
- name: turtlebot_teleop/keyboard_teleop.launch
role: PC Pairing
compatibility: rocon:/pc/*/hydro|indigo/precise|quantal|raring|saucy|trusty
display_name: Keyboard Teleop
description: Teleop the TurleBot using your keyboard
max: -1
icon:
resource_name: turtlebot_rapps/teleop_bubble_icon.png
- name: rocon_teleop
role: PC Pairing
compatibility: rocon:/pc/*/hydro|indigo/precise|quantal|raring|saucy|trusty
display_name: Qt Joystick Teleop
description: Teleop the TurleBot using the Qt Teleop Joystick
max: -1
icon:
resource_name: turtlebot_rapps/joystick.png
remappings:
- remap_from: cmd_vel
remap_to: /teleop/cmd_vel
- remap_from: compressed_image
remap_to: /teleop/compressed_image
parameters:
maximum_linear_velocity: 0.5
maximum_angular_velocity: 0.75
pairing:
rapp: rocon_apps/video_teleop
remappings: []
- name: rocon_qt_listener/qt_listener.py
role: PC Pairing
compatibility: rocon:/pc/*/hydro|indigo/precise|quantal|raring|saucy|trusty
display_name: Listener
description: A pyqt listener for testing pairing.
max: -1
remappings:
- remap_from: chatter
remap_to: /conversation/chatter
pairing:
rapp: rocon_apps/talker
remappings:
- remap_from: chatter
remap_to: /conversation/chatter
- name: ""
role: PC Pairing
compatibility: rocon:/pc/*/hydro|indigo/precise|quantal|raring|saucy|trusty
display_name: Chirp
description: A strange noise appears
max: -1
icon:
resource_name: rocon_apps/cow.png
pairing:
rapp: rocon_apps/chirp
remappings: []
- name: ""
role: PC Pairing
compatibility: rocon:/pc/*/hydro|indigo/precise|quantal|raring|saucy|trusty
display_name: Follower
description: Take the TurtleBot for a stroll. TurtleBot will follow whatever is in front of it.
max: -1
icon:
resource_name: turtlebot_rapps/follower_bubble_icon.png
pairing:
rapp: turtlebot_rapps/follower
remappings: []
- name: ""
role: PC Pairing
compatibility: rocon:/pc/*/hydro|indigo/precise|quantal|raring|saucy|trusty
display_name: PS3 Teleop
description: Control the TurtleBot with a PlayStation 3 Joystick.
max: 1
icon:
resource_name: turtlebot_rapps/ps3_bubble_icon.png
pairing:
rapp: turtlebot_rapps/ps3_teleop
remappings: []
- name: turtlebot_rviz_launchers/view_navigation.launch
role: PC Pairing
compatibility: rocon:/pc/*/hydro|indigo/precise|quantal|raring|saucy|trusty
display_name: Navigation
description: Qt Map Navigation
max: -1
icon:
resource_name: turtlebot_rapps/map_nav_bubble_icon.png
pairing:
rapp: turtlebot_rapps/map_nav
remappings: []
- name: turtlebot_rviz_launchers/view_teleop_navigation.launch
role: PC Pairing
compatibility: rocon:/pc/*/hydro|indigo/precise|quantal|raring|saucy|trusty
display_name: Make A Map
description: Qt Make A Map
max: -1
icon:
resource_name: turtlebot_rapps/make_a_map_bubble_icon.png
pairing:
rapp: rocon_apps/make_a_map
remappings: []
- name: turtlebot_rviz_launchers/view_robot.launch
role: PC Pairing
compatibility: rocon:/pc/*/hydro|indigo/precise|quantal|raring|saucy|trusty
display_name: 3D Sensing
description: Qt 3D Sensor viewing
max: -1
icon:
resource_name: turtlebot_rapps/3dsensor_bubble_icon.png
pairing:
rapp: turtlebot_rapps/3dsensor
remappings: []
##########################
# Android Pairing #
##########################
- name: ""
role: Android Pairing
compatibility: rocon:/*/*/indigo/jellybean|kitkat
display_name: Chirp
description: A strange noise appears
max: -1
icon:
resource_name: rocon_apps/cow.png
pairing:
rapp: rocon_apps/chirp
remappings: []
- name: com.github.rosjava.android_apps.map_nav.indigo.MainActivity
role: Android Pairing
compatibility: rocon:/*/*/indigo/jellybean|kitkat
display_name: Map Navigation
description: Android navigation of a known map
max: -1
icon:
resource_name: turtlebot_rapps/map_nav_bubble_icon.png
remappings:
- remap_from: cmd_vel
remap_to: /teleop/cmd_vel
- remap_from: compressed_image
remap_to: /teleop/compressed_image
pairing:
rapp: turtlebot_rapps/map_nav
remappings: []
- name: com.github.rosjava.android_apps.make_a_map.indigo.MainActivity
role: Android Pairing
compatibility: rocon:/*/*/indigo/jellybean|kitkat
display_name: Make A Map
description: Make a map by driving a TurtleBot from an Android device.
max: -1
icon:
resource_name: turtlebot_rapps/make_a_map_bubble_icon.png
remappings:
- remap_from: cmd_vel
remap_to: /teleop/cmd_vel
- remap_from: compressed_image
remap_to: /teleop/compressed_image
pairing:
rapp: rocon_apps/make_a_map
remappings: []
- name: com.github.turtlebot.turtlebot_android.panorama.indigo.PanoramaActivity
role: Android Pairing
compatibility: rocon:/*/*/indigo/jellybean|kitkat
display_name: Panorama
description: Turtlebot makes a 360 degree panorama image.
max: -1
icon:
resource_name: turtlebot_rapps/panorama_bubble_icon.png
pairing:
rapp: turtlebot_rapps/panorama
remappings: []
- name: com.github.turtlebot.turtlebot_android.follower.indigo.FollowerActivity
role: Android Pairing
compatibility: rocon:/*/*/indigo/jellybean|kitkat
display_name: Follower
description: Take the TurtleBot for a stroll. TurtleBot will follow whatever is in front of it.
max: -1
icon:
resource_name: turtlebot_rapps/follower_bubble_icon.png
pairing:
rapp: turtlebot_rapps/follower
remappings: []
- name: com.github.rosjava.android_remocons.listener.indigo.Listener
role: Android Pairing
compatibility: rocon:/*/*/indigo/jellybean|kitkat
display_name: Listener
description: A Android listener for testing pairing.
max: -1
remappings:
- remap_from: chatter
remap_to: /conversation/chatter
pairing:
rapp: rocon_apps/talker
remappings:
- remap_from: chatter
remap_to: /conversation/chatter
- name: com.github.rosjava.android_apps.teleop.indigo.MainActivity
role: Android Pairing
compatibility: rocon:/*/*/indigo/jellybean|kitkat
display_name: Teleop
description: Teleop the TurtleBot using an Android Device
max: -1
icon:
resource_name: turtlebot_rapps/teleop_bubble_icon.png
remappings:
- remap_from: cmd_vel
remap_to: /teleop/cmd_vel
- remap_from: compressed_image
remap_to: /teleop/compressed_image
parameters:
maximum_linear_velocity: 0.5
maximum_angular_velocity: 0.75
pairing:
rapp: rocon_apps/video_teleop
remappings: []

View File

@@ -0,0 +1,32 @@
# .-----------------------------------------------------------------.
# / .-. .-. \
#| / \ / \ |
#| |\_. | Visualisation Interactions | /| |
#|\| | /| |\ | |/|
#| `---' | | `---' |
#| | | | *
#| |-----------------------------------------------------| |
#\ | | /
# \ / \ /
# `---' `---'
- name: turtlebot_rviz_launchers/view_model.launch
role: Visualisation
compatibility: rocon:/pc/*/hydro|indigo/precise|quantal|raring|saucy|trusty
display_name: View Model
description: View the robot model (only).
max: -1
icon:
resource_name: rocon_bubble_icons/rviz.png
- name: turtlebot_rviz_launchers/view_robot.launch
role: Visualisation
compatibility: rocon:/pc/*/hydro|indigo/precise|quantal|raring|saucy|trusty
display_name: View Robot
description: View the robot with basic sensor connections hooked up.
max: -1
icon:
resource_name: rocon_bubble_icons/rviz.png

View File

@@ -0,0 +1,78 @@
<!--
Turtlebot is a bit low on horsepower...
We use openni_camera here, turn everything on by default
(allows the user to conveniently see everything when
launching this on its own - use with
turtebot_rviz_launchers/view_robot.launch to visualise)
and provide args to disable them so you can optimise the
horsepower for your application.
For an example of disabling processing modules, check
any of the turtlebot_rapps (e.g. android_make_a_map.launch
only enables scan_processing for depthimage_to_laserscan and
rgb_processing for the android tele-view).
-->
<launch>
<!-- "camera" should uniquely identify the device. All topics are pushed down
into the "camera" namespace, and it is prepended to tf frame ids. -->
<arg name="camera" default="camera"/>
<arg name="publish_tf" default="false"/>
<arg name="3d_sensor" default="radar"/> <!-- kinect, asus_xtion_pro -->
<!-- Factory-calibrated depth registration -->
<arg name="depth_registration" default="true"/>
<arg if="$(arg depth_registration)" name="depth" value="depth_registered" />
<arg unless="$(arg depth_registration)" name="depth" value="depth" />
<!-- Processing Modules -->
<arg name="rgb_processing" default="true"/>
<arg name="ir_processing" default="true"/>
<arg name="depth_processing" default="true"/>
<arg name="depth_registered_processing" default="true"/>
<arg name="disparity_processing" default="true"/>
<arg name="disparity_registered_processing" default="true"/>
<arg name="scan_processing" default="true"/>
<!-- Worker threads for the nodelet manager -->
<arg name="num_worker_threads" default="4" />
<!-- Radarscan topic -->
<arg name="scan_topic" default="scan"/>
<include file="$(find turtlebot_bringup)/launch/includes/3dsensor/$(arg 3d_sensor).launch.xml">
<arg name="camera" value="$(arg camera)"/>
<arg name="publish_tf" value="$(arg publish_tf)"/>
<arg name="depth_registration" value="$(arg depth_registration)"/>
<arg name="num_worker_threads" value="$(arg num_worker_threads)" />
<!-- Processing Modules -->
<arg name="rgb_processing" value="$(arg rgb_processing)"/>
<arg name="ir_processing" value="$(arg ir_processing)"/>
<arg name="depth_processing" value="$(arg depth_processing)"/>
<arg name="depth_registered_processing" value="$(arg depth_registered_processing)"/>
<arg name="disparity_processing" value="$(arg disparity_processing)"/>
<arg name="disparity_registered_processing" value="$(arg disparity_registered_processing)"/>
</include>
<!-- Laserscan
This uses lazy subscribing, so will not activate until scan is requested.
<group if="$(arg scan_processing)">
<node pkg="nodelet" type="nodelet" name="depthimage_to_laserscan" args="load depthimage_to_laserscan/DepthImageToLaserScanNodelet $(arg camera)/$(arg camera)_nodelet_manager">
--> <!-- Pixel rows to use to generate the laserscan. For each column, the scan will
return the minimum value for those pixels centered vertically in the image.
<param name="scan_height" value="10"/>
<param name="output_frame_id" value="/$(arg camera)_depth_frame"/>
<param name="range_min" value="0.45"/>
<remap from="image" to="$(arg camera)/$(arg depth)/image_raw"/>
<remap from="scan" to="$(arg scan_topic)"/>
-->
<!-- Somehow topics here get prefixed by "$(arg camera)" when not inside an app namespace,
so in this case "$(arg scan_topic)" must provide an absolute topic name (issue #88).
Probably is a bug in the nodelet manager: https://github.com/ros/nodelet_core/issues/7
<remap from="$(arg camera)/image" to="$(arg camera)/$(arg depth)/image_raw"/>
<remap from="$(arg camera)/scan" to="$(arg scan_topic)"/>
</node>
</group>-->
</launch>

View File

@@ -0,0 +1,90 @@
<launch>
<!-- Turtlebot -->
<arg name="base" default="$(env TURTLEBOT_BASE)" 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="$(env TURTLEBOT_3D_SENSOR)" doc="3d sensor types [kinect, asux_xtion_pro]"/>
<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="robot_name" default="$(env TURTLEBOT_NAME)" doc="used as a unique identifier and occasionally to preconfigure root namespaces, gateway/zeroconf ids etc."/>
<arg name="robot_type" default="$(env TURTLEBOT_TYPE)" doc="just in case you are considering a 'variant' and want to make use of this."/>
<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)" />
</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>
<!-- Rapp Manager -->
<arg name="rapp_auto_installation" default="false" doc="automatically install rapps from the web (not typically used)"/> <!-- http://wiki.ros.org/rocon_app_manager/Tutorials/indigo/Automatic Rapp Installation -->
<arg name="rapp_package_whitelist" default="$(env TURTLEBOT_RAPP_PACKAGE_WHITELIST)" doc="a list of catkin packages that provide rapps to be loaded by the app manager."/>
<arg name="rapp_package_blacklist" default="$(env TURTLEBOT_RAPP_PACKAGE_BLACKLIST)" doc="a list of catkin packages to blacklist from providing rapps."/>
<arg name="rapp_preferred_configuration_file" default="$(find turtlebot_bringup)/param/preferred_rapp.yaml" doc="a configuration of preferred rapps"/>
<arg name="robot_icon" default="turtlebot_bringup/turtlebot2.png" doc="passed to user interfaces to socialise the turtlebot's appearance"/>
<arg name="rapp_verbose" default="true" doc="show verbose output from running apps (aka roslaunch --screen)"/>
<!-- ***************************** Rocon Master Info ************************** -->
<arg name="robot_description" default="Kick-ass ROS turtle" doc="user friendly robot description."/>
<!-- Capabilities -->
<arg name="capabilities" default="true" doc="start and register an underlying capability server"/>
<arg name="capabilities_parameters" default="$(find turtlebot_bringup)/param/capabilities/defaults_tb2.yaml" doc="preload the capability server with this configurations" /> <!-- defaults_tb.yaml, defaults_tb2.yaml -->
<arg name="capabilities_package_whitelist" default="[kobuki_capabilities, std_capabilities, turtlebot_capabilities]" doc="register capabilities from these packages only" />
<arg name="capabilities_blacklist" default="['std_capabilities/Navigation2D', 'std_capabilities/MultiEchoLaserSensor']" doc="blacklist these specific capabilities from being registered" />
<!-- Interactions -->
<!-- disable interactions for now. See issue https://github.com/robotics-in-concert/rocon_tools/issues/57-->
<arg name="interactions" default="false" doc="start an interactions manager"/>
<arg name="interactions_list" default="$(env TURTLEBOT_INTERACTIONS_LIST)" doc="a list of filenames that provide interactions specifications."/>
<!-- Connectivity -->
<arg name="robot_unique_name" default="true" doc="postfix a uuid to robot_name to create unique namespaces for rapps (else manually guarantee unique names for multimaster'ing)"/>
<arg name="concert_whitelist" default="[]" doc="list of multimaster hubs (concerts) to connect to"/>
<arg name="local_machine_only" default="false" doc="connect only to multimaster hubs (concerts) on the local machine (testing option)"/>
<arg name="concert_watch_period" default="10" doc="polling loop for discovering multimaster hubs (concerts)" />
<arg name="firewall" default="false" doc="block people from flipping (registering topics) on this master."/>
<!-- Rapp Manager Concert Client mode -->
<include file="$(find rocon_app_manager)/launch/concert_client.launch">
<!-- Rapp Manager -->
<arg name="robot_name" value="$(arg robot_name)" />
<arg name="robot_type" value="$(arg robot_type)" />
<arg name="robot_icon" value="$(arg robot_icon)" />
<arg name="rapp_package_whitelist" value="$(arg rapp_package_whitelist)" />
<arg name="rapp_package_blacklist" value="$(arg rapp_package_blacklist)" />
<arg name="rapp_preferred_configuration_file" value="$(arg rapp_preferred_configuration_file)" />
<arg name="screen" value="$(arg rapp_verbose)" />
<arg name="rapp_auto_installation" value="$(arg rapp_auto_installation)" />
<!-- Rocon Master Info -->
<arg name="robot_description" value="$(arg robot_description)" />
<!-- Capabilities -->
<arg name="capabilities" value="$(arg capabilities)" />
<arg name="capabilities_blacklist" value="$(arg capabilities_blacklist)" />
<arg name="capabilities_package_whitelist" value="$(arg capabilities_package_whitelist)" />
<arg name="capabilities_parameters" value="$(arg capabilities_parameters)" />
<!-- Interactions -->
<arg name="interactions" value="$(arg interactions)"/>
<arg name="interactions_list" value="$(arg interactions_list)"/>
<!-- Connectivity -->
<arg name="firewall" value="$(arg firewall)"/>
<arg name="robot_unique_name" value="$(arg robot_unique_name)"/>
<arg name="concert_watch_period" value="$(arg concert_watch_period)"/>
<arg name="concert_whitelist" value="$(arg concert_whitelist)"/>
<arg name="local_machine_only" value="$(arg local_machine_only)"/>
</include>
</launch>

Some files were not shown because too many files have changed in this diff Show More