-
Notifications
You must be signed in to change notification settings - Fork 311
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
Adds position and velocity motion generators to FrankaHWSim #181
Conversation
0cc24d7
to
c5d5194
Compare
664d9f7
to
a4caf27
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.
Just a few remarks. Generally looks good to me.
a4caf27
to
f9f3c91
Compare
@gollth I think this pull request provides the best solution since users can now work with the simulation in the same way as they work with the real robot. I think it is ready to be merged after we improved the PID gains of the motion planners (see GIF below). |
This commit adds demo_gazebo.launch using the gazebo simulation of the franka_gazebo package Additionally, the virtual_joint is removed from the move group definition.
f9f3c91
to
0be918d
Compare
b878777
to
e0e5d2c
Compare
As explained in #135, I based the code in this pull request on the implementation found in the gazebo_ros_control. There they also use the
For the |
This comment has been minimized.
This comment has been minimized.
I'm confused. #183 doesn't deal with motion generators in FrankaHWSim. However, the contributions here are required for |
This comment has been minimized.
This comment has been minimized.
e0e5d2c
to
de96e12
Compare
@rpapallas The pull request found in #224 do currently not configure any position/effort controllers. They only add the required code changes to use position controllers. You are still expected to load your own position/velocity controllers. For an example, see e60cf08. Also see #181 (comment) for all the steps required for using the new (simulated) position and velocity motion generators. I guess @frankaemika could include a position and velocity example controller in the https://github.com/frankaemika/franka_ros/blob/develop/franka_gazebo/config/sim_controllers.yaml. I, however, did not do this since the position and effort motion generators are not 100% equal to the motion generators on the real robot. I, therefore, left this decision to @frankaemika. I did include a
|
Thank you, @rickstaa. I was able to get it working. |
…bo-motion-generators to develop * commit '68968a9fc617ae442ac2fbb210cb0385a83ba829': (22 commits) update CHANGELOG.md fix desired robot states refactor doSwitch for loops move controller verification into a separate class add implement prepareSwitch to avoid starting malformed controllers only allow revolute joints for position control remove joint_names_arm refactor claimsInterface reliably launch joint_{position,velocity}_example_controller on startup in gazebo. adapt the output of the desired robot states to match the behavior of the real robot rename efforts_initialized_ to robot_initialized_ improve pid initialization refactor doSwitch method add joint_{position,velocity}_example_controller to franka_gazebo add possibility to switch between control methods at runtime add all transmission types to panda_arm.urdf.xacro feat: add effort and position traj controllers to simulation feat: add position and velocity motion generators to FrankaHWSim fix: fix conflict with #181 Expose transmission argument in franka_gazebo/panda.launch ...
Ok guys. We heavily modified this PR and merged it into develop. The feature works now a bit different. You do not have to specify at launch time which type of interface you want to use. All three are available. So you can start a position controller, stop it and then run an effort controller. Just like on the real robot. However, you cannot have a controller to control only one joint as @rickstaa did for his demo, where he had 7 controllers (one for each joint). You need to use one controller to control all joints, as you would on the real robot. So any controller that does not use the cartesian pose or cartesian velocity interface and runs on the real robot should now also work in gazebo. |
Thank you for this; much appreciated. @marcbone, To get this simulated position controller working in gazebo, I use the following:
But I can't seem to find where the controller is expecting the new joint positions, is there a ros topic / actionlib that I need to use to send joint positions to the robot? Thank you. |
Hi @rpapallas, you can for example start the Position Joint Trajectory Controller and use its action or topic interface $ roslaunch franka_gazebo panda.launch controller:=position_joint_trajectory_controller $ rostopic list /position_joint_trajectory_controller
/position_joint_trajectory_controller/command # <- Topic interface
/position_joint_trajectory_controller/follow_joint_trajectory/cancel # -.
/position_joint_trajectory_controller/follow_joint_trajectory/feedback # |
/position_joint_trajectory_controller/follow_joint_trajectory/goal # }- Action interface
/position_joint_trajectory_controller/follow_joint_trajectory/result # |
/position_joint_trajectory_controller/follow_joint_trajectory/status # -`
/position_joint_trajectory_controller/state
|
Hi @gollth thank you for the details. I don't think I can run that successfully despite having Running the controller spawner alone also suggests that it can't find the controller:
with the following output:
|
Try to install Does the controller show up in the |
Hi @marcbone indeed the position-controllers is installed. The |
That is strange. Could you post the output of |
Sometimes RQT does not reload newly installed plugins automatically. Does rqt --force-discover help? |
Hi @gollth thank you for your support. I found the problem. I am using a Singularity container to have the system working (it's similar to a Docker container). I installed ROS Noetic and Ubuntu 20.04 but only Python3. Your |
If you think that shebang should be Python 3, I can create a PR, if you want. |
Changing the shebang to python3 would make it so that |
Perfect; didn't know about this! Thank you very much for the help! |
In the link you sent it seems the correct way is |
The cmake function |
@rhaschke Thanks for the hint. I fixed it |
@marcbone Thanks for getting this implemented. Your implementation makes a lot of sense! I will perform some tests today to see which of my issues can be closed. |
Test results@marcbone I reviewed your pull request, and all of the controllers below seem to work as expected (see table below). Thanks for improving on my PR.
Steps to test these controllers
roslaunch franka_gazebo panda.launch
rosrun rqt_controller_manager rqt_controller_manager
rosrun franka_gazebo joint_position_dynamic_reconfigure_server.py rosrun rqt_joint_trajectory_controller rqt_joint_trajectory_controller
rosrun rqt_gui rqt_gui -s reconfigure
|
@marcbone, @gollth I just reviewed that all new controllers work as expected (see #181 (comment)). I, however, have several minor remarks: joint_position_group_example_controller:
type: effort_controllers/JointGroupEffortController
joint_names:
- $(arg arm_id)_joint1
- $(arg arm_id)_joint2
- $(arg arm_id)_joint3
- $(arg arm_id)_joint4
- $(arg arm_id)_joint5
- $(arg arm_id)_joint6
- $(arg arm_id)_joint7 |
…art-of-teleoperation to develop * commit 'e26ae3049b3e2d063246587301fc366229ff7998': ADD: Changelog entry
This commit guarantees that the `panda_gazebo` code aligns with the most recent upstream commit (specifically 5f90395ef000e0c998fb7aff8f127b9bd3773962). Adjustments were made to the joint position and joint effort control services to integrate with the updated version seamlessly. In the new iteration, the panda arm joint positions and efforts are managed through group controllers. You can find additional insights at frankaemika/franka_ros#181 (comment).
This commit guarantees that the `panda_gazebo` code aligns with the most recent upstream commit (specifically 5f90395ef000e0c998fb7aff8f127b9bd3773962). Adjustments were made to the joint position and joint effort control services to integrate with the updated version seamlessly. In the new iteration, the panda arm joint positions and efforts are managed through group controllers. You can find additional insights at frankaemika/franka_ros#181 (comment).
This pull request adds the
hardware_interface/PositionJointInterface'
andhardware_interface/VelocityJointInterface
interfaces to theFrankaHWSim
module. When a user chooses these interfaces, motion generators (i.e. PID controllers) are used for controlling the robot.0
. As I'm a bit short on time, I did not investigate this issue further. Adds position and velocity motion generators to FrankaHWSim #181 is, in my opinion, good enough for releasing the Noetic version of the panda_moveit_config.TODOS
Other TODOS