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

Stomp planner #631

Merged
merged 13 commits into from
Apr 6, 2017
Merged

Stomp planner #631

merged 13 commits into from
Apr 6, 2017

Conversation

bbrito
Copy link

@bbrito bbrito commented Mar 12, 2017

Stomp planner configuration added for raw3-1. Launch files too.

merge together with ipa320/cob_manipulation#104

Copy link
Member

@floweisshardt floweisshardt left a comment

Choose a reason for hiding this comment

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

no launch files in cob_hardware https://github.com/ipa320/cob_robots/pull/631/files#diff-22447eacd575bff1ed87005f7ac42b32 (this is also in cob4-5 directory which is certainly not correct.)

@bbrito
Copy link
Author

bbrito commented Mar 12, 2017

Which launch files are you referring to?

@floweisshardt
Copy link
Member

renamed/moved one (probably not by purpose): cob_bringup/components/legacy_schunk_powercube.launch → cob_hardware_config/cob4-5/config/legacy_schunk_powercube.launch

Copy link
Member

@fmessmer fmessmer left a comment

Choose a reason for hiding this comment

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

Please review your PR for formal correctness before we can review the actual feature:

  • do not change indentation scheme
  • revert moving files
  • reference/link related PRs

@@ -131,6 +132,7 @@
<arg name="component_name" value="arm_left"/>
<arg name="can_device" value="can3"/>
<arg name="sim" value="$(arg sim)"/>
<arg name="cartesian_control" value="$(arg cartesian_control)"/>
Copy link
Member

Choose a reason for hiding this comment

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

if we add this, then we add it for both arms...
however, adding it currently gives us load problems on the real hardware...
you could pass the argument only in case sim is active:
<arg if=$(arg sim) name="cartesian_control" value="$(arg cartesian_control)"/>

@@ -11,6 +11,7 @@
<arg name="cob4-5-h1" default="localhost"/>
<arg name="env-script" default="$(find cob_bringup)/env.sh"/>
<arg name="sim" default="false"/>
<arg name="cartesian_control" default="false"/>
Copy link
Member

Choose a reason for hiding this comment

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

remove this as you cannot call a xml directly thus you cannot pass a launch argument..

@@ -58,7 +59,7 @@
<arg name="robot" value="$(arg robot)"/>
<arg name="sim" value="$(arg sim)"/>
</include>
<include file="$(find cob_bringup)/components/legacy_schunk_powercube.launch">
<include file="$(find cob_bringup)/components/canopen_generic.launch">
Copy link
Member

Choose a reason for hiding this comment

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

this won't work without proper configuration/yaml files...I guess this hasn't been tested on HW...

Copy link
Author

Choose a reason for hiding this comment

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

The problem is that "someone" deleted legacy_schunk_powercube.launch so now the software that we have in the main repository is wrong fro raw3-1 and cob3-6. Anyway I will put this back as it was...

- arm_wrist_3_joint
required_drive_mode: 1

arm_1_joint_position_controller:
Copy link
Member

Choose a reason for hiding this comment

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

convention is to use <joint_name>_position_controller....-> arm_shoulder_pan_joint_position_controller
same for the other controllers...

Copy link
Member

Choose a reason for hiding this comment

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

please respect the convention!

required_drive_mode: 2

arm_1_joint_velocity_controller:
type: velocity_controllers/JointVelocityController
Copy link
Member

Choose a reason for hiding this comment

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

have you tested this on hardware?
does the ur_modern_driver support velocity interfaces? if yes, then please use ur_modern_driver in the ur.launch....with proper configuration....so far, this seems to be simulation only

Copy link
Author

Choose a reason for hiding this comment

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

I tested it at it works. I will keep the both options for the drivers for the ones that don't have the new driver... The configuration files are inside the driver package. I don't think it is a good idea to change that...

Copy link
Member

Choose a reason for hiding this comment

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

What did you test? On hardware?
In case it works with the (released) ur_modern_driver and in simulation, it's ok to use the ur_modern_driver as the default option in ur.launch...as long as the dependency is defined...

