yoshito-n-students / layered_hardware_epos

A ros_control layer implementation for maxon EPOS motor drivers
MIT License
2 stars 0 forks source link

ResourceNotFound: layered_hardware_epos #1

Closed xxkeitoxx closed 3 years ago

xxkeitoxx commented 3 years ago

Hi,

I used this project. An error has occurred when I run this project.

control@control-Lenovo-ideapad-320-15IKB:~/epos_ws/src/layered_hardware_epos/layered_hardware_epos/launch$ roslaunch single_epos4_example.launch ... logging to /home/control/.ros/log/e1fa5d32-5c63-11eb-94f9-bca8a6a45e70/roslaunch-control-Lenovo-ideapad-320-15IKB-6227.log Checking log directory for disk usage. This may take awhile. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB.

Traceback (most recent call last): File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/init.py", line 308, in main p.start() File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/parent.py", line 268, in start self._start_infrastructure() File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/parent.py", line 217, in _start_infrastructure self._load_config() File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/parent.py", line 132, in _load_config roslaunch_strs=self.roslaunch_strs, verbose=self.verbose) File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/config.py", line 451, in load_config_default loader.load(f, config, verbose=verbose) File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 750, in load self._load_launch(launch, ros_config, is_core=core, filename=filename, argv=argv, verbose=verbose) File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 722, in _load_launch self._recurse_load(ros_config, launch.childNodes, self.root_context, None, is_core, verbose) File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 666, in _recurse_load self._param_tag(tag, context, ros_config, verbose=verbose) File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 95, in call return f(*args, **kwds) File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 257, in _param_tag vals = self.opt_attrs(tag, context, ('value', 'textfile', 'binfile', 'command')) File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 202, in opt_attrs return [self.resolve_args(tag_value(tag,a), context) for a in attrs] File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 183, in resolve_args return substitution_args.resolve_args(args, context=context.resolve_dict, resolve_anon=self.resolve_anon) File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/substitution_args.py", line 370, in resolve_args resolved = _resolve_args(resolved, context, resolve_anon, commands) File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/substitution_args.py", line 383, in _resolve_args resolved = commands[command](resolved, a, args, context) File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/substitution_args.py", line 151, in _find source_path_to_packages=source_path_to_packages) File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/substitution_args.py", line 197, in _find_executable full_path = _get_executable_path(rp.get_path(args[0]), path) File "/usr/lib/python2.7/dist-packages/rospkg/rospack.py", line 207, in get_path raise ResourceNotFound(name, ros_paths=self._ros_paths) ResourceNotFound: layered_hardware_epos ROS path [0]=/opt/ros/kinetic/share/ros ROS path [1]=/home/control/ros-sharp_ws/src ROS path [2]=/home/control/crane_plus_ws/src ROS path [3]=/home/control/catkin_ws/src ROS path [4]=/opt/ros/kinetic/share

Do you know this issue?

Thanks.

yoshito-okada commented 3 years ago

Did you source your workspace where layered_hardware_epos locates?

xxkeitoxx commented 3 years ago

Hi,

Thank you responce! I solved this issue. But I was not able to understand why this issue was solved. Because I was not able to make the situation of the same failure after successful.

I can't move motor. An error has occurred when I run this project.

control@control-Lenovo-ideapad-320-15IKB:~/epos_ws/src/layered_hardware_epos/layered_hardware_epos/launch$ roslaunch single_epos4_example.launch ... logging to /home/control/.ros/log/d3476c72-5c8a-11eb-94f9-bca8a6a45e70/roslaunch-control-Lenovo-ideapad-320-15IKB-4076.log Checking log directory for disk usage. This may take awhile. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://control-Lenovo-ideapad-320-15IKB:36339/

SUMMARY

PARAMETERS

NODES / controller_loader (controller_manager/controller_manager) controller_starter (controller_manager/controller_manager) example_layered_hardware_node (layered_hardware/layered_hardware_node) robot_state_publisher (robot_state_publisher/robot_state_publisher)

ROS_MASTER_URI=http://localhost:11311

