I have not dealt with URDF before, so apologies if I make some obvious mistakes.
As the URDF (Universal Robot Description Format) name suggests, it is usually linked up to RealSense cameras by providing a 'description' file, using a macro language called xacro..
I'm not sure if this will be useful, but below is a link to the UDRF xacro file for the earlier Intel Euclid product, which had a RealSense ZR300 camera inside it. Looking at it may give some insight about how to set up an URDF description file for your D415 project.
Thanks a lot for responding to my query.
I saw the link you shared. Can you please let me know if it is a working package.
I was not able to get how you are starting the camera process. As what I have seen generally, camera is added as a sensor plugin and respective .so file is passed in the URDF.
But here I was not able to see mention of a .so file.
If this is a working one, can you please provide the package for D415 and integrating procedure in my current URDF.
As I said above, I am new to the concept of URDF and learning as I research your case. So I apologize.
I think a better approach may be for you to refer to a complete TurtleBot3 robotic vehicle project created by RealSense robotics and SLAM expert McCool as it contains the complete blueprints as well as the description file for that project. So it will be easier to see how everything links together.
Project main pages
Description file for the project, and launch files for publishing the data
Thanks a lot for providing the repository link. It was really useful.
I added few more links in my URDF related to Camera's links, and also added a piece of code to my camera launch file:
<!-- Start nodelet manager -->
Thank you once again for your kind help.
With warm regards,
I am able to get the PointClouds in my RViz. But there seems to be some TF problem.
And direction of point cloud is random each time I start.
I think this may be the reason because of high data rate.
I tried to reduce the frame rate from 30 to some lower value in the launch file itself.
But it gives error and doesn't run with some other frame rate than 30.
Can you please let me know to change the frame rate, as I don't need that much frame rate for my application.
If you are using a JSON configuration file to set the FPS then that apparently does not work at present, as any FPS set in the JSON configuration gets overridden by the pipeline on startup. The last I heard at the end of February was that the development team would be looking at this issue.
If you can write your own application, you could try setting the FPS at the pipeline point in the line of code that sets the resolution. Here's some example resolutions and FPS.
cfg.enable_stream( RS2_STREAM_COLOR, 1920, 1080, RS2_FORMAT_RGB8, 30 );
cfg.enable_stream( RS2_STREAM_DEPTH, 1920, 1080, RS2_FORMAT_Z16, 30 );
cfg.enable_stream(RS2_STREAM_INFRARED, -1, 1280, 720, RS2_FORMAT_UYVY, 30);
The first two numbers in the bracket set the resolution, and the final number at the end of the bracket sets the FPS.
An example script can be found in this link:
No I am not using the JSON configuration to set the Camera FPS.
But I am using the ROS wrappers from this link (Releases · intel-ros/realsense · GitHub ).
Here as I have copied the rs_camera.launch file and using to to launch the node for our Camera.
Please have a look on the attached file camera.launch (just renamed from rs_camera.launch).
I tried to change the FPS at 2 places as below:
1. I tried to change depth_fps and color_fps in camera.launch file attached.
2. There is a file constants.h in Camera ROS package, at this location realsense2_camera/include/constants.h.
Here I tried with changing DEPTH_FPS and COLOR_FPS.
By default the FPS is 30. Whenever I try to change FPS from 30 to something else (I tried even 25, 35, 10), it is throwing below error:
04/06 15:11:31,661 WARNING  (backend-v4l2.cpp:1098) Pixel format 435a4e49-b602-480f-978c-e4e88ae likely requires patch for fourcc code INZC!
04/06 15:11:31,662 WARNING  (backend-v4l2.cpp:1098) Pixel format 52494150-8536-4841-b6bf-8fc6ffb likely requires patch for fourcc code PAIR!
04/06 15:11:31,662 WARNING  (sensor.cpp:313) Unregistered Media formats : [ INZC PAIR Y10 YUYV ]; Supported: [ ]
[ WARN] [1528105291.663445508]: Given stream configuration is not supported by the device! Stream: Depth, Stream Index: 0, Format: Z16, Width: 640, Height: 480, FPS: 35
[ WARN] [1528105291.666485695]: Given stream configuration is not supported by the device! Stream: Color, Stream Index: 0, Format: RGB8, Width: 640, Height: 480, FPS: 35
[ INFO] [1528105291.666532755]: publishStaticTransforms...
[ERROR] [1528105291.666576372]: Given depth profile is not supported by current device!
[FATAL] [1528105291.831958069]: Failed to load nodelet '/camera/realsense2_camera` of type `realsense2_camera/RealSenseNodeFactory` to manager `realsense2_camera_manager'
[camera/realsense2_camera_manager-2] process has died [pid 14435, exit code 1, cmd /opt/ros/kinetic/lib/nodelet/nodelet manager __name:=realsense2_camera_manager __log:=/home/saurabh/.ros/log/75d971c6-67db-11e8-a8b1-a86bad217c79/camera-realsense2_camera_manager-2.log].
log file: /home/saurabh/.ros/log/75d971c6-67db-11e8-a8b1-a86bad217c79/camera-realsense2_camera_manager-2*.log
[camera/realsense2_camera-3] process has died [pid 14436, exit code 255, cmd /opt/ros/kinetic/lib/nodelet/nodelet load realsense2_camera/RealSenseNodeFactory realsense2_camera_manager __name:=realsense2_camera __log:=/home/saurabh/.ros/log/75d971c6-67db-11e8-a8b1-a86bad217c79/camera-realsense2_camera-3.log].
log file: /home/saurabh/.ros/log/75d971c6-67db-11e8-a8b1-a86bad217c79/camera-realsense2_camera-3*.log
And with D415
[ WARN] [1528105801.864239262]: Given stream configuration is not supported by the device! Stream: Depth, Stream Index: 0, Format: Z16, Width: 640, Height: 480, FPS: 25
04/06 15:20:01,865 WARNING  (backend-v4l2.cpp:1098) Pixel format 36315752-1a66-a242-9065-d01814a likely requires patch for fourcc code RW16!
04/06 15:20:01,866 WARNING  (sensor.cpp:313) Unregistered Media formats : [ RW16 ]; Supported: [ ]
[ WARN] [1528105801.874165779]: Given stream configuration is not supported by the device! Stream: Color, Stream Index: 0, Format: RGB8, Width: 640, Height: 480, FPS: 25
[ INFO] [1528105801.874521207]: publishStaticTransforms...
[ERROR] [1528105801.874569321]: Given depth profile is not supported by current device!
[FATAL] [1528105802.129559177]: Failed to load nodelet '/camera/realsense2_camera` of type `realsense2_camera/RealSenseNodeFactory` to manager `realsense2_camera_manager'
[camera/realsense2_camera_manager-2] process has died [pid 16561, exit code 1, cmd /opt/ros/kinetic/lib/nodelet/nodelet manager __name:=realsense2_camera_manager __log:=/home/saurabh/.ros/log/a5ff95c8-67dc-11e8-a8b1-a86bad217c79/camera-realsense2_camera_manager-2.log].
log file: /home/saurabh/.ros/log/a5ff95c8-67dc-11e8-a8b1-a86bad217c79/camera-realsense2_camera_manager-2*.log
[camera/realsense2_camera-3] process has died [pid 16562, exit code 255, cmd /opt/ros/kinetic/lib/nodelet/nodelet load realsense2_camera/RealSenseNodeFactory realsense2_camera_manager __name:=realsense2_camera __log:=/home/saurabh/.ros/log/a5ff95c8-67dc-11e8-a8b1-a86bad217c79/camera-realsense2_camera-3.log].
log file: /home/saurabh/.ros/log/a5ff95c8-67dc-11e8-a8b1-a86bad217c79/camera-realsense2_camera-3*.log
Please let me know, if you are able to get something from this information.
Or please let me know if something more is needed.
If you are using an R200 camera (RS200) with the ROS wrapper you linked to at the beginning of this discussion then I would not be surprised, as that wrapper is intended for the SR300 (sometimes called SR300 by people), the D415 or D435.
In regard to the D415 problem ... 'fourcc code' errors can be tricky to diagnose. Someone else with a fourcc code RW16, like you had on D415, fixed their problem by calling a hardware_reset() instruction in their script.
Thanks for the response. Yes I have tried both camera (RS300 and D415) with this ROS Wrapper package.
Both are working fine at 30FPS, and I am able to get the PointClouds also.
But for anyone, if I change the frame rate to anything else than 30FPS (less or more, like I tried both 25FPS and 35FPS), both the cameras leads to the respective errors.
I checked the like shared by you, but I think my problem is little different. As I checked the camera with below procedure:
1. Used the camera at 30FPS, there was no error and I was able to generate and view the PointClouds
2. Changed the frame rate to 25FPS (or 35FPS), without plugging out. There I got respective errors.
3. Changed back the frame rate to 30FPS again, then I was able to run without any error thrown.
So these steps I did without plugging in/out the cable. So it seems my problem is different and neither I am getting this error logs:
RealSense error calling rs2_pipeline_wait_for_frames(pipe:0x8ceea0):
Frame didn't arrived within 5000
So I will request you to confirm the actual procedure to change the Frame rate when we are using ROS Wrappers.
Definitely there should be something that I am missing to change the Frame Rate.
And can you please also confirm if we reduce the Frame rate, then it is having some negative impact on Stereo vision?
With best regards,
There is a ROS tutorial for changing the FPS that may give you some useful insight.
I am not aware of a negative effect of reducing the frame rate. In some cases it may be beneficial, as it can make a stream more stable and less prone to freezing up by reducing the amount of data bandwidth being pumped to the USB port.
I really appreciate your efforts to help me solve this problem.
First of all, sorry to create a confusion, I am using SR300 and D415 and I am not using any RS300 or R200.
So the launch file to modify the default parameters in your link will support only R200.
But that is not my problem, still I made the respective change in the .launch file, and by default mode was set to manual, so I changed the FPS to 25.
But it didn't worked and having a huge error logs. Please have a look in attached file.
And above that, as I am using D415, so I want to have solution for that too. realsense_camera doesn't support D415.
And D415 is supported by realsense2_camera only.
And realsense2_camera is not having any parameter named as mode.
So if you can try to test this package with D415, it will be really very much helpful to me.
Please let me know if any other modification I can do to make it working.
error_logs.txt.zip 1.8 K
I do not have the ability to test ROS on my computer's setup, unfortunately. I'm sorry to say that this case is going beyond the extent of my general level of ROS knowledge and would benefit from an Intel support team member with specialist ROS knowledge taking it up from this point onward. I do apologize and hope that somebody else can help you to find a resolution. Good luck!
I was going through 'realsense_camera' package. Here there is one parameter in its launch file 'publish_tf'.
Actually I have to set this flag to false, as TF is already provided by URDF itself.
May be because of this there is a clash and I am getting wrong direction of PointCloud.
But I was not able to find this parameter in 'realsense2_camera' package.
Can you please let me know the equivalent for this field in 'realsense2_camera'.
With warm regards,