Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Por upstream sync v2.2.3 #23

Merged

Conversation

abhijitmajumdar
Copy link

This PR is to update sync with upstream for v2.2.3. The key features required were form the commits f002a7b and eea5b15 to add the fix to load default params from ros param server on startup, and the addition of hole filling filter as a separate filter.

schmidtp1 and others added 24 commits March 12, 2019 10:51
- restore T265 camera launch instructions
- add launch instructions for T265 RViz demo
… This unit adjustment is needed for rgbd_launch package and it's point cloud value.
* fix depth scale to always follow ROS convention of 1mm
* incorporates PR#605
* add example for checking the depth at the center of the image.
* fix bug: did not fix depth scale for single frame.
with equivalent to ros::names::isValidCharInName(char c)
by finding the ROS (static) param in the enum dictionary, which can take
values in the min:step:max range (not just 0 <= value < enum_dict.size()).

Also remove the check when the option is taken from the sensor, which
should always be correct.
so we don't loop with float values.
* use wheel_Odometry

Add parameters to launch files: 
* topic_odom_in - The topic on which wheel odometry arrives.
* calib_odom_file - path to calibration.json file, of the librealsense format. i.e.: https://github.com/IntelRealSense/librealsense/blob/master/unit-tests/resources/calibration_odometry.json
update README.md link to librealsense v2.19.2
update version to 2.2.3
@abhijitmajumdar
Copy link
Author

abhijitmajumdar commented Apr 5, 2019

Testing:
Build: Success
Camera IR RGB: Success
Product integration: Success

@130s
Copy link

130s commented Apr 8, 2019

Looks good. I can only check whether the sync is cleanly done or not, and I confirmed it is done fine as follows.

Took a diff of commits in 2 branches, between 2.2.3 and abhijitmajumdar/por_upstream_sync. While there are 7 commits that only exist in your brnach, looks like the real change is the first 2 commits (the ones at the bottom of the list below).

$ git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative 2.2.3..abhijitmajumdar/por_upstream_sync
* 3e326df - (HEAD -> abhijit_por_upstream_sync, abhijitmajumdar/por_upstream_sync) merging upstream changes from v2.2.3 to add important feature f002a7b and eea5b15 (2 days ago)
* 139478b - (tag: 100.1.0, origin/por_upstream_sync, por_upstream_sync) 100.1.0 (4 days ago)
* 78ef4d6 - POR: sync pkg version in a repo so that catkin_prepare_release can run. (4 days ago)
* da86f9d - Update changelog for 100.1.0, Plus One Robotics forked version. (4 days ago)
* 274beb1 - Merge pull request #21 from abhijitmajumdar/por_upstream_sync (4 days ago)
* 9cab3ec - removed debug (not used) code (5 days ago)
* 34b75c8 - (abhijitmajumdar/infrargb_2.2.1) working irrgb stream (2 weeks ago)

There's no new commit in 2.2.3.

$ git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative abhijitmajumdar/por_upstream_sync..2.2.3
$

@abhijitmajumdar
Copy link
Author

Looks good. I can only check whether the sync is cleanly done or not, and I confirmed it is done fine as follows.

Took a diff of commits in 2 branches, between 2.2.3 and abhijitmajumdar/por_upstream_sync. While there are 7 commits that only exist in your brnach, looks like the real change is the first 2 commits (the ones at the bottom of the list below).

$ git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative 2.2.3..abhijitmajumdar/por_upstream_sync
* 3e326df - (HEAD -> abhijit_por_upstream_sync, abhijitmajumdar/por_upstream_sync) merging upstream changes from v2.2.3 to add important feature f002a7b and eea5b15 (2 days ago)
* 139478b - (tag: 100.1.0, origin/por_upstream_sync, por_upstream_sync) 100.1.0 (4 days ago)
* 78ef4d6 - POR: sync pkg version in a repo so that catkin_prepare_release can run. (4 days ago)
* da86f9d - Update changelog for 100.1.0, Plus One Robotics forked version. (4 days ago)
* 274beb1 - Merge pull request #21 from abhijitmajumdar/por_upstream_sync (4 days ago)
* 9cab3ec - removed debug (not used) code (5 days ago)
* 34b75c8 - (abhijitmajumdar/infrargb_2.2.1) working irrgb stream (2 weeks ago)

There's no new commit in 2.2.3.

$ git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative abhijitmajumdar/por_upstream_sync..2.2.3
$

