Skip to content

solo12_hardware

ajordana edited this page Aug 1, 2022 · 25 revisions

Launching the hardware

Clone the required repositories and build them

$ git clone git@github.com:machines-in-motion/treep_machines_in_motion.git
$ treep --clone DG_SOLO
$ cd workspace

$ source /opt/ros/dashing/setup.bash
$ source /opt/openrobots/setup.bash

$ colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release -DPYBIND11_TEST=OFF -DBUILD_TESTING=OFF

$ source install/setup.bash

To launch the dgm on solo12 you need to be root. This is as the master-board-sdk requires root access for RAW network traffic. You can switch to root on your terminal using

$ sudo -s
$ source /opt/ros/dashing/setup.bash
$ source /opt/openrobots/setup.bash
$ source install/setup.bash

From the root terminal, launch dynamic graph manager for solo12 by running either of the following commands:

# For the setup in New York
$ ros2 run solo dg_main_solo12 dgm_parameters_solo12_nyu.yaml

# For the setup at MPI.
$ ros2 run solo dg_main_solo12 dgm_parameters_solo12_mpi.yaml

To start the dynamic graph process, source the setup.bash scripts in a different terminal and run

$ ros2 service call /dynamic_graph_manager/start_dynamic_graph  std_srvs/srv/Empty

To run the calibration on the robot, execute in the root terminal

$ ros2 service call /dynamic_graph_manager/calibrate_joint_position mim_msgs/srv/JointCalibration

To load a python script on the control process, run

$ ros2 run dynamic_graph_manager remote_python_client <your_script>.py 

Note: The current working directory of the python process is specify by the folder you launched the dg_main_solo12 application in.

Configuration of the setup

The joint offsets used in the calibration step and the name of the network interface to connect with the robot are specified in the package robot_properties_solo. More specifically, you have to edit the file

robot_properties_solo/src/robot_properties_solo/robot_properties_solo/dynamic_graph_manager/dgm_parameters_solo12.yaml

The interface name for communicating with the robot is specified in hardware_communication/network_id. The calibration offsets are specified in hardware_communication/calibration/index_to_zero_angle.

You can list the interfaces on your computer using ifconfig -s.

Calibrating the solo12 robot

The steps to update the calibration are as follows:

  • Put the robot close to zero position

  • Power the robot on

  • Launch the solo12_hardware_calibration example like ./install/solo/lib/solo/solo12_hardware_calibration enp5s0f1 from a root terminal. This assumes the network communicating with the robot is enp5s0f1 and that you are in the workspace folder

  • Press Enter to start the calibration

  • The robot might not be properly calibrated. Move the legs into the zero position. You might use the calibration tools for this

  • From the console output, take the entries from the zero_joint_pos corresponding to the joint you just calibrated

  • Put these values in the src/robot_properties_solo/src/robot_properties_solo/robot_properties_solo/dynamic_graph_manager/dgm_parameters_solo12.yaml and put the values in the index_to_zero_angle entry. This assumes you are in the workspace folder

  • Recompile your workspace

Your robot is now calibrated.

Clone this wiki locally