Copy link
Author

Choose a reason for hiding this comment

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

I will keep like this for now. If you guys want in the future to make it default feel free.

Copy link
Member

@fmessmer fmessmer left a comment

Choose a reason for hiding this comment

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

few more...

action_ns: follow_joint_trajectory
type: FollowJointTrajectory
joints:
- torso_pan_joint
- torso_tilt_joint
- name: multi_dof_joint_trajectory_action
type: MultiDofFollowJointTrajectory
Copy link
Member

Choose a reason for hiding this comment

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

this won't work for others...that do not have this plugin

joints:
- virtual/x
- virtual/y
- virtual/theta
Copy link
Member

Choose a reason for hiding this comment

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

is this used by the MultiDofFollowJointTrajectory plugin? why not use base/x instead of virtual/x?

Copy link
Author

Choose a reason for hiding this comment

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

yes.

- name: fake_torso_controller
joints:
- torso_pan_joint
- torso_tilt_joint
Copy link
Member

Choose a reason for hiding this comment

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

keep the fake_torso_controller

kinematics_solver: kdl_kinematics_plugin/KDLKinematicsPlugin
kinematics_solver_search_resolution: 0.005
kinematics_solver_timeout: 0.05
kinematics_solver_attempts: 3
Copy link
Member

Choose a reason for hiding this comment

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

keep the torso kinematics plugin

@@ -26,14 +26,13 @@ planner_configs:
min_valid_path_fraction: 0.5 # Accept partially valid moves above fraction. default: 0.5
RRTkConfigDefault:
type: geometric::RRT
range: 0.1 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup()
range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup()
Copy link
Member

Choose a reason for hiding this comment

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

if this PR is about adding STOMP...why do you change OMPL parameters?

<!--VIRTUAL JOINT: Purpose: this element defines a virtual joint between a robot link and an external frame of reference (considered fixed with respect to the robot)-->
<virtual_joint name="world_joint" type="planar" parent_frame="odom_combined" child_link="base_footprint" />
<virtual_joint name="Base" type="planar" parent_frame="/odom_combined" child_link="base_footprint" />
Copy link
Member

Choose a reason for hiding this comment

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

why change the name?

Copy link
Author

Choose a reason for hiding this comment

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

it is more representative...

Copy link
Member

@fmessmer fmessmer left a comment

Choose a reason for hiding this comment

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

still:

  • restore indentation

and we have some dependency issues as the required packages are apparently not released into indigo

</group>
</launch>

Copy link
Member

Choose a reason for hiding this comment

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

fully remove changes in this file...

@@ -12,6 +12,7 @@
<arg name="env-script" default="$(find cob_bringup)/env.sh"/>
<arg name="sim" default="false"/>


Copy link
Member

Choose a reason for hiding this comment

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

remove

@@ -131,6 +132,7 @@
<arg name="component_name" value="arm_left"/>
<arg name="can_device" value="can3"/>
<arg name="sim" value="$(arg sim)"/>
<arg if="$(arg sim)" name="cartesian_control" value="$(arg cartesian_control)"/>
Copy link
Member

Choose a reason for hiding this comment

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

