-
Notifications
You must be signed in to change notification settings - Fork 938
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
[jog_arm] Pass planning scene monitor into cpp interface #1849
Conversation
37a9fbe
to
2363b4b
Compare
- Separate LOGNAME into each file - Add unit test
2363b4b
to
b7dca01
Compare
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.
The image is still rather large: 4032x3024. Please reduce to something like 1200x.. or 1024x.. Thanks.
was this comment meant for moveit/moveit.ros.org#401? |
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.
Nice cleanup. Some minor comments remaining.
moveit_experimental/moveit_jog_arm/include/moveit_jog_arm/jog_interface_base.h
Show resolved
Hide resolved
|
||
double velocity_scale_coefficient = -log(0.001) / parameters_.collision_proximity_threshold; | ||
// Copy the planning scene's version of current state into new memory | ||
robot_state::RobotState current_state(getLockedPlanningSceneRO()->getCurrentState()); |
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.
Great! Better decoupling of PSM.
planning_scene_monitor::PlanningSceneMonitorPtr planning_scene_monitor_; | ||
}; // class TestJogCppInterface | ||
|
||
TEST_F(TestJogCppInterface, PlanningSceneTest) |
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.
These tests are not very informative yet, but they are a start 😉
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 realized need to do huge refactors of jog_arm to make it testable (separate ROS and simplify threading)
|
||
TEST_F(TestJogCppInterface, InitTest) | ||
{ | ||
moveit_jog_arm::JogCppApi jog_cpp_interface(planning_scene_monitor_); |
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.
What about inserting a ROS sleep for a second or so to give the threads some time to actually process data?
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 should add arbitrary sleeps until its proven needed.
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.
Currently, the thread is immediately stopped due to immediate destruction of JogCppApi.
Adding a sleep would give the thread same time to cycle.
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 added sleep
moveit_experimental/moveit_jog_arm/test/jog_cpp_interface_test.test
Outdated
Show resolved
Hide resolved
moveit_experimental/moveit_jog_arm/include/moveit_jog_arm/collision_check_thread.h
Outdated
Show resolved
Hide resolved
f60a1ea
to
5741c88
Compare
@rhaschke i force pushed changes to my feature branch, but just noticed you had some kind of formatting changes that got squashed, and i can't restore. what were they? |
5741c88
to
167605c
Compare
That's why one should always use |
That's a cool trick I hadn't heard of! |
* [jog_arm] Pass planning scene monitor into cpp interface - Separate LOGNAME into each file - Add unit test * Add PR feedback
* [jog_arm] Pass planning scene monitor into cpp interface - Separate LOGNAME into each file - Add unit test * Add PR feedback
* [jog_arm] Pass planning scene monitor into cpp interface - Separate LOGNAME into each file - Add unit test * Add PR feedback
I need to pass in the PSM from a larger application. Previously it required creating a new PSM even in the same process