ADVRHumanoids / pino_fhi

FhI PINO documentation and examples
GNU General Public License v3.0
1 stars 0 forks source link

Generate Model #2

Closed gabri-v closed 2 years ago

gabri-v commented 2 years ago

Hello.

I tried to reconfigure the robot and follow the procedures to create all the files needed to execute the modular robot.

When I open a web browser on pilot PC, connect to the pino-embedded machine 10.24.11.100:5000 and click on the "Generate Model" button the model does not appear and the and the message "Loading..." remains on the screen

These are the steps I took:

  1. from a pilot PC, ssh to the FhI Pino Embedded machine.
ssh pino@10.24.11.100
  1. start the EtherCAT master
ecat_master

Thi is the output (I tried with only one straight joint module)

pino@pino-embedded:~$ ecat_master
Build timestamp 2022-04-21T14:24:28
Git short hash 
Using /home/pino/src/fhi_ws/src/pino_fhi/config/ecat_master/ecat_config.yaml as config file
 .... open /proc/xenomai/registry/rtipc/xddp/repl_in
 .... open /proc/xenomai/registry/rtipc/xddp/repl_out
 .... open /proc/xenomai/registry/rtipc/xddp/repl_info
 .... open /proc/xenomai/registry/rtipc/xddp/emergency
invalid node; this may result from using a map iterator as a sequence iterator, or vice-versa
[ZMQ_rep] invalid node; this may result from using a map iterator as a sequence iterator, or vice-versa
th_init run_mode
[ECat_master] Using rteth0
[ZMQ_rep] bind to tcp://*:5555, zmq_rcvtimeo_ms 500
[ZMQ_rep] Opening xddp /proc/xenomai/registry/rtipc/xddp/repl_in
[ZMQ_rep] Opening xddp /proc/xenomai/registry/rtipc/xddp/repl_out
non_periodic_thread ZMQ_rep, period 1 us
non_periodic_thread ZMQ_rep : start looping ...
[ECat_master] POWER ON slaves.
[ECat_master] 2 EtherCAT slaves identified.
[ECat_master] Request 0x02 state for all slaves
 Man: 00000298 ID: 00000100 Rev: 00000001
 Man: 00000298 ID: 00000015 Rev: 00000001
>> factory 298 id 0x0100 EC_hub : conf_addr 1001 pos 1 rev 1 alias 0
    support DC 1
    topology 2 port act 5
    Ibytes 0 Obytes 0
Ctor pos 1 id -1
>> factory 298 id 0x0015 Cent_Motor : conf_addr 1002 pos 2 rev 1 alias 0
    support DC 1
    topology 1 port act 1
    Ibytes 28 Obytes 28
    Using config CentAcESC_X
    [PDO_aux] pdo_auxes_map size is 0
 .... open /proc/xenomai/registry/rtipc/xddp/NoNe@Motor_id_22
 .... open /proc/xenomai/registry/rtipc/iddp/NoNe@Motor_id_22_rx_pdo
init_transport protoType 0
*** Slave 2 hw_config_high >> SDO read fail : Time:     115.796 SDO slave:2 index:8000.1f error:06090011 Subindex does not exist

Catch Exception in virtual int iit::ecat::CentAcESC::init(const YAML::Node&) ... EC_Wrp_Error 7:EC_WRP_SDO_READ_FAIL hw_config_high
Ctor pos 2 id 22
    Joint serial# 401   Joint robot id 22   HW conf 0x6216
    min pos -2.795593   max pos 2.788407
    fw_ver m3 21110911  c28 21072018
>>find_root id -1
found 0 powF28M36s
found 1 motors
found 0 fts
found 0 ftsMsp
found 0 foot_10x5
found 0 skin_8x3
found 0 tests
[ECat_master] Configure DC 1000000 300000000
[ECat_master] Request 0x04 state for all slaves
[ECat_master] pdo warm up ...
[ECat_master] Request 0x08 state for all slaves
Slave 2 State=0x04 StatusCode=0x0000 : No error... reach State=0x08
[ECat_master] Request 0x08 state for all slaves
[ECat_master] Calculated workcounter 3
[ECat_master] ec_DCtime 3348282611833342480
[ECat_master] o: 28   i: 28
[ECat_master] Start ecat_thread 1000000 ns
non_periodic_thread EC_boards_repl, period 1 us
non_periodic_thread EC_boards_repl : start looping ...
th_init run_mode
[0MQ Pub] publisher bind to tcp://*:10000
[0MQ Pub] publishing with id repl_info
[0MQ Pub] Opening xddp_socket /proc/xenomai/registry/rtipc/xddp/repl_info
[0MQ Pub] publisher bind to tcp://*:9022
[0MQ Pub] publishing with id NoNe@Motor_id_22
[0MQ Pub] Opening xddp_socket /proc/xenomai/registry/rtipc/xddp/NoNe@Motor_id_22
non_periodic_thread ZMQ_Pub_thread, period 1 us
non_periodic_thread ZMQ_Pub_thread : start looping ...
  1. In another terminal (ssh to FhI Pino Embedded machine):
