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

Port to ros2 #92

Merged
merged 39 commits into from
Sep 14, 2021
Merged

Port to ros2 #92

merged 39 commits into from
Sep 14, 2021

Conversation

vatanaksoytezer
Copy link

No description provided.

@vatanaksoytezer vatanaksoytezer marked this pull request as draft May 26, 2021 17:42
@vatanaksoytezer vatanaksoytezer marked this pull request as ready for review May 26, 2021 19:28
@vatanaksoytezer
Copy link
Author

This is currently blocked by: PickNikRobotics/rviz_visual_tools#185 . With that merged this should work without any problems.

@vatanaksoytezer vatanaksoytezer changed the title WIP: Port to ros2 Port to ros2 May 27, 2021
@JafarAbdi
Copy link
Contributor

This is currently blocked by: PickNikRobotics/rviz_visual_tools#185 . With that merged this should work without any problems.

I merged it

@vatanaksoytezer
Copy link
Author

vatanaksoytezer commented Jun 10, 2021

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

Copy link
Member

@henningkayser henningkayser left a 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

CMakeLists.txt Outdated Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
{
counter += CHECK_TIME_INTERVAL;
ros::Duration(CHECK_TIME_INTERVAL).sleep();
rclcpp::sleep_for(std::chrono::milliseconds(int(CHECK_TIME_INTERVAL * 1000)));
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
rclcpp::sleep_for(std::chrono::milliseconds(int(CHECK_TIME_INTERVAL * 1000)));
rclcpp::sleep_for(rclcpp::Duration::from_seconds(CHECK_TIME_INTERVAL));

Copy link
Author

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

Copy link
Member

Choose a reason for hiding this comment

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

std::chrono::seconds?

Copy link
Author

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.

src/moveit_visual_tools.cpp Show resolved Hide resolved
src/moveit_visual_tools.cpp Outdated Show resolved Hide resolved
src/moveit_visual_tools_demo.cpp Outdated Show resolved Hide resolved
src/moveit_visual_tools_demo.cpp Outdated Show resolved Hide resolved
@vatanaksoytezer
Copy link
Author

Looks pretty clean so far Were you able to get all of the demo work as expected? I'll probably test this later today.

@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.

CMakeLists.txt Outdated Show resolved Hide resolved
Co-authored-by: AdamPettinger <adam.pettinger@utexas.edu>
@AdamPettinger
Copy link

I've built and tested this locally. The demo runs well, and I was able to use moveit_visual_tools in another package successfully (but not used as in depth as the demo of course)

Copy link
Member

@henningkayser henningkayser left a 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 ;)

README.md Outdated Show resolved Hide resolved
moveit_visual_tools.repos Outdated Show resolved Hide resolved
// ! 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);
Copy link
Member

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 Show resolved Hide resolved
src/moveit_visual_tools.cpp Outdated Show resolved Hide resolved
{
counter += CHECK_TIME_INTERVAL;
ros::Duration(CHECK_TIME_INTERVAL).sleep();
rclcpp::sleep_for(std::chrono::milliseconds(int(CHECK_TIME_INTERVAL * 1000)));
Copy link
Member

Choose a reason for hiding this comment

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

std::chrono::seconds?

src/moveit_visual_tools_demo.cpp Outdated Show resolved Hide resolved
src/moveit_visual_tools_demo.cpp Outdated Show resolved Hide resolved
src/moveit_visual_tools_demo.cpp Show resolved Hide resolved
.clang-format Outdated Show resolved Hide resolved
Copy link
Contributor

@JafarAbdi JafarAbdi left a 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
Copy link
Contributor

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
Copy link
Contributor

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

Copy link
Author

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.

moveit_visual_tools.repos Show resolved Hide resolved
src/imarker_robot_state.cpp Outdated Show resolved Hide resolved
src/moveit_visual_tools.cpp Outdated Show resolved Hide resolved
src/moveit_visual_tools.cpp Outdated Show resolved Hide resolved
src/moveit_visual_tools.cpp Outdated Show resolved Hide resolved
launch/demo_rviz.launch.py Outdated Show resolved Hide resolved
src/imarker_end_effector.cpp Outdated Show resolved Hide resolved
src/imarker_end_effector.cpp Outdated Show resolved Hide resolved
rhaschke
rhaschke previously approved these changes Aug 19, 2021
@rhaschke rhaschke dismissed their stale review August 19, 2021 15:18

I didn't look at all changes

@vatanaksoytezer
Copy link
Author

@henningkayser @JafarAbdi is there anything else you would like me to address?

@JafarAbdi JafarAbdi merged commit 715b9d5 into moveit:ros2 Sep 14, 2021
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.

None yet

5 participants