Monash-Connected-Autonomous-Vehicle / autoware

Autoware - the world's leading open-source software project for autonomous driving
https://www.autoware.org/
Apache License 2.0
1 stars 0 forks source link

(Twizy) Collect launch files for sensors #40

Open dtonda8 opened 3 months ago

dtonda8 commented 3 months ago

Ensure sensors work and publish correct Message Types:

Launch file tasks:

Helpful resources

dtonda8 commented 2 months ago

SSH

ssh mcav@192.168.11.127

password: mcav01

dtonda8 commented 2 months ago

For Velodyne, Alienware Laptop (via ethernet or wirelessly) and LIDAR (via ethernet) must be connected to in-built router First terminal:

ros2 launch velodyne_driver velodyne_driver_node-VLP16-launch.py

Second terminal:

ros2 launch velodyne_pointcloud velodyne_transform_node-VLP16-launch.py

Visualising

Use RViz (type rviz2 on terminal):

  1. Set Fixed Frame to velodyne
  2. Click "Add" on the bottom left and add the PointClound2 topic (if you can't see this then the lidar is not properly working)
dtonda8 commented 2 months ago

Docs for starting the Vehicle Interface

jxcksonli commented 2 months ago

http://wiki.ros.org/video_stream_opencv https://github.com/clydemcqueen/h264_image_transport

dtonda8 commented 2 months ago

Current GStreamer files

https://github.com/Monash-Connected-Autonomous-Vehicle/stream_sample_camera_gmsl/tree/stream_directly

Testing GStreamer locally

Server

# From file
cat test1.h264 | gst-launch-1.0 -e fdsrc ! h264parse ! \
    avdec_h264 ! videoconvert ! videorate ! video/x-raw,framerate=30/1 ! \
    x264enc tune=zerolatency bitrate=1000 speed-preset=ultrafast ! \
    video/x-h264,profile=baseline ! rtph264pay ! udpsink \
    host=<CHANGE TO YOUR IP> port=5000

# From mac
gst-launch-1.0 avfvideosrc device-index=1 ! videoscale ! videoconvert ! x264enc tune=zerolatency bitrate=3000 speed-preset=ultrafast ! h264parse ! rtph264pay ! udpsink host=<CHANGE TO YOUR IP> port=5000

Client

# Get stream 
gst-launch-1.0 -e udpsrc port=5000 caps="application/x-rtp" ! rtpjitterbuffer \
    ! rtph264depay ! avdec_h264 ! fpsdisplaysink

For cameras, either:

  1. Publish to ROS from PX 2
  2. Stream and publish to ROS form Alienware Laptop

PX 2 SSH:

  1. Connect to StreetDrone wifi
  2. SSH
    ssh nvidia@192.168.1.180
  3. Password: nvidia

Sample files and stream repo (switch to stream_directly)

dtonda8 commented 2 months ago

gscam2 might be useful

jxcksonli commented 2 months ago

Attempt using gscam2, located in mcav@twizy-x86:~/dbat/test1$

Ran using ros2 run gscam2 gscam_main --ros-args --remap /image_raw:=/my_camera/image_raw --params-file src/gscam2/gscam_params.yaml -p camera_info_url:=file://$PWD/src/gscam2/cfg/my_camera.ini

Error: Failed to Pause Stream, Check GScam config

dtonda8 commented 2 months ago

ROS answer on h264 streaming i.e. what we want

dtonda8 commented 2 months ago

Hi guys gscam2 works! I've tried in my laptop. The tasks for you guys is to:

We won't need to create launch files for IMU since that's already done by the vehicle interface

gscam details

ROS 2 tutorial on creating launch files