frk2 / opencaret

An open-source/open-data L3 highway autopilot system for modern cars. Initially being perfected on the Kia Soul EV
MIT License
57 stars 22 forks source link

Jose/useful scripts #27

Closed J-Rojas closed 5 years ago

J-Rojas commented 5 years ago

@frk2 Take a look at these changes. I decided to remove ros1_bridge launching inside all_launch.py because it forces ros1 nodes to be running, otherwise errors occur (for example, roscore must be up and running). It's better to launch these two tools together in a separate console using the scripts below as a one time setup to decouple ros1 and ros2 operational modes.

Also I'd like to move all visualization tools from ros2 launch to ros1 since that's where the recording is occurring. I've disabled radar_viz in the all_launch.py file for this reason and it's now an optional node launch using the scripts/launch_ros1.sh --viz option.

We should also look at using rviz1 instead of rviz2 due to some of the bugs in rviz2.

For all the scripts, ROS1_ROOT and ROS2_ROOT should be set as .bashrc/.profile environment variables.

To run ros2 nodes in a new console:

source ./scripts/source_ros2.sh ./scripts/launch_ros2.sh

To setup and launch roscore and ros1_bridge in a new console:

source ./scripts/source_ros1.sh ./scripts/ros1_setup.sh

To launch ros1 rosbag recording in a new console (no camera recording): source ./scripts/source_ros1.sh ./scripts/launch_ros1.sh

To launch ros1 camera capture using ZED, visualization, rosbag recording in a new console:

source ./scripts/source_ros1.sh ./scripts/launch_ros1.sh --camera --viz

To launch ros1 camera capture using libav and a different device, along with rosbag recording:

source ./scripts/source_ros1.sh ./scripts/launch_ros1.sh --libav --device /dev/video0 --camera

To launch playback with visualization tools:

./scripts/launch_playback_ros1.sh [bagfile]

To launch ros1 bridge with ros2 nodes:

./scripts/launch_ros2.sh --bridge