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
167 stars 59 forks source link

FrankaHW: Failed to initialize libfranka robot. libfranka: Connection error: DNS error #21

Closed Piit3r closed 3 years ago

Piit3r commented 3 years ago

Installation

Ubuntu 18.04 ROS Melodic

libfranka and franka-ros are installed with apt.

I am experiencing some issues with franka_ros_interface. I can't understand why libfranka gets a "connection error : dns error". I can run other packages like panda_moveit_config so i don't think the problem is from my machine.

It could be a configuration problem. My only modification on franka.sh is : your_ip="127.0.0.1"

Process to get error :

./franka.sh roslaunch franka_interface interface.launch

ROS_MASTER_URI=http://127.0.0.1:11311 process[franka_gripper-1]: started with pid [25172] process[franka_control-2]: started with pid [25173] process[state_controller_spawner-3]: started with pid [25174] process[robot_state_publisher-4]: started with pid [25175] process[joint_state_publisher-5]: started with pid [25176] [ INFO] [1613051592.615273834]: franka_gripper_node: Found default_speed 0.1 [ INFO] [1613051592.625174552]: franka_gripper_node: Found default_grasp_epsilon inner: 0.005, outer: 0.005 process[joint_state_desired_publisher-6]: started with pid [25182] terminate called after throwing an instance of 'franka::NetworkException' what(): libfranka: Connection error: DNS error process[controllers-7]: started with pid [25183] process[load_controllers-8]: started with pid [25185] process[base_to_link0-9]: started with pid [25192] [ERROR] [1613051592.958992321]: FrankaHW: Failed to initialize libfranka robot. libfranka: Connection error: DNS error [ERROR] [1613051592.964004733]: franka_control_node: Failed to initialize FrankaHW class. Shutting down! process[world_to_base-10]: started with pid [25197] [franka_gripper-1] process has died [pid 25172, exit code -6, cmd /opt/ros/melodic/lib/franka_gripper/franka_gripper_node __name:=franka_gripper __log:=/home/ubuntu/.ros/log/938277ba-6c63-11eb-acc5-fa163e5fc21e/franka_gripper-1.log]. log file: /home/ubuntu/.ros/log/938277ba-6c63-11eb-acc5-fa163e5fc21e/franka_gripper-1*.log

Piit3r commented 3 years ago

By the way, catkin_make is fine, everything else is ok.

justagist commented 3 years ago

Are you able to run franka-ros example codes? If you are, then franka_ros_interface should work as well. If not, then your connection/configuration may be the issue.

Piit3r commented 3 years ago

But i cannot run franka_ros examples without a robot_ip, can I? I only work in simulation for now

justagist commented 3 years ago

Oh! You didn't mention working in simulation. If you are using panda_simulator, you don't need to launch franka_inteface interface.launch; everything is already running in the simulation, and you can directly access everything using franka_ros_interface and its API.

Piit3r commented 3 years ago

Ok, so i have to ./franka.sh sim And then run something from panda_simulator?

Because i don't understand why there is a ./franka.sh sim if we don't use it

justagist commented 3 years ago

As described in the readme and franka.sh file, you don't need to run franka.sh sim for simulation anymore. It's just left there for backward compatibility. Yes, if you are running the simulation, you can control it using franka_ros_interface.

Piit3r commented 3 years ago

Ok I still don't understand how to control it usinf franka_ros_interface. each launch want me to put a robot_ip in arg

justagist commented 3 years ago

You don't have to launch anything from the franka_ros_interface package. Please look at the examples in panda_simulator repo (follow the instructions in the README).

justagist commented 3 years ago

Follow the instructions in the Usage and Demos section here, and try running the demos. The demo_task_space_control example uses franka_ros_interface for controlling the robot.

Piit3r commented 3 years ago

Ok, go it So i tried to panda_world.launch and then demo_moveit.launch.

panda_world (gazebo) is quite ok, with just one error

Controller 'panda_simulator/position_joint_position_controller' is already running

but demo_moveit gives me :

PluginlibFactory: The plugin for class 'rviz_visual_tools/KeyTool' failed to load. Error: According to the loaded plugin descriptions the class rviz_visual_tools/KeyTool with base class type rviz::Tool does not exist. Declared types are rviz/FocusCamera rviz/Interact rviz/Measure rviz/MoveCamera rviz/PublishPoint rviz/Select rviz/SetGoal rviz/SetInitialPose rviz_plugin_tutorials/PlantFlag [rospack] Error: no package given [librospack]: error while executing command [rospack] Error: no package given [librospack]: error while executing command [ERROR] [1613067725.166616271, 376.413000000]: PluginlibFactory: The plugin for class 'rviz_visual_tools/RvizVisualToolsGui' failed to load. Error: According to the loaded plugin descriptions the class rviz_visual_tools/RvizVisualToolsGui with base class type rviz::Panel does not exist. Declared types are rviz_plugin_tutorials/Teleop [rospack] Error: no package given [librospack]: error while executing command [rospack] Error: no package given

And

[ INFO] [1613067726.290805443, 376.586000000]: Starting planning scene monitor [ INFO] [1613067726.299866968, 376.587000000]: Listening to '/planning_scene' [ INFO] [1613067731.652373223, 377.773000000]: waitForService: Service [/get_planning_scene] has not been advertised, waiting... [ INFO] [1613067731.654274018, 377.773000000]: Starting planning scene monitor [ INFO] [1613067731.667393903, 377.775000000]: Listening to '/move_group/monitored_planning_scene' [ INFO] [1613067731.715750761, 377.781000000]: waitForService: Service [/get_planning_scene] has not been advertised, waiting... [ INFO] [1613067736.666445461, 378.944000000]: Failed to call service get_planning_scene, have you launched move_group or called psm.providePlanningSceneService()? [ INFO] [1613067736.666738749, 378.944000000]: Constructing new MoveGroup connection for group 'panda_arm' in namespace '' [ INFO] [1613067736.740122925, 378.955000000]: Failed to call service get_planning_scene, have you launched move_group or called psm.providePlanningSceneService()?

So the starting test fail :

Unable to connect to move_group action server 'move_group' within allotted time (30s)

demo_task_space_control gives me some problems also.

justagist commented 3 years ago

There seems to be a couple of issues: 1) As the readme explains, the moveit server does not start automatically with the simulator anymore, and you should start it manually using roslaunch panda_sim_moveit sim_move_group.launch if you want to use moveit. Launch the simulator and moveit server. Then run moveit demos. 2) Also, it looks like you may be missing rviz-visual-tools package. Try installing it with sudo apt install ros-melodic-rviz-visual-tools.

Closing this issue because it is not related to this repo. Please open an issue for panda_simulator if you find further difficulties.