...
POST No. 2407904
How do I bring up the Open Manipulator of an OpenCR based system
2020-06-27 04:01:11 edcepp

Environment

  • Ubuntu 18.04 x86 Dell laptop
  • ROS 2 Dashing
  • OpenCR board running usb_to_dxl

What is working

  • The Dynamixel Wizard works properly under the OpenCR and U2D2 controllers. All servos are visible and configurable.
  • The Open Manipulator comes up and works with keyboard teleop using the U2D2 controller

What doesn't work


Under OpenCR


$ export RCUTILS_CONSOLE_STDOUT_LINE_BUFFERED=1 


$ ros2 launch open_manipulator_x_controller open_manipulator_x_controller.launch.py usb_port:=/dev/ttyACM0

[INFO] [launch]: All log files can be found below /home/eepp/.ros/log/2020-06-22-14-55-07-627795-sisters-12656

[INFO] [launch]: Default logging verbosity is set to INFO

[INFO] [launch.user]: Execute OpenManipulator-X Controller!!

[INFO] [open_manipulator_x_controller-1]: process started with pid [12669]

[ERROR] [open_manipulator_x_controller-1]: process has died [pid 12669, exit code -11, cmd '/home/eepp/robotis_ws/install/open_manipulator_x_controller/lib/open_manipulator_x_controller/open_manipulator_x_controller -d /dev/ttyACM0 1000000 __node:=open_manipulator_x_controller __params:=/home/eepp/robotis_ws/install/open_manipulator_x_controller/share/open_manipulator_x_controller/param/open_manipulator_x_controller_params.yaml'].


The above works with the U2D2 (without the usb_port parameter of course).


So i tried this. It doesn't work either under OpenCR. 


$ ros2 run open_manipulator_x_controller open_manipulator_x_controller /dev/ttyACM0 1000000

port_name and baud_rate are set to /dev/ttyACM0, 1000000 

[INFO] [open_manipulator_x_controller]: Ready to Simulate OpenManipulator-X on Gazebo

^C[INFO] [rclcpp]: signal_handler(signal_value=2)

[INFO] [open_manipulator_x_controller]: OpenManipulator-X Controller Terminated


I suspect I'm need to set up the parameters for the above to work. If true, how to I do that?


Filed Tickets


I file the following on github. There has been no response. Apologies for filing again


https://github.com/ROBOTIS-GIT/open_manipulator/issues/177




 

2020-06-27 04:01:11
edcepp
2020-06-29 14:30:14 Will Son

Hi,


I'm sorry about the delayed response for the GitHub issue thread.

I've revised and confirmed with my hardware setup for the eManual instructions for running OpenMANIPULATOR-X with OpenCR.

Please check the contents and let me know if you have any trouble with running the code.

Also, I've noticed that when you are running the open_manipulator_x_controller, it says "Ready to Simulate OpenManipulator-X on Gazebo".

This happens when the simulation is turned on in the source code, so please check the open_manipulator_x_controller.cpp file and see if there's any "sim" parameter is set to "true" (by default, sim is set to "false").

Thank you.

2020-06-29 14:30:14
willson
2020-06-30 13:19:13 Edward Epp

Thanks Wilson. You gave me the clue I needed. This is what I did: 

 

Retest

$ ros2 run open_manipulator_x_controller open_manipulator_x_controller /dev/ttyACM0 1000000

port_name and baud_rate are set to /dev/ttyACM0, 1000000 

[INFO] [open_manipulator_x_controller]: Ready to Simulate OpenManipulator-X on Gazebo

 

The Gazebo reference tells me I’m in simulation (not hardware) mode. I check the parameters.

$ ros2 param list

/open_manipulator_x_controller:

  control_period

  use_platform

  use_sim_time

 

I check to see what the value of the use_platform parameter should be. Notice the parameter name is not “sim”

$ cat src/open_manipulator/open_manipulator_x_controller/param/open_manipulator_x_controller_params.yaml

open_manipulator_x_controller:

  ros__parameters:

    use_platform: true

    control_period: 0.010

 

I check to see what the value of the use_platform parameter is.

$ ros2 param get /open_manipulator_x_controller use_platform

Parameter not set.

 

This is a problem. There is something wrong with parameters. I edit the code to force the use_platform to true.

$ diff open_manipulator_x_controller.cpp.org open_manipulator_x_controller.cpp

72c72

<  this->get_parameter_or<bool>("use_platform", use_platform_, false);

---

>  this->get_parameter_or<bool>("use_platform", use_platform_, true);

 

I rebuild

$ colcon build --symlink-install

 

Rerun

$ ros2 run open_manipulator_x_controller open_manipulator_x_controller /dev/ttyACM0 1000000

port_name and baud_rate are set to /dev/ttyACM0, 1000000 

Joint Dynamixel ID : 11, Model Name : XM430-W350

Joint Dynamixel ID : 12, Model Name : XM430-W350

Joint Dynamixel ID : 13, Model Name : XL430-W250

Joint Dynamixel ID : 14, Model Name : XL430-W250

Gripper Dynamixel ID : 15, Model Name :XL430-W250

[ERROR] [DynamixelWorkbench] Failed to set Current Based Position Control Mode!

[INFO] [open_manipulator_x_controller]: Succeeded to Initialise OpenManipulator-X Controller

 

It starts up as expected. (The ERROR is because I installed an XL servo and not an XM. This is not a fatal error.)

 

To test I run keyboard teleop in terminal 2. It works as expected. I am able to control the manipulator controlled with an OpenCR.

$ export RCUTILS_CONSOLE_STDOUT_LINE_BUFFERED=1

 

$ ros2 run open_manipulator_x_teleop open_manipulator_x_teleop_keyboard


2020-06-30 13:19:13
edcepp
2020-06-30 13:53:39 Edward Epp

This may be a clue about the parameter issue. 


eepp@sisters:~$ ros2 launch open_manipulator_x_controller open_manipulator_x_controller.launch.py
[INFO] [launch]: All log files can be found below /home/eepp/.ros/log/2020-06-29-21-40-09-548720-sisters-24244
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [launch.user]: Execute OpenManipulator-X Controller!!
[INFO] [open_manipulator_x_controller-1]: process started with pid [24257]
[ERROR] [open_manipulator_x_controller-1]: process has died [pid 24257, exit code -11, cmd '/home/eepp/robotis_ws/install/open_manipulator_x_controller/lib/open_manipulator_x_controller/open_manipulator_x_controller -d /dev/ttyUSB0 1000000 __node:=open_manipulator_x_controller __params:=/home/eepp/robotis_ws/install/open_manipulator_x_controller/share/open_manipulator_x_controller/param/open_manipulator_x_controller_params.yaml'].


It doesn't help if I send it this parameter

   usb_port:=/dev/ttyACM0



2020-06-30 13:53:39
edcepp
2020-07-03 13:58:24 Will Son

Just in case you might running with previous version source code, please update the package with "git pull" command as below


$ cd ~/robotis_ws/src/open_manipulator

$ git pull       ---> if you have modified the source code, you may get some error. You can undo your changes with "git checkout -- ." command.

$ cd ~/robotis_ws

$ colcon build --symlink-install


Then, try updated eManual commands.

https://emanual.robotis.com/docs/en/platform/openmanipulator_x/ros2_controller_package/#ros-2-controller-package


Thank you.

2020-07-03 13:58:24
willson
Reply
웹에디터 시작 웹 에디터 끝