So I did end up making a new change, it does not affect the functionality, just modifies some code to indicate a cleaner logic implementation

for (int i = 0; i < 5; i++)
{
_camera_info[stream_index].D.push_back(intrinsic.coeffs[i]);
_camera_info[stream_index].D.at(i) = intrinsic.coeffs[i];

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice optimization

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol, not mine though. That was pulled from the upstream

@joshuaplusone
Copy link

@abhijitmajumdar The MR looks good enough to eat.

@joshuaplusone
Copy link

@abhijitmajumdar So, I couldn't find the launch file params for publishing an infrared image with color correction.

@abhijitmajumdar
Copy link
Author

abhijitmajumdar commented Apr 9, 2019

So, I couldn't find the launch file params for publishing an infrared image with color correction.

@joshuaplusone Do you still have access to Gitlab? I could point you to the launch file. Or should I just attach a file here?

So there is no param that publishes the IR with Color yet, as of now, the code itself defaults to use RGB for the IR and the configuration I use to run the realsense is:

roslaunch realsense2_camera rs_rgbd.launch enable_fisheye:=false enable_infra2:=false enable_gyro:=false enable_accel:=false filters:=colorizer,disparity,spatial,decimation,pointcloud,hole_filling enable_pointcloud:=true

The IR with RGB gets published as /camera/infra1/image_rect_raw

@joshuaplusone
Copy link

Thanks for the heads up. So are there plans to add that back in for another PR. There used to be a synchronization bug that would cause the rgb / infrared results to skip frames. For noether we bypassed that by just using the depth frame without any synchronization.

@abhijitmajumdar
Copy link
Author

So maybe I explained wrong. The IR with color gets published with this PR, there is currently no option to revert that back(or a switch for that matter) right now. So the IR defaults to a color stream. There are plans to add this switch in a future PR. The RGB support for the IR stream was included in the librealsense driver itself. The edits I made in this code are only to enable that in the ROS wrapper.

However I do not know anything about the bug which caused the frames to skip. When run using this code, and with the configuration I mentioned above, I am able to reliably get 30Hz on each stream. I did also configure the frames to go upto 60Hz, but I could subscribe to around 45Hz (which is I think expected given the bandwidth of 3 streams - IR, Color and Depth comming through)

Am I missing something?

@130s 130s requested a review from joshuaplusone April 9, 2019 14:48
@joshuaplusone
Copy link

Is it possible to only publish ir and depth?

@joshuaplusone
Copy link

This MR is fine in my book. My only concerns are based on whether or not intel has fixed their synchronization issues. If they haven't then we will need to have a way to only publish ir image and depth pointcloud.

@abhijitmajumdar
Copy link
Author

abhijitmajumdar commented Apr 9, 2019

Is it possible to only publish ir and depth?

Yes, except the colorizer would have to be disabled or switched to use another color stream. Also the /depth/color/points would not publish or they'd have to be configured to use another stream which can be done using an argument pointcloud_texture_stream:=RS2_STREAM_INFRARED

This MR is fine in my book. My only concerns are based on whether or not intel has fixed their synchronization issues. If they haven't then we will need to have a way to only publish ir image and depth pointcloud.

Can you explain what the synchronization bug was? Maybe I could answer your question

@joshuaplusone
Copy link

there are two pull requests that I believe for using infrargb without color.

#6
#7

@130s
Copy link

130s commented Apr 9, 2019

  • Including offline conversation reviewers think this is good to be merged.
  • Due to [por_upstream_sync branch] Tests failing  #22, some tests on CI are expected to fail. Just notticed by looking at the latest result one failing test (points_cloud_1) somehow passed on this PR.
    -----------------------------------
    test name                      score : message                                                       
    ----------------------------  ------   -------------------------------------------------------------
    depth_w_cloud_1                   OK : 
    points_cloud_1                    OK : 
    depth_avg_decimation_1            OK : 
    non_existent_file                 OK : 'num_channels'
    align_depth_color_1               OK : 
    align_depth_ir1_1             FAILED : 'num_channels'
    vis_avg_2                         OK : 
    depth_avg_1                       OK : 
    static_tf_1                   FAILED : Tf is None for couple camera_infra1_frame->camera_color_frame
    depth_decimation_1            FAILED : 'num_channels'
    align_depth_ir1_decimation_1  FAILED : 'num_channels'
    

@130s 130s merged commit 432cf23 into plusone-robotics:por_upstream_sync Apr 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants