-
Notifications
You must be signed in to change notification settings - Fork 3
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
Port point_cloud_transport_plugins to ROS2 #1
Conversation
I'm getting some errors like this one: /home/ahcorde/ros2_rolling/src/point_cloud_transport_plugins/draco_point_cloud_transport/src/draco_publisher.cpp: In member function ‘tl::expected<std::unique_ptr<draco::PointCloud>, std::__cxx11::basic_string<char> > draco_point_cloud_transport::DracoPublisher::convertPC2toDraco(const PointCloud2&, const string&, bool, bool) const’:
/home/ahcorde/ros2_rolling/src/point_cloud_transport_plugins/draco_point_cloud_transport/src/draco_publisher.cpp:155:43: error: could not convert ‘tl::make_unexpected<const char (&)[53]>("Invalid data type in PointCloud2 to Draco conversion")’ from ‘tl::unexpected<const char*>’ to ‘tl::expected<std::unique_ptr<draco::PointCloud>, std::__cxx11::basic_string<char> >’
155 | default:return cras::make_unexpected("Invalid data type in PointCloud2 to Draco conversion");
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| tl::unexpected<const char*>
|
Hrmmm, if you don’t mind me asking, what is your setup? (OS version / ROS version / g++ compiler version) This seems like it could be compiler related, as I do not see that error. We could maybe fix it by explicitly passing an std::string rather than something that is open to interpretation?
Or we could refactor the behavior to return a nullptr rather than using the expected<> mechanism. |
You can also try updating the https://raw.githubusercontent.com/TartanLlama/expected library. There were a few releases since I pulled it into cras_cpp_common.
This would most probably fix it, but it is ugly. It's weird a compiler for a ROS 2 system would not understand this. I tested this on C++14-only compilers and they work with the library. |
I tried this, but the only diff is that they altered the version number. the code seems unaltered according to git.
fair point 😅 i will wait to hear back about @ahcorde 's build setup before making any changes. rn I am building with and see no build errors/warnings. |
@ahcorde i assume you found a way around this issue? |
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
Signed-off-by: Alejandro Hernandez Cordero <[email protected]>
Signed-off-by: Alejandro Hernandez Cordero <[email protected]>
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
* Add compression format field * Update
Sister PR to ros-perception/point_cloud_transport#1
See there for commentary and reports on progress.