RobotBuilder

This is the output:

pino@pino-embedded:~$ RobotBuilder
 * Serving Flask app "RobotDesignStudio" (lazy loading)
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: off
  1. From the pilot PC open a web browser and connect to the pino-embedded machine 10.24.11.100:5000

These are steps that I had already successfully performed before so I don't know what the problem could be.

Thanks for your help.

EdoardoRomiti commented 2 years ago

Hi @gabri-v this could be the ROS setup or anyway some problem with the communication usually. Can you check that you can correctly call the ROS service ec_client/get_slaves_description (which we use to get information about the EtherCAT slaves that are connected)? By calling the service from another terminal, you should be able to see some response like this: image

And in the terminal where you started the EtherCAT master you should see some feedback like: image

If this doesen't happen then probably some network/ROS setting has been changed, and the RobotBuilder client is stuck waiting for this service to reply. Is this the case?

gabri-v commented 2 years ago

Yes, it's a problem with ROS service, if I call rosservice list I can't see the /ec_client service, this is the output:

Screenshot from 2022-05-11 07-59-12

liesrock commented 2 years ago

Thanks @gabri-v : That’s strange, there should be other active services.

Did you try to reboot the machine?

gabri-v commented 2 years ago

Yes, both master and slave, but I have the same problem

liesrock commented 2 years ago

Ok, let's try to have a TeamViewer session on your pilot pc if you are available: we can have a call to organize it, please drop me an email at luca.muratore@iit.it

liesrock commented 2 years ago

The issue seems the following:

systemctl --user status ec-client.service 
● ec-client.service - ec_client_main
     Loaded: loaded (/home/pino/.config/systemd/user/ec-client.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Wed 2022-05-11 09:11:25 CEST; 2s ago
    Process: 19247 ExecStart=/bin/bash -ic source /home/pino/.bashrc; ec_client_main (code=exited, status=127)
   Main PID: 19247 (code=exited, status=127)

mag 11 09:11:24 pino-embedded systemd[14650]: Started ec_client_main.
mag 11 09:11:24 pino-embedded bash[19247]: bash: cannot set terminal process group (-1): Inappropriate ioctl for device
mag 11 09:11:24 pino-embedded bash[19247]: bash: no job control in this shell
mag 11 09:11:25 pino-embedded systemd[14650]: ec-client.service: Main process exited, code=exited, status=127/n/a
mag 11 09:11:25 pino-embedded systemd[14650]: ec-client.service: Failed with result 'exit-code'.

fyi @alaurenzi

liesrock commented 2 years ago

Similar issue for xbot2-launcher:

systemctl --user status xbot2-launcher.service 
● xbot2-launcher.service - XBot2 Launcher Daemon
     Loaded: loaded (/home/pino/.config/systemd/user/xbot2-launcher.service; enabled; vendor preset: enabled)
     Active: active (running) since Wed 2022-05-11 09:12:42 CEST; 449ms ago
   Main PID: 24071 (bash)
     CGroup: /user.slice/user-1000.slice/user@1000.service/xbot2-launcher.service
             ├─24071 /bin/bash -ic source /home/pino/.bashrc; stdbuf -oL xbot2-launcher &> /tmp/xbot2-launcher-output
             ├─24128 bash /opt/ros/noetic/bin/rosrun --prefix echo rosmon_core rosmon
             ├─24129 bash /opt/ros/noetic/bin/rosrun --prefix echo rosmon_core rosmon
             └─24130 /usr/bin/python3 /opt/ros/noetic/bin/catkin_find --without-underlays --libexec --share rosmon_core

mag 11 09:12:42 pino-embedded systemd[14650]: Started XBot2 Launcher Daemon.
mag 11 09:12:42 pino-embedded bash[24071]: bash: cannot set terminal process group (-1): Inappropriate ioctl for device
mag 11 09:12:42 pino-embedded bash[24071]: bash: no job control in this shell
liesrock commented 2 years ago

The above looks more a warning, the issue was related with the sourcing in the .bashrc:

#ROS 
source /opt/ros/noetic/setup.bash

#XBOT2
source /opt/xbot/setup.sh

# ECAT M
source ~/src/fhi_ws/src/pino_fhi/config/setup.sh

# FHI WS
source ~/src/fhi_ws/devel/setup.bash

Something added in the last source was preventing ec_client_main to see xbot libraries.

ec_client_main 
ec_client_main: error while loading shared libraries: libXBotInterface.so.2.1.0: cannot open shared object file: No such file or directory

Investigating in the last source

liesrock commented 2 years ago

Should be solved with:

source ~/src/fhi_ws/devel/setup.bash --extend

Please @gabri-v test it and let me know!

gabri-v commented 2 years ago

Everything work properly. Thank you so much for the support.