Conversation
fake_joint_driver/include/fake_joint_driver/fake_joint_driver.h
Outdated
Show resolved
Hide resolved
| @@ -0,0 +1,66 @@ | |||
| --- | |||
There was a problem hiding this comment.
For easier review, please revert clang-format for now or create a clang-formatted base branch
|
I used the following files + configs https://gist.github.com/JafarAbdi/1449de81825f1ac653616bcf882f8984 |
henningkayser
left a comment
There was a problem hiding this comment.
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()); |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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"); |
There was a problem hiding this comment.
I thought this would be handled by the controller manager service. Isn't it available, yet?
There was a problem hiding this comment.
As far as I know, it's not available
|
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 |
|
The repo file in moveit2 still points to this PR. |
|
We need to update this PR because many header files were changed in this PR |
No description provided.