Running the D400+T265 on Pi with Ros2
With a successfull install of Ubuntu 20.04 with Ubuntu desktop and Ros2 Foxy installed and running, the next step was to get the Intel Realsense cameras conencted and running.
Returning here i checked out the examples
Two options were of interest to me.
First steps though are to install the realsense library which the page above links to the gitHub repo. Make sure however to select the ros2 branch, and follow those instructions.
Install Ros2 realsense Libraries.
sudo apt-get install ros-$ROS_DISTRO-realsense2-camera Do you want to continue? [Y/n] y Abort. sudo apt-get install ros-$ROS_DISTRO-realsense2-camera ... Setting up ros-foxy-diagnostic-updater (2.0.8-2focal.20211112.203237) ... Setting up ros-foxy-realsense2-camera (3.2.3-1focal.20211119.153425) ... Processing triggers for libc-bin (2.31-0ubuntu9.2) ... ubuntu@ubuntu:~$
The abort was weird, i ran the command again and it worked.
Run first test
. /opt/ros/foxy/setup.bash roslaunch realsense2_camera rs_t265.launch Command 'roslaunch' not found, but can be installed with: sudo apt install python3-roslaunch
Ok, so the guide https://dev.intelrealsense.com/docs/ros-wrapper doesn't tell you that with ros2 the launch paramters are different.
In the github repo go to the correct ros2 branch and follow the readme there.
You'll notice that the syntaxt is different. Whats annoying is that youd think there would be some kind of change notice, or explanation. I don't know what roslaunch is, or how it should be used, so i'm just guessing.
ros2 launch realsense2_camera rs_launch.py >lots of ouput suggesting its working. and sort of telling me its not calibrated, > which makes sense because i didn't specify the camera is a rs_t265.
Scrolling long enough down this page eventually found
ros2 launch realsense2_camera demo_t265_launch.py
This worked to the extent that RViz launched, but i was receiving nothing. I think there is a step missing.
So was getting this error
[rviz2-2] ... ... Message Filter dropping message: frame 'camera_odom_frame' at time ... for reason 'Uknown'
I found this solution https://github.com/IntelRealSense/realsense-ros/issues/1075 though the exact parameters it suggested were wrong.
Basically, i went into RViz and changed those settings as the article suggested
Solved it myself: In RViz go to the 'Display' window and under 'Global Options' change 'Fixed Frame' to 't265_odom_frame' under 'Grid' change 'Reference Frame' to 't265_odom_frame' This will bring up the 3D image from the D345 and the odometry data from the T265.
Except i tried the drop down menu suggestions. and settled on 'camera_odom_frame` After which i could see the camera data and 3D representation coming through.
Watched this guys video for clues as to why the hell roslaunch isn't fing installed.
As an asside, installed this whilst watching the video.
sudo apt install python3-argcomplete