ROS2 Canopen Nanotec - How to setup configuration?
Describe the bug:
I am trying to attach a nanotec controller (CL3-E-2-0F) to operate a BLDC motor (DB42M03). I created a single-motor package configuration using the Canopen tutorial and the Trinamic Stepper Motor example. However, I get the errors shown below. I would greatly appreciate any help in resolving this issue and getting the motor to operate w/ ROS2.
Setup:
Device: Jetson AGX Orin
OS: Linux
ROS-Distro: Foxy
Repo: ros-industrial/ros2_canopen
Branch/Commit: Foxy
Additional context I have also attached a link to the package repository, for any clarification on the code. https://github.com/r9-pena/drive_motor.git
ERROR BELOW
--- stderr: drivemotor
CMake Error at CMakeLists.txt:25 (findpackage):
By not providing "Findros2canopen.cmake" in CMAKEMODULEPATH this project
has asked CMake to find a package configuration file provided by
"ros2canopen", but CMake did not find one.
Could not find a package configuration file provided by "ros2_canopen" with any of the following names:
ros2_canopenConfig.cmake
ros2_canopen-config.cmake
Add the installation prefix of "ros2canopen" to CMAKEPREFIXPATH or set "ros2canopenDIR" to a directory containing one of the above files. If "ros2canopen" provides a separate development package or SDK, be sure it has been installed.
Failed <<< drive_motor [2.13s, exited with code 1]
Asked by cypher20 on 2023-07-18 08:36:51 UTC
Comments
So I was able to resolve this error, by modifying the dependency values on the CMake and package.xml.
Before: find_package(ros2_canopen REQUIRED)ros2_canopen
After: find_package(canopen REQUIRED)canopen
However, now I get an error of a mismatch of the product number, as shown below. I know one of the values being compared is from the .eds file, but I'm not sure which product code it is referring to.
--- stderr: drive_motor
~/rover_ws/install/lely_core_libraries/lib/python3.8/site-packages/dcfgen/cli.py:14: UserWarning: ProductNumber in [DeviceInfo] differs from product code in identity object
super().init(cfg, env)
Asked by cypher20 on 2023-07-18 11:22:57 UTC