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

Add Remote Head Support #44

Merged
merged 23 commits into from
Apr 21, 2023
Merged

Add Remote Head Support #44

merged 23 commits into from
Apr 21, 2023

Conversation

QuentinTorg
Copy link
Collaborator

@QuentinTorg QuentinTorg commented Jun 3, 2022

Add full support for the new remote head camera including the VPB, mono heads, and stereo heads.

TODO:

  • Handle different remote head IMU configurations. Different board revs may have IMU. Eventually each head and VPB will have an IMU inside
  • Fix URDF transforms in the VPB
  • Fix URDF transforms for VPB so only the imu exists
  • Update to the correct meshes for remote head VPB, Monocam, and Stereo cam. Currently uses a trivial cube STL model as a placeholder

@@ -44,7 +44,7 @@
<param name="sensor_ip" value="$(arg ip_address)" />
<param name="sensor_mtu" value="$(arg mtu)" />
<param name="tf_prefix" value="$(arg vpb_tf_prefix)" />
<param name="head_id" value="0" />
<param name="head_id" value="-1" />
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are we using a invalid default? Shouldn't we just use 0?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The -1 default makes this connect with non-remote head cameras and the VPB. 0 will be remote head ID 0

Copy link
Contributor

@davidirobinson davidirobinson left a comment

Choose a reason for hiding this comment

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

@QuentinTorg tested on an S27 + S7 and it worked fine!

