Skip to content

Fanuc Controller Parameter Work#124

Closed
DLu wants to merge 2 commits intomoveit:ros2from
DLu:fanuc_controllers
Closed

Fanuc Controller Parameter Work#124
DLu wants to merge 2 commits intomoveit:ros2from
DLu:fanuc_controllers

Conversation

@DLu
Copy link
Copy Markdown
Contributor

@DLu DLu commented Mar 23, 2022

  • Removes ROS 1 launch files relating to controllers
  • Moves the parameters that were loaded in the launch to the yaml files
  • Changes from the controller_list paradigm to the controller_names version.

Partial block for moveit/moveit2#1131

@DLu DLu requested a review from AndyZe March 23, 2022 21:02
allowed_execution_duration_scaling: 1.2
# Allow more than the expected execution time before triggering a trajectory cancel (applied after scaling)
allowed_goal_duration_margin: 0.5
# Allowed joint-value tolerance for validation that trajectory's first point matches current robot state
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It's nice to see some comments! Much needed

@@ -1,3 +1,15 @@
# MoveIt uses this configuration for controller management
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

In ROS1, we needed fake_controllers.yaml and ros_controllers.yaml.

In ROS2, fake_controllers.yaml is not needed. There is a flag that gets passed into ros2_control that determines whether it spoofs controllers or not. Here are some links that can help you track down how this use_fake_hardware flag usually works:

https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver/blob/781d7f86ef7b7643c45a7b4ffda05f3931a0d5d3/ur_bringup/launch/ur5.launch.py#L80

From the launch file, it goes to an xacro file:

https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver/blob/781d7f86ef7b7643c45a7b4ffda05f3931a0d5d3/ur_bringup/launch/ur_control.launch.py#L125

https://github.com/UniversalRobots/Universal_Robots_ROS2_Description/blob/e73980dabf56e7d8d10b6d3da44ea2b477032f6b/urdf/ur.ros2_control.xacro#L29

So I suggest deleting fake_controllers.yaml unless you and Vatan are really changing up the way things work.

Comment on lines +10 to +11
moveit_manage_controllers: True
moveit_controller_manager: moveit_simple_controller_manager/MoveItSimpleControllerManager
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What would you think about deleting these 2 lines? They should have no effect on the Fanuc robot. They are VERY rarely needed (never in my career so far).

An example where they are needed would be something like,

  • A humanoid robot has 2 arm controllers and 2 leg controllers
  • All of the controllers are in an inactive state for some reason
  • You send a command to the right leg
  • MoveItSimpleControllerManager wakes up the right leg controller

So you can see, it's a pretty contrived case. I'm advocating to delete MoveItSimpleControllerManager completely

@DLu
Copy link
Copy Markdown
Contributor Author

DLu commented Mar 24, 2022

You're giving me credit for understanding more than I actually do. Mostly, in this PR I'm just moving the parameters I see in the launch files to the yaml.

allowed_start_tolerance: 0.01

# Simulation settings for using moveit_sim_controllers
moveit_sim_hw_interface:
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure what these parameters do either.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm not sure. Prob could delete them, I think. Please try it, then I'll approve the PR either way

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I tend to try to leave as much of the code alone if I don't understand it. I'd rather they be left here than to remove them and then have to put them back in. Maybe someone with more ros control knowledge can weigh in.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

That would probably be @davetcoleman himself. I think this is for the SimpleControllerManager, not ros2_control itself.

I'm of the opposite mindset. If there is zero effect on the robot, remove the parameters. Otherwise you are going to have lots of people copy/paste these parameters in their own setups when it only adds complexity.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@JafarAbdi didn't you port this stuff to ROS2? Would you agree that these moveit_sim_controllers are not needed in ROS2 since we have the ros2_control fake controllers?

@DLu DLu requested a review from AndyZe March 24, 2022 13:29
@DLu
Copy link
Copy Markdown
Contributor Author

DLu commented Mar 25, 2022

Oops, I did not see #120 when I made this. CC: @stephanie-eng

@stephanie-eng @AndyZe @JafarAbdi Do you have a strong reason for naming the controller files? I like keeping it simple with ros_controllers.yaml, but panda has panda_moveit_controllers.yaml (and others) and #120 has fanuc_controllers.yaml. The only reason I'm against using the robot name is that it makes it trickier in these packages in particular where the robot name is technically moveit_resources_fanuc

@AndyZe
Copy link
Copy Markdown
Member

AndyZe commented Mar 25, 2022

So moveit_controllers.yaml is different from ros_controllers.yaml. I was trying to rename them to make that more clear. (They used to all be named to same thing!)

I'd be cool with dropping the robot name, for sure

@DLu
Copy link
Copy Markdown
Contributor Author

DLu commented Mar 25, 2022

It makes sense that they would be different, but that's news to me. Which should be loaded to get trajectory_execution to work? See moveit/moveit2#1131

@DLu
Copy link
Copy Markdown
Contributor Author

DLu commented Mar 25, 2022

(specifically this method)

@AndyZe
Copy link
Copy Markdown
Member

AndyZe commented Mar 25, 2022

That would be moveit_controllers.yaml

@DLu
Copy link
Copy Markdown
Contributor Author

DLu commented Mar 25, 2022

Closing in favor of #120

@DLu DLu closed this Mar 25, 2022
@DLu DLu deleted the fanuc_controllers branch March 25, 2022 15:29
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.

2 participants