-
Notifications
You must be signed in to change notification settings - Fork 310
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
Add a JointTrajectoryController config #186
Conversation
…ika#186, and frankaemika#187 into develop
@rhaschke, @gollth I re-tested the gains you provided for the simulation on the real robot and they seem to work. I think the errors and problems I experienced earlier were unrelated to the PID gains. I, therefore, think we can safely add the effort_joint_trajectory_controller:
type: effort_controllers/JointTrajectoryController
joints:
- panda_joint1
- panda_joint2
- panda_joint3
- panda_joint4
- panda_joint5
- panda_joint6
- panda_joint7
gains:
panda_joint1: { p: 600, d: 30, i: 0 }
panda_joint2: { p: 600, d: 30, i: 0 }
panda_joint3: { p: 600, d: 30, i: 0 }
panda_joint4: { p: 600, d: 30, i: 0 }
panda_joint5: { p: 250, d: 10, i: 0 }
panda_joint6: { p: 150, d: 10, i: 0 }
panda_joint7: { p: 50, d: 5, i: 0 } |
I'm not sure we should keep the detailed controller names indicating the HW interface used, i.e. |
I have no real preference other than the user being able to switch between multiple controllers when working with the real robot. I checked #188 and for the simulation the following code is fine: franka_ros/franka_gazebo/config/sim_controllers.yaml Lines 14 to 31 in 7813b3f
When working with the real robot you now use the following code: franka_ros/franka_control/config/default_controllers.yaml Lines 1 to 26 in 7813b3f
Here I think we can change the Alternatively, you can add code similar to the code found in the |
Hmm, I'm not sure. If we offer multiple |
With explicit, but different names for real and sim (position_joint_trajectory_controller vs. effort_joint_trajectory_controller), |
The name in |
|
Since the PID gains for the However, my preference is to use the general franka_ros/franka_gazebo/config/sim_controllers.yaml Lines 14 to 31 in 7813b3f
In that case we can use the effort_joint_trajectory_controller:
type: effort_controllers/JointTrajectoryController
joints:
- panda_joint1
- panda_joint2
- panda_joint3
- panda_joint4
- panda_joint5
- panda_joint6
- panda_joint7
gains:
panda_joint1: { p: 600, d: 30, i: 0 }
panda_joint2: { p: 600, d: 30, i: 0 }
panda_joint3: { p: 600, d: 30, i: 0 }
panda_joint4: { p: 600, d: 30, i: 0 }
panda_joint5: { p: 250, d: 10, i: 0 }
panda_joint6: { p: 150, d: 10, i: 0 }
panda_joint7: { p: 50, d: 5, i: 0 }
constraints:
goal_time: 0.5
panda_joint1:
goal: 0.05
panda_joint2:
goal: 0.05
panda_joint3:
goal: 0.05
panda_joint4:
goal: 0.05
panda_joint5:
goal: 0.05
panda_joint6:
goal: 0.05
panda_joint7:
goal: 0.05 We can then additionally add the position_joint_trajectory_controller:
type: position_controllers/JointTrajectoryController
joints:
- panda_joint1
- panda_joint2
- panda_joint3
- panda_joint4
- panda_joint5
- panda_joint6
- panda_joint7
constraints:
goal_time: 0.5
panda_joint1:
goal: 0.05
panda_joint2:
goal: 0.05
panda_joint3:
goal: 0.05
panda_joint4:
goal: 0.05
panda_joint5:
goal: 0.05
panda_joint6:
goal: 0.05
panda_joint7:
goal: 0.05 velocity_joint_trajectory_controller:
type: velocity_controllers/JointTrajectoryController
joints:
- panda_joint1
- panda_joint2
- panda_joint3
- panda_joint4
- panda_joint5
- panda_joint6
- panda_joint7
constraints:
goal_time: 0.5
panda_joint1:
goal: 0.05
panda_joint2:
goal: 0.05
panda_joint3:
goal: 0.05
panda_joint4:
goal: 0.05
panda_joint5:
goal: 0.05
panda_joint6:
goal: 0.05
panda_joint7:
goal: 0.05 |
@gollth Here are some details about why we need more changes on the We currently load the controller configuration of the robot to MoveIt in the simple_moveit_controller_manager.launch.xml launch file. This is done by loading the parameters in the simple_moveit_controllers.yaml simple_moveit_controllers.yaml onto the
|
Usage: roslaunch franka_gazebo panda.launch controller:=effort_joint_trajectory_controller
This allows using the same name, no matter what kind of low-level sim controller is used (position-, velocity-, or effort-based).
...using YAML anchor+references. This allows keeping the previous name, but not introducing redundancy.
d6ba2fe
to
3f06e43
Compare
Using YAML anchors + references, I was able to define the commonly named default |
I'm still not convinced to drop the transmissions from the controller names. To my understanding MoveIT should be controller independent. Therefore it should run with both Technically ROS provides a lot of tools which can solve the issues @rickstaa you mentioned in a generic way.
@rickstaa which files exactly are you referring to? Could this be solved with ROS launch arguments?
Not necessarily. Again with launch args and controller_list:
- name: $(arg transmission)_joint_trajectory_controller
action_ns: follow_joint_trajectory
...
Does that pose a problem? |
@rhaschke my suggestion is to add the |
Of course, you are right @gollth. One could configure the desired controller name via substitution on the
That's not really a solution, because that would enforce people to use the effort controller. I think we want to keep the flexibility of switching controllers. |
Not necessarily, when you make this configurable via substitutation/launch args
Again not really. The final end user (of rhaschke/panda_moveit_config#16 (I'm not entirely sure which is the latest branch, so I create that PR on This way you can do: # Same as before, will take the 'effort_joint_trajectory_controller' as default
roslaunch panda_moveit_config move_group.launch
# Alternatively once we change controllers or add new ones:
roslaunch panda_moveit_config move_group.launch transmission:=position The config dependency will be introduced with the "default" naming scheme IMO (but even worse, it will be unspecified). Should we decide to update the default controller from, say,
Please no. |
I got this idea before. I stated:
However, this way, the default specified in |
Maybe, I had a fundamental misunderstanding of your launch process. So far, I was assuming that you load (and start) a specific trajectory controller by default when launching either the Gazebo sim or the real robot. However, in Gazebo, the default is empty:
and for the real robot, you don't even provide an argument to load/start a controller, but just start the state controller:
Hence, given the fact that the user needs to specify the controller manually anyway, I agree that he can do so from |
Closing in favour of #200. |
- Provide a transmission argument to switch between position, velocity, and effort controllers - Implements frankaemika/franka_ros#186 (comment)
…evelop * commit '86845e642c7074eff2646d576b9588740f9f4229': HACK: Disable Gripper tests because flaky
Usage:
roslaunch franka_gazebo panda.launch controller:=effort_joint_trajectory_controller
Instead of stating the transmission type in the controller name, I suggest using just
joint_trajectory_controller
, here as well as indefault_controllers.yaml
:franka_ros/franka_control/config/default_controllers.yaml
Line 1 in 041d3eb