How to control a maxon motor using canopen_chain_node
Hello,
I have been following the steps in this answer to control my maxon motor using epos2.
I have successfully initialized the driver using the following command:
rosservice call /driver/init
However, I am not able to understand how to proceed further and actually control the motor. I have already tried publishing on the "rostopic - joint_position_controller/command", but that only controls the motor/joint in Rviz/Gazebo, and not the actual motor.
Can someone please tell me how do I proceed further?
edit: 1) I am running Gazebo at the same time as controlling the actual motor.
2) I currently have 3 packages, test_motor (containing the urdf and launch files of the test apparatus), test_motor_control (containing the launch files to load the controllers and convert joint states to TF transforms for rviz, etc) and test_motor_config (containing the launch files to load the URDF to ROS parameter server, to load the joint controller configuration from YAML files to parameter server and to load the controllers). Please tell me how to proceed.
3) I also tried running the test_motor_config launch file (containing the launch files to load the URDF to ROS parameter server, to load the joint controller configuration from YAML files to parameter server and to load the controllers) alone but the error is shown that the Controller Spawner couldn't find the expected controller_manager ROS interface.
should control whatever that controller is connected to, it could be gazebo or it could be a real-world motor it all depends how it is setup. Are you running gazebo at the same time as trying to control the actual motor?
Yes, I am running Gazebo at the same time as controlling the actual motor.
That's rather confusing TBH. You're running a simulation of the hardware and the hardware at the same time? Are you trying to control them both (i.e. two different things) from the same controller? That is simply not possible.
Please see the question again, I have updated it with new Information.