The commands below should be used to get this ROS package up and running in VSCode and using the ROS dev container
Run the setup script to setup dev container
./setup.sh
NOTE: Update the params.yaml file in the simple_tracker_launch/config directory to change camera details
Run the build script to build the project
./build.sh
Run the launch script to launch the project. This will source the setup.bash file and launch the application
./launch.sh
Run the simulation launch script to launch the project in simulation mode. This will source the setup.bash file and launch the application
./launch_simulation.sh
[frame_provider-4] [INFO] [1675115712.958444773] [frame_provider]: frame_provider node is up and running.Simple visualiser-1 at.apa.xcb: could not connect to display 1 [simple visualiser-101 at.apa.plugin: Could not load the Ot platform plugin "xcb" in "" even though it was found
Then run the folllowing commands:
export DISPLAY=:0
xhost +
If you are attempting to launch with a Windows host then above commands will not suffice. Since Windows does not run X a workaround is to:
- Install VcXsrv: https://sourceforge.net/projects/vcxsrv/
- Start VcXsrv and configure it to allow connection from any host
- Set the DISPLAY environment variable in the Docker container to the host IP address and display number of the VcXsrv server e.g. export DISPLAY=192.xxx.x.xxx:0
- Run VcXsrv xlaunch.exe and then finally run launch.sh on the container
ros2 bag play 2023_01_25-16_48_14/
where 2023_01_25-16_48_14/ is a folder that contains a rosbag recording./launch_rosbag_replay.sh
- When the visualiser is up and running, a number of key presses are currently handled as to allow you to change the configuration dynamically:
- + This will increase the size of the image
- - This will decrease the size of the image
- m This will switch masks
- c This will switch controllers, however you need to have configured your camera details as per above for this to work
- This will update the "frame_provider_resize_dimension_h" configuration entry to a value of 400
ros2 service call '/sky360/config/entry/update' 'simple_tracker_interfaces/srv/ConfigEntryUpdate' '{entries:[{key: frame_provider_resize_dimension_h, type: int, value: 400}]}'
ros2 service call '/sky360/config/entry/update' 'simple_tracker_interfaces/srv/ConfigEntryUpdate' '{entries:[{key: controller_type, type: str, value: video}]}'
- To keep an eye on the state of the tracker, using the following echo command
ros2 topic echo /sky360/tracker/tracking_state
- To keep an eye on the camera frame excl. array data use the following echo command
ros2 topic echo /sky360/camera/original --no-arr
- Uncomment some of the remappings in the "simple_tracker_launch/launch/simple_tracker_launch.py" visualiser node to enable additional windows like optical flow etc