multisense_ros/cfg/multisense.cfg Outdated Show resolved Hide resolved
multisense_ros/cfg/multisense.cfg Outdated Show resolved Hide resolved
else {
if (has_left_camera_ || has_right_camera_ || has_aux_camera_)
{
status = driver_->getImageCalibration(image_calibration);
Copy link
Contributor

Choose a reason for hiding this comment

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

will image_calibration be initialized if has_left_camera_ || has_right_camera_ || has_aux_camera_ is not true?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

You're correct here, and I believe it is fixed now. stereo_calibration_manager_ will be nullptr for the vpb (if there is not a left, right, or aux camera)

multisense_ros/src/camera.cpp Show resolved Hide resolved
@mattalvarado
Copy link
Contributor

@QuentinTorg is this ready to land?

@QuentinTorg QuentinTorg marked this pull request as ready for review August 12, 2022 22:51
sensorConfigList.append(SensorConfig(name="mono_cmv4000", sgm=False, motor=False, imu=True, lighting=True, aux=False, ar0234=False, features=False, ptp=False))
sensorConfigList.append(SensorConfig(name="s27_sgm_AR0234", sgm=True, motor=False, imu=False, lighting=False, aux=True, ar0234=True, features=True, ptp=True))
sensorConfigList.append(SensorConfig(name="ks21_sgm_AR0234", sgm=True, motor=False, imu=False, lighting=True, aux=False, ar0234=True, features=True, ptp=True))
sensorConfigList.append(SensorConfig(name="remote_head_vpb", sgm=False, motor=False, imu=False, lighting=False, aux=False, ar0234=False, features=True, ptp=True))
Copy link
Contributor

Choose a reason for hiding this comment

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

Does the VPB actually support features? Also doesn't the VPB have IMU?

mattalvarado
mattalvarado previously approved these changes Sep 13, 2022
* fix: changed standard to c++17 because of std::shared_mutex

```
In file included from /usr/include/log4cxx/log4cxx.h:45,
                 from /usr/include/log4cxx/logstring.h:28,
                 from /usr/include/log4cxx/level.h:22,
                 from /usr/include/ros/console.h:46,
                 from /usr/include/ros/ros.h:40,
                 from /home/fpasqualini/work/minibot/catkin_ws/src/minibot_meta/multisense_ros/multisense_ros/include/multisense_ros/color_laser.h:41,
                 from /home/fpasqualini/work/minibot/catkin_ws/src/minibot_meta/multisense_ros/multisense_ros/src/color_laser.cpp:36:
/usr/include/log4cxx/boost-std-configuration.h:10:18: error: ‘shared_mutex’ in namespace ‘std’ does not name a type
   10 |     typedef std::shared_mutex shared_mutex;
      |                  ^~~~~~~~~~~~
/usr/include/log4cxx/boost-std-configuration.h:10:13: note: ‘std::shared_mutex’ is only available from C++17 onwards
   10 |     typedef std::shared_mutex shared_mutex;
      |             ^~~
```

Multiple errors like this appear when using GCC 11 and C++ 14

* Update CMakeLists.txt
@QuentinTorg
Copy link
Collaborator Author

@mattalvarado I think this is now ready to land. It is tested with 5.24 firmware and working well.

The following issues have been made for the outstanding TODO's on this PR:
#53
#54
#55

Copy link
Contributor

@mattalvarado mattalvarado left a comment

Choose a reason for hiding this comment

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

Tested on S27 camera and remote head. Functionally work for me

@mattalvarado mattalvarado merged commit e990b22 into master Apr 21, 2023
mattalvarado added a commit that referenced this pull request Apr 21, 2023
* use the latest version of libmultisense

* add led pulse width and inversion support

* Set external transform on camera (#52)

* update libmultisense to latest

* Add a URDF for the KS21 (#57)

* Importable xacro fixes to remove duplicate root frames and fix typos (#61)

* Importable xacro fixes to remove duplicate root frames and fix typos

* Remove importable xacro files which are not used by multisense_ros

* fix: added robot_state_publisher to multisense_bringup deps (#63)

Launch file validation requires all included packages to be dependencies

* feat: Made remote heads required nodes (#64)

* Add a S30 URDF (#62)

* Update exposure limits for nex-gen cameras (#65)

* Update the LibMultiSense submodule (#66)

* Add Remote Head Support (#44)

* initial remote head support, mostly reconfigure updates

* clean up reconfigure for mono cameras and remote head

* reorganize the topic publishing so stereo and color topics are not advertised if the camera cannot support them

* add a launch file for remote head and update urdf with first pass but incorrect remote head support

* fix the urdf issues on launch caused by incorrect file paths and names

* fix logical error in reconfigure that caused all remote heads to behave like a vpb

* update launch files after debugging

* update to latest libmultisense version

* Update multisense_ros/cfg/multisense.cfg

Co-authored-by: David Robinson <[email protected]>

* update default head ID in the ros driver

* Add grayscale support for pointcloud colorization

* account for the possibility of an uninitialized stereo calibration manager

* update the valid gain range for AR0234 imagers

* fix typo in config

* make camera.cpp robust for cameras with no right imager

* Fix stereo_calibration_manager logic check

* fix: changed standard to c++17 because of std::shared_mutex (#49)

* fix: changed standard to c++17 because of std::shared_mutex

```
In file included from /usr/include/log4cxx/log4cxx.h:45,
                 from /usr/include/log4cxx/logstring.h:28,
                 from /usr/include/log4cxx/level.h:22,
                 from /usr/include/ros/console.h:46,
                 from /usr/include/ros/ros.h:40,
                 from /home/fpasqualini/work/minibot/catkin_ws/src/minibot_meta/multisense_ros/multisense_ros/include/multisense_ros/color_laser.h:41,
                 from /home/fpasqualini/work/minibot/catkin_ws/src/minibot_meta/multisense_ros/multisense_ros/src/color_laser.cpp:36:
/usr/include/log4cxx/boost-std-configuration.h:10:18: error: ‘shared_mutex’ in namespace ‘std’ does not name a type
   10 |     typedef std::shared_mutex shared_mutex;
      |                  ^~~~~~~~~~~~
/usr/include/log4cxx/boost-std-configuration.h:10:13: note: ‘std::shared_mutex’ is only available from C++17 onwards
   10 |     typedef std::shared_mutex shared_mutex;
      |             ^~~
```

Multiple errors like this appear when using GCC 11 and C++ 14

* Update CMakeLists.txt

* update libmultisenes version

* Update min gain params

---------

Co-authored-by: David Robinson <[email protected]>
Co-authored-by: Matt Alvarado <[email protected]>
Co-authored-by: Frank Pasqualini <[email protected]>

---------

Co-authored-by: David Robinson <[email protected]>
Co-authored-by: Matt Alvarado <[email protected]>
Co-authored-by: Frank Pasqualini <[email protected]>
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.

4 participants