Modem Simulator Quick Start#
Attention
Some of these instructions are out of date, and users have had
trouble. Look at the ros_acomms_tests
directory for functioning
examples.
You can use the included Dockerfile to build a Docker container, download a pre-built Docker image, or just check out this repository and run one of the example launch files.
Install: 1. Create a ROS workspace, if you don’t already have one. See
the ROS documentation for more information. 2. Clone ros_acomms:
git clone https://git.whoi.edu/acomms/ros_acomms.git
3. Change
directory into ros_acomms cd ros_acomms
4. Run setup.bash
pip install -r requirements.txt
5. Rebuild your workspace with
catkin_make
6. Run the modem_sim_test launch file from a console. It
will print messages to stdout. Assuming you are in your ROS workspace
root: roslaunch src/ros_acomms/src/launch/modem_sim_test.launch
Modify this launch file to change parameters, spawn additional modems, etc. To display version information make sure to include the version_node in your launch file.
To interface with ros_acomms first copy queue_test.launch and message_codec_config.yaml from /launch and put them into your own ROS repo. The message_codec_config.yaml file will need to be adjusted to fit your messages. Make sure to edit the subscribe_topic, publish_topic, and ros_type fields to match your namespaces. Additionally the fields key will need to be updated for each parameter within your message. Each message should have its own message_codec within the config. All unnecessary message configs can be safely removed.
Info codec typing can be found at /src/acomms_codes/ltcodecs/init.py. Further exploration of parameters / defaults can be found in the specific codec type files held within the ltcodecs directory.
If your message is being sent / recived more than once it is likely the way you have your namespaces set up. One solution is to remove message_queue_node from one of the modems and packet_dispatch from the other. Additionally, you can use namespaces like /modem0/command.
Differences between the modem driver and modem sim#
Beyond the obvious differences (the sim supports simulation, including sim time and synchronization), there are a few differences: 1. The sim does not currently support the tx_inhibit dynamic reconfigure parameter.