Support D555 and its motion profiles#3222
Support D555 and its motion profiles#3222SamerKhshiboun merged 3 commits intorealsenseai:ros2-developmentfrom
Conversation
e732d32 to
b6b05ae
Compare
2c70387 to
6877793
Compare
6877793 to
10f9c62
Compare
| void RealSenseNodeFactory::startDevice() | ||
| { | ||
| if (_realSenseNode) _realSenseNode.reset(); | ||
| std::string device_name = _device.get_info(RS2_CAMERA_INFO_NAME); |
There was a problem hiding this comment.
std::string pid_str(_device.get_info(RS2_CAMERA_INFO_PRODUCT_ID));
can be placed at the else scope only right?
There was a problem hiding this comment.
Also we have 2 lines here.
both init a string both use different ways.
std::string x = y;
std::string x(y);
Any special reason?
There was a problem hiding this comment.
fixed, unified the calls to be x(y) on both.
we cannot init it in the else, since it used down below in the switch statement.
| info_topic_name << "~/" << stream_name << "/imu_info"; | ||
| _imu_info_publishers[sip] = _node.create_publisher<IMUInfo>(info_topic_name.str(), | ||
| rclcpp::QoS(rclcpp::QoSInitialization::from_rmw(info_qos), info_qos)); | ||
|
|
There was a problem hiding this comment.
Where did we took the QOS before?
why do we need this change?
There was a problem hiding this comment.
before, we took it from "info_qos", but this was a buggy thing for imu_info.
This is the only topic in the whole ros-wrapper that defines the publisher and immediately send one message down below it (look for this _imu_info_publishers[sip]->publish(info_msg); )
so, I tested it on different cameras, and it's not working as expected.
it should publish the same static message for all subscribers, never mind when the subscriber is requesting this topic, but from my sanity checks, it echoes the relevant data only when we restart the node.
This is a bug not related to D555, but was reproducible also on other devices.
So, I changed the QoS to be manually setted.
For other INFO topics, the "info_qos" is still good, because they publish it wherever there are subscribers, not only once when defining the publisher.
There was a problem hiding this comment.
Fixed to used rmw_qos_profile_latched, like the extrinsics topics.
| else | ||
| { | ||
| ROS_ERROR_STREAM(msg.str()); | ||
| ROS_ERROR_STREAM("Please use serial number instead of usb port."); |
There was a problem hiding this comment.
The user asked for a USB port?
From the code it looks like the code is using it
Nir-Az
left a comment
There was a problem hiding this comment.
Small comment about a weird message
Uh oh!
There was an error while loading. Please reload this page.