justagist / franka_ros_interface

A ROS/Python API for controlling and managing the Franka Emika Panda robot (real and simulated).
http://justagist.github.io/franka_ros_interface
Apache License 2.0
171 stars 59 forks source link

'franka::NetworkException' libfranka: Connection error: Connection refused #15

Closed jonasspring closed 4 years ago

jonasspring commented 4 years ago

Hello, I'm trying to use the franka_ros_interface with the panda_simulator. I set up the franka.sh file to: FRANKA_ROBOT_IP="sim" your_ip="127.0.0.1" ROS_MASTER_IP="127.0.0.1" When launching the interface.launch file I get:

NODES / base_to_link0 (tf/static_transform_publisher) controllers (controller_manager/spawner) demo_scene_loader (franka_moveit/create_demo_planning_scene.py) franka_control (franka_interface/custom_franka_control_node) joint_state_desired_publisher (joint_state_publisher/joint_state_publisher) joint_state_publisher (joint_state_publisher/joint_state_publisher) load_controllers (controller_manager/controller_manager) move_group (moveit_ros_move_group/move_group) robot_state_publisher (robot_state_publisher/robot_state_publisher) state_controller_spawner (controller_manager/spawner) world_to_base (tf/static_transform_publisher)

ROS_MASTER_URI=http://127.0.0.1:11311

process[franka_control-1]: started with pid [9425] process[state_controller_spawner-2]: started with pid [9426] terminate called after throwing an instance of 'franka::NetworkException' what(): libfranka: Connection error: Connection refused process[robot_state_publisher-3]: started with pid [9432] process[joint_state_publisher-4]: started with pid [9434] process[joint_state_desired_publisher-5]: started with pid [9441] process[controllers-6]: started with pid [9442] [ WARN] [1600183441.136527432]: Shutdown request received. [ WARN] [1600183441.137741024]: Reason given for shutdown: [[/robot_state_publisher] Reason: new node registered with same name] [ WARN] [1600183441.138798262]: Shutdown request received. [ WARN] [1600183441.140150070]: Reason given for shutdown: [[/robot_state_publisher] Reason: new node registered with same name] [ WARN] [1600183441.144822500]: Shutdown request received. process[load_controllers-7]: started with pid [9443] process[base_to_link0-8]: started with pid [9444] process[world_to_base-9]: started with pid [9450] process[move_group-10]: started with pid [9455] process[demo_scene_loader-11]: started with pid [9457] ================================================================================REQUIRED process [franka_control-1] has died!

I hope you can help me. Thanks a lot.

justagist commented 4 years ago

The interface.launch file is needed only when connected to the real robot. You don't need to launch the interface separately if you want to use it with the simulator. You can directly control the simulated robot using franka_ros_interface API. The simulator launch file starts all the required nodes and can be accessed with the interface.