Skip to content

[WIP]: port to ros2#7

Closed
JafarAbdi wants to merge 4 commits intotork-a:masterfrom
JafarAbdi:pr-port_to_ros2
Closed

[WIP]: port to ros2#7
JafarAbdi wants to merge 4 commits intotork-a:masterfrom
JafarAbdi:pr-port_to_ros2

Conversation

@JafarAbdi
Copy link
Copy Markdown

No description provided.

@@ -0,0 +1,66 @@
---
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

For easier review, please revert clang-format for now or create a clang-formatted base branch

@JafarAbdi JafarAbdi changed the title Pr port to ros2 [WIP]: port to ros2 Feb 11, 2020
@JafarAbdi
Copy link
Copy Markdown
Author

Copy link
Copy Markdown
Contributor

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

Great work! Do you think you can get some of the examples here to work?

joint_state_handles_[i] =
hardware_interface::JointStateHandle(joint_names_[i], &act_dis[i], &act_vel[i], &act_eff[i]);
if (register_joint_state_handle(&joint_state_handles_[i]) != hardware_interface::HW_RET_OK)
throw std::runtime_error("unable to register " + joint_state_handles_[i].get_name());
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

maybe better use ROS_FATAL for this. I don't think the driver needs to throw exceptions

"fake_joint_trajectory_controller");

// there is no async spinner in ROS 2, so we have to put the spin() in its own thread
auto future_handle = std::async(std::launch::async, spin, executor);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We have no use for the future. Simply run executor->spin() in a thread using a lambda function

ros::Rate rate(1.0 / ros::Duration(0.010).toSec());
ros::AsyncSpinner spinner(1);
spinner.start();
cm.load_controller("ros_controllers", "ros_controllers::JointStateController", "fake_joint_state_controller");
Copy link
Copy Markdown
Contributor

@henningkayser henningkayser Feb 11, 2020

Choose a reason for hiding this comment

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

I thought this would be handled by the controller manager service. Isn't it available, yet?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

As far as I know, it's not available

@JafarAbdi JafarAbdi closed this Jan 18, 2021
@tylerjw
Copy link
Copy Markdown
Contributor

tylerjw commented Jan 20, 2021

Why was this PR closed? @JafarAbdi isn't this still needed by moveit2?

@JafarAbdi
Copy link
Copy Markdown
Author

JafarAbdi commented Jan 20, 2021

Why was this PR closed? @JafarAbdi isn't this still needed by moveit2?

@tylerjw This's an old branch that we don't use at all, we depend on the foxy branch, also we're planning to add something similar to ros2_control see this branch which will replace the need to use fake_joint

@tylerjw
Copy link
Copy Markdown
Contributor

tylerjw commented Jan 20, 2021

The repo file in moveit2 still points to this PR.

@bostoncleek
Copy link
Copy Markdown

We need to update this PR because many header files were changed in this PR

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