process[example_layered_hardware_node-1]: started with pid [4093] process[controller_starter-2]: started with pid [4103] process[controller_loader-3]: started with pid [4108] process[robot_state_publisher-4]: started with pid [4113] [ERROR] [1611308864.318260147]: EposActuatorLayer::init(): Failed to open an EPOS device: No error [ERROR] [1611308864.318390861]: LayeredHardware::loadLayer(): Failed to initialize a layer [ERROR] [1611308864.318435490]: LayeredHardware::init(): Failed to load the layer 'epos_actuator_layer' [ERROR] [1611308864.318479393]: Failed to init LayeredHardware [example_layered_hardware_node-1] process has died [pid 4093, exit code 1, cmd /home/control/epos_ws/devel/lib/layered_hardware/layered_hardware_node __name:=example_layered_hardware_node __log:=/home/control/.ros/log/d3476c72-5c8a-11eb-94f9-bca8a6a45e70/example_layered_hardware_node-1.log]. log file: /home/control/.ros/log/d3476c72-5c8a-11eb-94f9-bca8a6a45e70/example_layered_hardware_node-1*.log

Is this error the result that I get a wrong setting of epos_actuator_layer?

May I ask a question hereafter? I wrote English because your remind was written in English. I think you are japanese when see your name. May I write japanes?

Thanks.

yoshito-okada commented 3 years ago

But I was not able to understand why this issue was solved.

Searching ROS_PACKAGE_PATH would help.

[ERROR] [1611308864.318260147]: EposActuatorLayer::init(): Failed to open an EPOS device: No error

This describes the issue. Check if 'device', 'protocol_stack', 'interface' and 'port' params in the example launch match your actual setup. Also, I recommend you to try rotating your motor with EPOS studio, which is the official software from Maxon, before this package.

May I write japanes?

It's ok but I don't think changing languages solves the issue.

xxkeitoxx commented 3 years ago

こんにちは。

返信ありがとうございます。

EPOS4をPCに接続したときにポート名が"USB0"で認識されず、"hidraw1"で認識されていることが分かりました。 これが原因だと思うのですが解決方法はありますか? 単純にlaunchファイルの"epos_actuator_layer:"の"port:"を"USB0"から"hidraw1"に書き換えても [ERROR] [1611557169.079567138]: EposActuatorLayer::init(): Failed to open an EPOS device: Bad port name エラーが出ます。

EPOSstudioでは問題なくセットアップおよび動作確認ができます。Firmware Updateも試しましたがうまく行きませんでした。

よろしくお願いします。

yoshito-okada commented 3 years ago

Run install_udev_rules.sh in the epos_command_library package to install udev rules, and reboot.

xxkeitoxx commented 3 years ago

こんにちは。

返信ありがとうございます。

おかげ様で [ERROR] [1611308864.318260147]: EposActuatorLayer::init(): Failed to open an EPOS device: No error に引っかからなくなりました。 その後3つほどエラーが出て2つは自力で出来ましたが3つ目で引っかかっています。

1.次はこのようなエラーが出たためlayered_hardware_extensionsをgit cloneしました。

[ERROR] [1611562658.636637262]: LayeredHardware::loadLayer(): Failed to create a layer by the lookup name 'layered_hardware_extensions/ExtendedJointLimitsLayer': According to the loaded plugin descriptions the class layered_hardware_extensions/ExtendedJointLimitsLayer with base class type layered_hardware::LayerBase does not exist. Declared types are layered_hardware/DummyEffortActuatorLayer layered_hardware/DummyPositionActuatorLayer layered_hardware/DummyVelocityActuatorLayer layered_hardware/JointLimitsLayer layered_hardware/TransmissionLayer layered_hardware_epos/EposActuatorLayer [ERROR] [1611562658.636772847]: LayeredHardware::init(): Failed to load the layer 'joint_limits_layer' [ERROR] [1611562658.636886143]: Failed to init LayeredHardware pure virtual method called terminate called without an active exception [example_layered_hardware_node-2] process has died [pid 3571, exit code -6, cmd /home/control/epos_ws/devel/lib/layered_hardware/layered_hardware_node __name:=example_layered_hardware_node __log:=/home/control/.ros/log/c889f9fa-5ee5-11eb-9d98-bca8a6a45e70/example_layered_hardware_node-2.log]. log file: /home/control/.ros/log/c889f9fa-5ee5-11eb-9d98-bca8a6a45e70/example_layered_hardware_node-2*.log

