This ROS package configures and communicates with the Tritech Micron sonar. This has only been tested on ROS Indigo, Jade, and Kinetic over RS232.
You must clone this repository as tritech_micron
into your catkin
workspace's src
directory:
roscd
cd src
git clone https://github.com/mcgill-robotics/ros-tritech-micron.git tritech_micron
Before proceeding, make sure to install all the dependencies by running:
rosdep update
rosdep install tritech_micron
You must compile this package before being able to run it. You can do so by running:
catkin_make
from the root of your workspace.
To run, simply connect the Tritech Micron sonar over RS232 and launch the package with:
roslaunch tritech_micron tritech_micron.launch port:=</path/to/sonar> frame:=<frame_id>
port
and frame
are run-time ROS launch arguments:
port
: Serial port to read from, default:/dev/sonar
.frame
:tf
frame to stamp the messages with, default:sonar
.
The package will keep trying to connect to the sonar until it is successful.
The tritech_micron
node will output to the following ROS topics:
~scan
:PointCloud
message. Scan data of the current heading only.~heading
:PoseStamped
message. Current heading of the sonar.~config
:TritechMicronConfig
message. Sonar config published on change.
To configure the Tritech Micron sonar, take a look at the parameters defined in Scan.cfg.
These paramaters can also be updated on the fly with ROS dynamic_reconfigure
as such:
rosrun rqt_reconfigure rqt_reconfigure
The scan data can be conveniently visualized with rviz
.
Simply, add the tritech_micron/scan
topic as a PointCloud
message to the
view and make sure to set the Decay Time
parameter to the number of seconds
it takes to run a full scan in order to see the full scan at once instead of
only one slice.
If done properly, you should be able to see something like this: