ROS Nodes
This is a guide to the ROS nodes that are used in the SEAN project. You can see where the nodes are called via ls ~/sim_ws/tmux/sean_navstack/.tmuxinator.yml
. Checkout the ROS wiki for more information and details.
windows:
- navstack:
layout: tiled
panes:
- shell:
- core:
- roscore
- bridge:
- roslaunch --wait social_sim_ros sim_tcp_bridge.launch
- move_base:
- roslaunch --wait social_sim_ros kuri_move_base.launch
- description:
- roslaunch --wait social_sim_ros kuri_description.launch
- map_publisher:
- rosrun social_sim_ros map_publisher.py
- trial_info:
- roslaunch --wait social_sim_ros trial_info.launch prefix:=./data/metrics/<%=@settings['task']%> condition:=navstack
- scan:
- roslaunch --wait social_sim_ros depth_to_laserscan.launch
- rviz:
- rosrun rviz rviz -d $(rospack find social_sim_ros)/config/move.rviz
.launch
files can be found under sim_ws/src/social_sim_ros/social_sim_ros/launch
. Functions of the nodes and relevant files (for debugging):
roscore
The prerequisite to having your ROS system; the main node.
bridge (sim_tcp_bridge.launch)
This enables communication between ROS and Unity via a TCP bridge.
This node will tell you if you are properly connected to your Unity instance.
This node launches the tcp_server.py
script in social_sim_ros
.
move_base (kuri_move_base.launch)
...
description (kuri_description.launch)
...
map_publisher (map_publisher.py)
...
trial_info (trial_info.launch)
This node records info and metrics about the currently running Unity trials and saves them to the designated path.
You can pass in arguments by running the tmuxinator config as tmuxinator start sean_navstack arg1=arg1 arg2=arg2...
.
For instance, tmuxinator start sean_navstack task=JoinGroup
changes the prefix for the designated path.
scan (depth_to_laserscan.launch)
This node runs the depth_synchronizer.py
script which processes the compressed image from Unity and publishes a topic
with the raw image.
rviz
This node launches an rviz instance for easy visualization of your trials.
Adding a recorder node to record rosbags of running trials
The following can be added as a pane to the sean_navstack
tmuxinator config (under the panes section) for
a window to open when the tmuxinator config is started that records rosbags of the running trials in Unity. The prefix
for the data path can be changed so that the rosbags are saved to the directory of choice.
- recorder:
- rosrun social_sim_ros ros_controlled_recorder.py prefix:=/data/sim_ws/