2.catkin_makeを行ったときに次のようなエラーが出ました。ros_control_extensionsをgit cloneしました。

-- ==> add_subdirectory(layered_hardware_extensions) CMake Error at /home/control/epos_ws/devel/share/hardware_interface_extensions/cmake/hardware_interface_extensionsConfig.cmake:113 (message): Project 'hardware_interface_extensions' specifies '/home/control/epos_ws/src/ros_control_extensions/hardware_interface_extensions/include' as an include dir, which is not found. It does neither exist as an absolute directory nor in '/home/control/epos_ws/src/ros_control_extensions/hardware_interface_extensions//home/control/epos_ws/src/ros_control_extensions/hardware_interface_extensions/include'. Report the problem to the maintainer 'yoshito yoshito@todo.todo' and request to fix the problem. Call Stack (most recent call first): /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:76 (find_package) layered_hardware_extensions/CMakeLists.txt:10 (find_package)

-- Configuring incomplete, errors occurred! See also "/home/control/epos_ws/build/CMakeFiles/CMakeOutput.log". See also "/home/control/epos_ws/build/CMakeFiles/CMakeError.log". Invoking "cmake" failed

3.roslaunch layered_hardware_epos single_epos4_example.launch を走らせて次のエラーが出ました。

Loaded velocity_controller [ERROR] [1611565289.403098813]: Could not load controller 'posvel_controller' because controller type 'posvel_controllers/JointPosVelController' does not exist. [ERROR] [1611565289.403249043]: Use 'rosservice call controller_manager/list_controller_types' to get the available types Error when loading posvel_controller Started ['joint_state_controller'] successfully [ERROR] [1611565289.500668084]: Could not start controller with name posvel_controller because no controller with this name exists Loaded effort_controller Error when starting ['posvel_controller'] [ERROR] [1611565289.515912167]: Could not load controller 'reset_controller' because controller type 'empty_controller/EmptyController' does not exist. [ERROR] [1611565289.516027196]: Use 'rosservice call controller_manager/list_controller_types' to get the available types

ここで引っかかっています。

よろしくお願いします。

yoshito-okada commented 3 years ago

Clone https://github.com/yoshito-n-students/ros_controllers_extensions too.

xxkeitoxx commented 3 years ago

こんにちは。

返信ありがとうございます。

rosdep update sudo rosdep install --default-yes -r --ignore-src --from-paths src catkin_make を行いました。

その後、パッケージがいくつか足りずapt installしていき CMake Error at ros_controllers_extensions/joint_space_controllers/CMakeLists.txt:28 (find_package): Could not find a configuration file for package "DART" that is compatible with requested version "6.9.0".

The following configuration files were considered but not accepted:

/opt/ros/kinetic/share/dart/cmake/DARTConfig.cmake, version: 6.3.1

ここでつまりました。

よろしくお願いします

yoshito-okada commented 3 years ago

Install dartsim (https://dartsim.github.io/install_dart_on_ubuntu.html)

sudo apt-add-repository ppa:dartsim/ppa
sudo apt-get update
sudo apt-get install libdart6-all-dev

Please remember that here is not a customer center. Please do as much as possible and then consider to post a message.

xxkeitoxx commented 3 years ago

こんにちは。

返信ありがとうございます。

launchファイルの起動を無事にできました。 その後、モーターにどうやって指令を送るか見当がつかなかったので教えてもらえないでしょうか。

プログラムは一通り見たのですが、何分、モーターはdynamixelをdynamixel_workbenchを利用してrqtで動かしてserviceで指令を送っていることを理解してjoy-controllerで動かせた程度なのでわからなかったです。 rosの通信はpublishで送信。subscriveで受信。双方向通信でservice。 このように理解していたため、subscriveするところがどこかにあると思って探していたのですが見つけられなかったので、私の知識にない方法でやっているのかなと思いました。もしかしたら、私が単純に見落としてしまっているのかもしれませんが。

カスタマーセンターのような扱いとご不快を与えているかもしれず、申し訳なく思っています。 よろしくお願いします。

yoshito-okada commented 3 years ago

These would help. Period. http://wiki.ros.org/ros_control https://github.com/yoshito-n-students/layered_hardware/blob/master/README.md