-
Notifications
You must be signed in to change notification settings - Fork 101
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 to ros2 #92
Port to ros2 #92
Conversation
This is currently blocked by: PickNikRobotics/rviz_visual_tools#185 . With that merged this should work without any problems. |
I merged it |
f453d2b
to
08dfa96
Compare
Sorry, for forgetting this I will also need a ROS2 branch on https://github.com/PickNikRobotics/graph_msgs and send a PR port right there as well |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty clean so far 👍 Were you able to get all of the demo work as expected? I'll probably test this later today
src/moveit_visual_tools.cpp
Outdated
{ | ||
counter += CHECK_TIME_INTERVAL; | ||
ros::Duration(CHECK_TIME_INTERVAL).sleep(); | ||
rclcpp::sleep_for(std::chrono::milliseconds(int(CHECK_TIME_INTERVAL * 1000))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rclcpp::sleep_for(std::chrono::milliseconds(int(CHECK_TIME_INTERVAL * 1000))); | |
rclcpp::sleep_for(rclcpp::Duration::from_seconds(CHECK_TIME_INTERVAL)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not compile, sleep_for cannot be initialized with rclcpp::Duration::from_seconds
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::chrono::seconds
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::chrono::seconds takes integers only and I have 0.25 seconds to sleep.
@henningkayser Yes! Demo should work as expected. Thanks a lot for the detailed review, that is really helpful for me. I will send the fixes in Sunday when I get back home. |
Co-authored-by: AdamPettinger <adam.pettinger@utexas.edu>
I've built and tested this locally. The demo runs well, and I was able to use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this is the last round of comments ;)
src/imarker_robot_state.cpp
Outdated
// ! Add node here | ||
// imarker_server_ = std::make_shared<interactive_markers::InteractiveMarkerServer>(imarker_topic, "", false); | ||
// TODO: Check topic ns or imarker_topic | ||
imarker_server_ = std::make_shared<interactive_markers::InteractiveMarkerServer>("", node); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the topic namespace should still be used, the constructor accepts that as well. I think it's still pretty important that namespaces are used everywhere, also in line 130 above.
src/moveit_visual_tools.cpp
Outdated
{ | ||
counter += CHECK_TIME_INTERVAL; | ||
ros::Duration(CHECK_TIME_INTERVAL).sleep(); | ||
rclcpp::sleep_for(std::chrono::milliseconds(int(CHECK_TIME_INTERVAL * 1000))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::chrono::seconds
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There're few bugs related to rclcpp::Duration
that need to be fixed before merging this
CMakeLists.txt
Outdated
|
||
# Install shared resources | ||
install(DIRECTORY launch DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}) | ||
install(DIRECTORY resources DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}) | ||
install(DIRECTORY launch resources DESTINATION share/${PROJECT_NAME}) | ||
|
||
# Install executables | ||
install(TARGETS ${PROJECT_NAME}_demo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 to Henning's comment, we specify the ARCHIVE
, LIBRARY
, and RUNTIME
destinations so CMake automatically select the path based on the target's type, I don't see why we're duplicating the command
@@ -1,2 +0,0 @@ | |||
set breakpoint pending on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason for removing this .? I think we should still keep it in the launch file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we would need gdb right now, I can add it back though.
@henningkayser @JafarAbdi is there anything else you would like me to address? |
No description provided.