Skip to content
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

Migrates to new franka simulation #14

Merged
merged 9 commits into from
Sep 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .alexignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
CHANGELOG.md
CONTRIBUTING.md
14 changes: 14 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[flake8]
max-line-length = 89
extend-ignore = E203
exclude =
.git,
__pycache__,
sandbox,
docs,
tests,
franka_ros,
panda_moveit_config
per-file-ignores =
__init__.py: F401, E501
max-complexity = 10
3 changes: 2 additions & 1 deletion .github/renovate.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"extends": ["config:base"]
"extends": ["config:base"],
"labels": ["bump:patch"]
}
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

node_modules/.bin/lint-staged && git add -A
node_modules/.bin/lint-staged && git add -A
1 change: 1 addition & 0 deletions .remarkignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CHANGELOG.md
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### [1.0.18](https://github.com/rickstaa/panda-gazebo/compare/v1.0.17...v1.0.18) (2021-09-20)

### [1.0.17](https://github.com/rickstaa/panda-gazebo/compare/v1.0.16...v1.0.17) (2021-09-13)

### [1.0.16](https://github.com/rickstaa/panda-gazebo/compare/v1.0.15...v1.0.16) (2021-09-13)
Expand Down
3 changes: 0 additions & 3 deletions TODO.md

This file was deleted.

85 changes: 85 additions & 0 deletions contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Contributing

When contributing to this repository, please first discuss the change you wish to make via issue,
email, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

## Find projects to work on

