Comments (5)
Hi,
Yes, there is a problem sometimes when switching controllers very quickly, which happens when the first controller is not fully stopped. I am planning to work on a fix for this soon.
In the meantime, the previous controller will automatically stop if you don't send commands for a few milliseconds (you can change the default value for this timeout using robot.set_command_timeout
). So a simple workaround, for now, would be to put a delay between the commands when you want to use a different controller.
Eg:
robot.exec_velocity_cmd(joints_velocity) # send a velocity command
rospy.sleep(0.5) # add a delay of 0.5 sec
robot.move_to_joint_positions(joints_positions) # uses position controller (joint_trajectory_controller)
Hope this helps.
-- Saif
from franka_ros_interface.
Hi, Saif,
Thank you for your reply! I add a delay of 0.5 second between two commands, but it raises an error that "Controller position_joint_trajectory_controller failed with error GOAL_TOLERANCE_VIOLATED". And robot just stopped. My solution is delete the current INTERFACE instance, and create a new one, like that:
robot.exec_velocity_cmd(joints_velocity)
robot.exit_control_mode()
del robot
robot = PandaArm()
robot.move_to_joint_positions(joints_positions)
It works for me, but restarting is time consuming.
Following please find the execution log of franka.sh
in master mode, and I hope it can provide more information about this problem.
You can start planning now!
[ INFO] [1617242170.523096108]: FrankaHW: Prepared switching controllers to <none> with parameters limit_rate=1, cutoff_frequency=100, internal_controller=joint_impedance
[ INFO] [1617242186.365964091]: FrankaHW: Prepared switching controllers to joint_velocity with parameters limit_rate=1, cutoff_frequency=100, internal_controller=joint_impedance
[ INFO] [1617242186.366237520]: MotionControllerInterface: Controller franka_ros_interface/velocity_joint_velocity_controller started; Controllers franka_ros_interface/position_joint_position_controller, franka_ros_interface/effort_joint_impedance_controller, franka_ros_interface/effort_joint_torque_controller, position_joint_trajectory_controller stopped.
[ WARN] [1617242214.014615679]: MotionControllerInterface: Command timeout violated: Switching to Default control mode.position_joint_trajectory_controller
[ INFO] [1617242214.014847343]: FrankaHW: Prepared switching controllers to joint_position with parameters limit_rate=1, cutoff_frequency=100, internal_controller=joint_impedance
[ERROR] [1617242214.220702760]: Motion finished commanded, but the robot is still moving! ["joint_motion_generator_velocity_discontinuity", "joint_motion_generator_acceleration_discontinuity"]
control_command_success_rate: 0.98
[ INFO] [1617242214.221702399]: MotionControllerInterface: Controller position_joint_trajectory_controller started; Controllers franka_ros_interface/position_joint_position_controller, franka_ros_interface/effort_joint_torque_controller, franka_ros_interface/effort_joint_impedance_controller, franka_ros_interface/velocity_joint_velocity_controller stopped.
[ INFO] [1617242214.933622318]: Combined planning and execution request received for MoveGroup action. Forwarding to planning and execution pipeline.
[ INFO] [1617242214.933892185]: Planning attempt 1 of at most 1
[ INFO] [1617242214.936442792]: Planner configuration 'panda_arm' will use planner 'geometric::RRTConnect'. Additional configuration parameters will be set when the planner is constructed.
[ INFO] [1617242214.937333200]: RRTConnect: Starting planning with 1 states already in datastructure
[ INFO] [1617242214.949242620]: RRTConnect: Created 4 states (2 start + 2 goal)
[ INFO] [1617242214.949324125]: Solution found in 0.012267 seconds
[ INFO] [1617242214.953775535]: SimpleSetup: Path simplification took 0.004270 seconds and changed from 3 to 2 states
[ INFO] [1617242214.955471633]: Disabling trajectory recording
[ WARN] [1617242222.459716908]: Controller position_joint_trajectory_controller failed with error GOAL_TOLERANCE_VIOLATED:
[ WARN] [1617242222.459888508]: Controller handle position_joint_trajectory_controller reports status ABORTED
[ INFO] [1617242222.459961283]: Completed trajectory execution with status ABORTED ...
[ INFO] [1617242222.469554694]: Received event 'stop'
[ INFO] [1617242222.983184141]: Combined planning and execution request received for MoveGroup action. Forwarding to planning and execution pipeline.
[ INFO] [1617242222.983282897]: Planning attempt 1 of at most 1
[ INFO] [1617242222.984038301]: Planner configuration 'panda_arm' will use planner 'geometric::RRTConnect'. Additional configuration parameters will be set when the planner is constructed.
[ INFO] [1617242222.984329121]: RRTConnect: Starting planning with 1 states already in datastructure
[ INFO] [1617242222.995263067]: RRTConnect: Created 4 states (2 start + 2 goal)
[ INFO] [1617242222.995432991]: Solution found in 0.011220 seconds
[ INFO] [1617242223.003511822]: SimpleSetup: Path simplification took 0.007997 seconds and changed from 3 to 2 states
from franka_ros_interface.
Hi,
Adding the delay should normally work. It works for me at least. It is possible that the robot has not fully come to rest in 0.5 seconds. Try increasing the delay to make sure that the robot is fully stationary before switching controllers. The reason it works for you when you reinitialise the robot instance is probably because of the robot has time to fully come to rest by the time the interface reloads.
from franka_ros_interface.
Also I would suggest not to use exit_control_mode
for now because it is not implemented properly for handling immediate switching.
from franka_ros_interface.
Hi, Saif,
Thank you for your suggestion! I'll check the delay time. If there is any improvement, I'll share it here. Thanks a lot!
Hank
from franka_ros_interface.
Related Issues (20)
- Trouble in executing a plan using move group interface HOT 4
- I got a Problem with the arm controller HOT 3
- [franka_control-2] has died! please help HOT 3
- Strange noises and barely noticable jerky movement when using test_controller.py HOT 2
- catkin build issue HOT 11
- Fix shebang for python2 and python3 compatibility HOT 4
- ArmInterface() seems to get stuck moveit '/get_planning_scene' HOT 1
- com
- about control frequency HOT 4
- use franka_ros_interface with two panda arm simultaneously HOT 3
- Values of width and force in grasp HOT 1
- Error occurs with libfranka 0.8 and no real time kernel HOT 1
- REQUIRED process [franka_control-3] has died error when running driver node HOT 3
- Lacks dependencies about quaternion HOT 1
- Maybe it could not be run in zsh HOT 1
- Any control interface for cartesian velocity control? HOT 1
- load_gripper:=false doesn't work HOT 1
- 【cartesian_impedance mode】Has anyone tried cartesian_impedance with franka ros interface? HOT 1
- Issue when controlling and moving the robot HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from franka_ros_interface.