there is no $(arg cartesian_control...set value to true in case you like to use it...

also add it to arm_right

@@ -68,6 +69,7 @@
<arg name="use_modern_driver" value="false"/>
<arg name="robot_ip" value="$(arg ur_ip)"/>
<arg name="sim" value="$(arg sim)"/>
<arg name="cartesian_control" value="$(arg cartesian_control)"/>
Copy link
Member

Choose a reason for hiding this comment

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

make consistent with the comments for cob4-5

@@ -0,0 +1,25 @@
<?xml version="1.0"?>
Copy link
Member

Choose a reason for hiding this comment

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

remove this file...it's in cob_bringup/components!

- arm_wrist_3_joint
required_drive_mode: 1

arm_1_joint_position_controller:
Copy link
Member

Choose a reason for hiding this comment

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

please respect the convention!

required_drive_mode: 2

arm_1_joint_velocity_controller:
type: velocity_controllers/JointVelocityController
Copy link
Member

Choose a reason for hiding this comment

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

What did you test? On hardware?
In case it works with the (released) ur_modern_driver and in simulation, it's ok to use the ur_modern_driver as the default option in ur.launch...as long as the dependency is defined...

kinematics_solver_search_resolution: 0.005
kinematics_solver_timeout: 0.005
kinematics_solver_timeout: 5
Copy link
Member

Choose a reason for hiding this comment

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

5 seconds for an IK solution?
You could use ur_kinematics/UR10KinematicsPlugin it's an analytic solver rather than the numerical KDL solver

Copy link
Author

Choose a reason for hiding this comment

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

This was the best configuration used... Trust me... I'm an engineer ;)

RRTstarkConfigDefault:
type: geometric::RRTstar
optimization_objective: MaximizeMinClearanceObjective
Copy link
Member

Choose a reason for hiding this comment

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

why did you change these values?
do the previous not result in a satisfying behavior?

Copy link
Author

Choose a reason for hiding this comment

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

No.

<!--CHAINS: When a chain is specified, all the links along the chain (including endpoints) are included in the group. Additionally, all the joints that are parents to included links are also included. This means that joints along the chain and the parent joint of the base link are included in the group-->
<!--SUBGROUPS: Groups can also be formed by referencing to already defined group names-->
<group name="arm">
<chain base_link="base_link" tip_link="gripper" />
Copy link
Member

Choose a reason for hiding this comment

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

is this group correct?
should it not be arm_base_link -> arm_ee_link?

@@ -3,7 +3,7 @@

<arg name="robot" default="$(optenv ROBOT !!NO_ROBOT_SET!!)"/>
<arg name="name" default="cam3d"/>
<arg name="device_id" default="#1"/>
<arg name="device_id" default="2@0"/>
Copy link
Member

Choose a reason for hiding this comment

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

revert
call openni.launch from raw3-1.xml with proper launch argument instead

<arg name="robot" value="$(arg robot)"/>
<arg name="component_name" value="$(arg component_name)"/>
<arg name="debug" value="false"/>
</include>
Copy link
Member

Choose a reason for hiding this comment

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

tabs vs. spaces

Copy link
Member

Choose a reason for hiding this comment

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

still tabs vs. spaces! please remove spaces and use tabs instead

@@ -131,6 +131,7 @@
<arg name="component_name" value="arm_left"/>
<arg name="can_device" value="can3"/>
<arg name="sim" value="$(arg sim)"/>
<arg if="$(arg sim)" name="cartesian_control" value="true"/>
Copy link
Member

Choose a reason for hiding this comment

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

as long as we use the "old" cob_obstacle_distance we cannot use this on the real hardware because it leads to high load
however, I think if="$(arg sim)" is ok

but add it to to both arms!

@@ -9,6 +9,7 @@
<arg name="ur_ip" default="localhost"/>
<arg name="env-script" default="$(find cob_bringup)/env.sh"/>
<arg name="sim" default="false"/>
<arg name="cartesian_control" default="true"/>
Copy link
Member

Choose a reason for hiding this comment

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

remove this line

@@ -68,6 +69,7 @@
<arg name="use_modern_driver" value="false"/>
<arg name="robot_ip" value="$(arg ur_ip)"/>
<arg name="sim" value="$(arg sim)"/>
<arg if="$(arg sim)" name="cartesian_control" value="true"/>
Copy link
Member

Choose a reason for hiding this comment

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


# twist controller parameters
twist_controller:
controller_interface: 0 #Velocity 0, Position 1, Trajectory 2, JointStates 3
Copy link
Member

Choose a reason for hiding this comment

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

use the new plugin-based interface configuration

Copy link
Member

Choose a reason for hiding this comment

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

preferably you meld this file against any other cartesian_controller.yaml for consistency...

- arm_wrist_1_joint
- arm_wrist_2_joint
- arm_wrist_3_joint
required_drive_mode: 1
Copy link
Member

Choose a reason for hiding this comment

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

required_drive_mode is ros_canopen-specific...remove!

@@ -1,16 +1,11 @@
arm:
kinematics_solver: kdl_kinematics_plugin/KDLKinematicsPlugin
Copy link
Member

Choose a reason for hiding this comment

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

try the analytical, UR-specific ur_kinematics/UR10KinematicsPlugin

Copy link
Author

Choose a reason for hiding this comment

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

Nor working for now:

Kinematics solver of type 'ur_kinematics/UR10KinematicsPlugin' could not be initialized for group 'arm'

We keep the previous solver.

Copy link
Member

Choose a reason for hiding this comment

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

the ur_kinematics/UR10KinematicsPlugin also takes a arm_prefix parameter...

<!--VIRTUAL JOINT: Purpose: this element defines a virtual joint between a robot link and an external frame of reference (considered fixed with respect to the robot)-->
<virtual_joint name="world_joint" type="planar" parent_frame="odom_combined" child_link="base_footprint" />
<virtual_joint name="base" type="planar" parent_frame="/odom_combined" child_link="base_footprint" />
Copy link
Member

Choose a reason for hiding this comment

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

I guess you don't need the /

<arg name="robot" value="$(arg robot)"/>
<arg name="component_name" value="$(arg component_name)"/>
<arg name="debug" value="false"/>
</include>
Copy link
Member

Choose a reason for hiding this comment

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

still tabs vs. spaces! please remove spaces and use tabs instead

@@ -1,255 +1,257 @@
<?xml version="1.0"?>
<launch>
Copy link
Member

Choose a reason for hiding this comment

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

tabs vs. spaces

Copy link
Author

Choose a reason for hiding this comment

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

Now you want tabs??? I don't understand

Copy link
Member

Choose a reason for hiding this comment

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

it's always been tabs 😉

enforce_vel_limits: true
enforce_acc_limits: false
limits_tolerance: 5.0 #for position limits [deg]
#limits_acc: [10.0, 10.0, 10.0, 10.0, 10.0, 10.0, 10.0] #[rad/s2]
Copy link
Member

Choose a reason for hiding this comment

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

<group name="arm">
<chain base_link="arm_base_link" tip_link="arm_ee_link" />
</group>
<group name="robot">
Copy link
Member

Choose a reason for hiding this comment

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

when running roslaunch cob_moveit_bringup demo.launch robot:=raw3-1, I see

Group 'robot' does not have a parent link

Copy link
Author

Choose a reason for hiding this comment

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

Its normal because is creating a virtual joint to a link (odom_combined) that does not exist yet... after that is fine

<!--CHAINS: When a chain is specified, all the links along the chain (including endpoints) are included in the group. Additionally, all the joints that are parents to included links are also included. This means that joints along the chain and the parent joint of the base link are included in the group-->
<!--SUBGROUPS: Groups can also be formed by referencing to already defined group names-->
<group name="arm">
<chain base_link="arm_base_link" tip_link="arm_ee_link" />
Copy link
Member

Choose a reason for hiding this comment

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

also, there is no end-effector defined for arm, thus, you do not get an interactive marker at the to move the GoalState in rviz!

Copy link
Author

Choose a reason for hiding this comment

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

I don't need that for the moment... THere was never a end-effector here xD

@@ -1,16 +1,11 @@
arm:
kinematics_solver: kdl_kinematics_plugin/KDLKinematicsPlugin
Copy link
Member

Choose a reason for hiding this comment

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

the ur_kinematics/UR10KinematicsPlugin also takes a arm_prefix parameter...

@bbrito
Copy link
Author

bbrito commented Apr 5, 2017

Also the official branch of ur arm does not use that plugin:

https://github.com/ros-industrial/universal_robot/blob/kinetic-devel/ur10_moveit_config/config/kinematics.yaml

@fmessmer fmessmer merged commit a28deaa into ipa320:indigo_dev Apr 6, 2017
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.

None yet

4 participants