Projects that are open for contributions can be found on the [issue tab](https://github.com/rickstaa/panda-gazebo/) and will be labelled with the `help wanted` tag. Projects with the `beginner` label are ideal for beginning programmers. If you find a project that spikes your interest, leave a comment. We will then assign you to this project. After you did one project, you will be added as a contributor after which you can attach yourself to projects to work on. You can also submit a feature you would like to work on yourself by by opening [an issue](https://github.com/rickstaa/panda-gazebo/issues/new).

## Forking process

1. Fork the main [repository](https://github.com/rickstaa/panda-gazebo/)
2. Create your feature branch `git checkout -b feature/fooBar`
3. Commit your changes `git commit -am 'Add some fooBar'`
4. Push to the branch `git push origin feature/fooBar`
5. Create a new Pull Request

## Commit instructions

We use husky pre-commit hooks to ensure code quality. To enable these hooks please:

1. Install [node](https://nodejs.org/en/download/package-manager/).
2. Install [python](https://www.python.org/downloads/).
3. Run `npm install -D` and `pip install .[dev]` to install husky and the required linters.
4. Run `npm run prepare` to setup the pre-commit hooks.

## Pull Request Process

1. Ensure any install or build dependencies are removed before the end of the layer when doing a build.
2. Update the README.md with details of changes to the interface, this includes new environment variables, exposed ports, useful file locations and container parameters.
3. Increase the version numbers in any examples files and the README.md to the new version that this Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/). To prevent errors you are recommended to use the [standard-version](https://github.com/conventional-changelog/standard-version) tool.
4. Update the `CHANGELOG.md`. This is also done using the [standard-version](https://github.com/conventional-changelog/standard-version) tool.
5. You may merge the Pull Request in once you have the sign-off of two other developers, or if you do not have permission to do that, you may request the second reviewer to merge it for you.

### Versioning instructions

We use the [standard-version](https://github.com/conventional-changelog/standard-version) package for versioning. This tool will automatically increase the version and create a changelog by parsing your commits using the [conventional Commits](https://conventionalcommits.org/). This package can be invoked using the `npm run release` command. After you cut a release, you can push the new git tag using the `git push --follow-tags origin main` command.

### Linting instructions

We use [husky](https://github.com/typicode/husky) pre-commit hooks to perform some linting and formatting actions. These actions will automatically run when you create a commit. Apart from this also some linting actions are performed by github actions when you create a pull request.

## Code of Conduct

### Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.

### Our Standards

Examples of behaviour that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behaviour by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

### Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behaviour and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behaviour.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviours that they deem inappropriate, threatening, offensive, or harmful.

### Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

### Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org

[version]: http://contributor-covenant.org/version/1/4/
2 changes: 1 addition & 1 deletion franka_ros
Submodule franka_ros updated 78 files
+4 −0 .ci/Dockerfile.kinetic
+4 −0 .ci/Dockerfile.melodic
+4 −0 .ci/Dockerfile.noetic
+33 −0 CHANGELOG.md
+2 −0 franka_control/CMakeLists.txt
+0 −40 franka_control/config/panda_gazebo_control.yaml
+1 −2 franka_control/launch/franka_control.launch
+2 −1 franka_control/package.xml
+7 −1 franka_control/src/franka_combined_control_node.cpp
+107 −44 franka_control/src/franka_control_node.cpp
+24 −6 franka_control/src/franka_state_controller.cpp
+1 −1 franka_description/package.xml
+2 −2 franka_description/robots/dual_panda_example.urdf.xacro
+2 −16 franka_description/robots/hand.urdf.xacro
+39 −87 franka_description/robots/hand.xacro
+0 −28 franka_description/robots/panda.control.xacro
+0 −33 franka_description/robots/panda.gazebo.xacro
+65 −16 franka_description/robots/panda_arm.urdf.xacro
+302 −315 franka_description/robots/panda_arm.xacro
+0 −5 franka_description/robots/panda_arm_hand.urdf.xacro
+371 −0 franka_description/robots/panda_gazebo.xacro
+115 −0 franka_description/robots/utils.xacro
+3 −0 franka_example_controllers/CMakeLists.txt
+1 −1 franka_example_controllers/cfg/compliance_param.cfg
+1 −0 franka_example_controllers/launch/cartesian_impedance_example_controller.launch
+1 −1 franka_example_controllers/package.xml
+35 −57 franka_example_controllers/scripts/dual_arm_interactive_marker.py
+27 −37 franka_example_controllers/scripts/interactive_marker.py
+5 −5 franka_example_controllers/scripts/move_to_start.py
+2 −2 franka_example_controllers/src/cartesian_impedance_example_controller.cpp
+2 −3 franka_example_controllers/src/teleop_joint_pd_example_controller.cpp
+151 −0 franka_gazebo/CMakeLists.txt
+12 −0 franka_gazebo/config/franka_hw_sim.yaml
+195 −0 franka_gazebo/config/franka_sim_description_with_marker.rviz
+40 −0 franka_gazebo/config/sim_controllers.yaml
+12 −0 franka_gazebo/franka_gripper_sim_plugin.xml
+12 −0 franka_gazebo/franka_hw_sim_plugin.xml
+141 −0 franka_gazebo/include/franka_gazebo/franka_gripper_sim.h
+193 −0 franka_gazebo/include/franka_gazebo/franka_hw_sim.h
+91 −0 franka_gazebo/include/franka_gazebo/joint.h
+192 −0 franka_gazebo/include/franka_gazebo/model_kdl.h
+113 −0 franka_gazebo/launch/panda.launch
+6 −0 franka_gazebo/mainpage.dox
+47 −0 franka_gazebo/package.xml
+3 −0 franka_gazebo/rosdoc.yaml
+484 −0 franka_gazebo/src/franka_gripper_sim.cpp
+529 −0 franka_gazebo/src/franka_hw_sim.cpp
+73 −0 franka_gazebo/src/joint.cpp
+267 −0 franka_gazebo/src/model_kdl.cpp
+23 −0 franka_gazebo/test/CMakeLists.txt
+196 −0 franka_gazebo/test/fk_tests.cpp
+89 −0 franka_gazebo/test/gravity_tests.cpp
+534 −0 franka_gazebo/test/jacobian_tests.cpp
+7 −0 franka_gazebo/test/launch/franka_hw_sim.test
+468 −0 franka_gazebo/test/launch/panda-gazebo.urdf
+10 −0 franka_gazebo/test/main.cpp
+364 −0 franka_gazebo/world/stone.sdf
+1 −1 franka_gripper/package.xml
+2 −0 franka_hw/CMakeLists.txt
+26 −2 franka_hw/include/franka_hw/franka_combinable_hw.h
+19 −2 franka_hw/include/franka_hw/franka_combined_hw.h
+46 −18 franka_hw/include/franka_hw/franka_hw.h
+8 −4 franka_hw/include/franka_hw/franka_model_interface.h
+82 −0 franka_hw/include/franka_hw/model.h
+254 −0 franka_hw/include/franka_hw/model_base.h
+6 −1 franka_hw/include/franka_hw/services.h
+2 −1 franka_hw/package.xml
+84 −29 franka_hw/src/franka_combinable_hw.cpp
+72 −3 franka_hw/src/franka_combined_hw.cpp
+44 −16 franka_hw/src/franka_hw.cpp
+36 −21 franka_hw/src/services.cpp
+2 −0 franka_msgs/msg/FrankaState.msg
+1 −1 franka_msgs/package.xml
+1 −1 franka_msgs/srv/SetEEFrame.srv
+1 −1 franka_ros/CMakeLists.txt
+1 −1 franka_ros/package.xml
+2 −3 franka_visualization/launch/franka_visualization.launch
+1 −1 franka_visualization/package.xml
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "panda-gazebo",
"version": "1.0.17",
"version": "1.0.18",
"description": "Gazebo panda simulation created for the Panda environment that is found in the 'openai_ros' ROS package.",
"keywords": [
"reinforcement-learning",
Expand Down
6 changes: 4 additions & 2 deletions panda_gazebo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ find_package(catkin REQUIRED COMPONENTS
std_msgs
message_generation
geometry_msgs
trajectory_msgs
actionlib_msgs
trajectory_msgs
control_msgs
dynamic_reconfigure
)
Expand Down Expand Up @@ -70,6 +70,8 @@ add_service_files(
GetRandomEePose.srv
GetRandomJointPositions.srv
SetEePose.srv
SetGripperWidth.srv
SetJointCommands.srv
SetJointEfforts.srv
SetJointPositions.srv
)
Expand Down Expand Up @@ -128,7 +130,7 @@ catkin_package(
CATKIN_DEPENDS
message_runtime rospy gazebo_msgs std_msgs controller_manager_msgs
geometry_msgs actionlib_msgs trajectory_msgs sensor_msgs control_msgs rviz actionlib
franka_description panda_moveit_config
franka_description franka_gazebo panda_moveit_config
# DEPENDS system_lib
)

Expand Down
9 changes: 5 additions & 4 deletions panda_gazebo/action/FollowJointTrajectory.action
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Follow_joint_trajectory action
# NOTE: This action is a direct copy of the action found in the control_msgs package. It
# was created to provide a better distinction between the messages of the
# panda_gazebo/follow_joint_trajectory action server and the
# panda_arm_controller/follow_joint_trajectory action serer.
# NOTE: This action extends the control_msgs/FollowJointTrajectoryAction such that
# it also contains values to automatically generate the time axis

# The joint trajectory to follow
trajectory_msgs/JointTrajectory trajectory
Expand Down Expand Up @@ -30,6 +28,9 @@ control_msgs/JointTolerance[] path_tolerance
# GOAL_TOLERANCE_VIOLATED
control_msgs/JointTolerance[] goal_tolerance
duration goal_time_tolerance

# Extra time axis attributes
# NOTE: Used for automatic time axis generation
bool create_time_axis # Automatically create a time axis
float64 time_axis_step # Time axis step size

Expand Down
36 changes: 0 additions & 36 deletions panda_gazebo/cfg/_cfg/parms_config.yaml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,23 @@ panda_arm_controller:
- panda_joint5
- panda_joint6
- panda_joint7
constraints:
goal_time: 0.5
stopped_velocity_tolerance: 0 # Added because of wrong PID gains see #9
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
gains:
panda_joint1: { p: 12000, d: 50, i: 0.0, i_clamp: 10000 }
panda_joint2: { p: 30000, d: 100, i: 0.02, i_clamp: 10000 }
Expand All @@ -18,38 +35,3 @@ panda_arm_controller:
panda_joint5: { p: 12000, d: 70, i: 0.01, i_clamp: 1 }
panda_joint6: { p: 7000, d: 50, i: 0.01, i_clamp: 1 }
panda_joint7: { p: 2000, d: 20, i: 0.0, i_clamp: 1 }
constraints:
goal_time: 2.0
state_publish_rate: 25

panda_hand_controller:
type: effort_controllers/JointTrajectoryController
joints:
- panda_finger_joint1
- panda_finger_joint2
gains:
panda_finger_joint1: { p: 5, d: 3.0, i: 0, i_clamp: 1 }
panda_finger_joint2: { p: 5, d: 1.0, i: 0, i_clamp: 1 }
state_publish_rate: 25

# Make controllers visible to MoveIt
controller_list:
- name: effort_panda_arm_trajectory_controller
action_ns: follow_joint_trajectory
type: FollowJointTrajectory
default: true
joints:
- panda_joint1
- panda_joint2
- panda_joint3
- panda_joint4
- panda_joint5
- panda_joint6
- panda_joint7
- name: effort_panda_hand_trajectory_controller
action_ns: follow_joint_trajectory
type: FollowJointTrajectory
default: true
joints:
- panda_finger_joint1
- panda_finger_joint2
9 changes: 1 addition & 8 deletions panda_gazebo/cfg/controllers/joint_effort_controllers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,4 @@ panda_arm_joint6_effort_controller:
joint: panda_joint6
panda_arm_joint7_effort_controller:
type: effort_controllers/JointEffortController
joint: panda_joint7

panda_hand_finger1_effort_controller:
type: effort_controllers/JointEffortController
joint: panda_finger_joint1
panda_hand_finger2_effort_controller:
type: effort_controllers/JointEffortController
joint: panda_finger_joint2
joint: panda_joint7
7 changes: 0 additions & 7 deletions panda_gazebo/cfg/controllers/joint_position_controllers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,3 @@ panda_arm_joint6_position_controller:
panda_arm_joint7_position_controller:
type: position_controllers/JointPositionController
joint: panda_joint7

panda_hand_finger1_position_controller:
type: position_controllers/JointPositionController
joint: panda_finger_joint1
panda_hand_finger2_position_controller:
type: position_controllers/JointPositionController
joint: panda_finger_joint2
6 changes: 0 additions & 6 deletions panda_gazebo/cfg/controllers/joint_state_controller.yaml

This file was deleted.

45 changes: 0 additions & 45 deletions panda_gazebo/cfg/controllers/joint_trajectory_controllers.yaml

This file was deleted.

11 changes: 11 additions & 0 deletions panda_gazebo/cfg/controllers/moveit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Configuration that contains the general MoveIt configuration values
# MoveIt-specific simulation settings
move_group:
moveit_sim_hw_interface:
joint_model_group: panda_arm
joint_model_group_pose: ready
# Increase MoveIt execution time limit
# NOTE: Needed because PID gains are not well tuned see #9
trajectory_execution:
allowed_execution_duration_scaling: 5.0
# allowed_goal_duration_margin: 2.5
Loading