Robotics StackExchange | Archived questions

Problems implementing KevinO's ROS Hexapod Stack on PhantomX

Hello Everyone,

I am trying to implement KevinO's ROS Hexapod Stack on my Linux machine which has Ubuntu 16.04 and ROS Kinetic running. The stack has successfully build. I am using the PhantomX Hexapod Mark-III equipped with an Arbotix-M Robocontroller to control all 18 servos (Dynamixel AX-18A) and Arbotix Commander or it's Virtual Commander to send commands to ArbotiX-M board.

I had also added to the hexapodros-master/hexapoddescription/params/phantomX.yaml file:

port: /dev/ttyUSB0
read_rate: 15
write_rate: 25

This is because the port /dev/ttyUSB0 is where the FTDI Cable is attached on my Linux machine, the other end of which is connected to the arbotix-m board. The Arbotix-M board has the Commander Crawler code uploaded on it. In this configuration the hexapod is able to walk using the Virtual Commander. When I launch the hexapodfull.launch in the hexaporos stack in terminal using the command:

roslaunch hexapodbringup hexapodfull.launch config:=phantomX joymapping:=joystickds3

Then the Rviz simulation of the hexapod is launched automatically. On walking the PhantomX hexapod using the Virtual Commander in real life, the hexapod in rviz simulation does not move.

Below the output in the terminal can be seen:

hexapod_bringup hexapod_full.launch config:=phantomX joy_mapping:=joystick_ds3


SUMMARY
========

CLEAR PARAMETERS
 * /ekf_localization/

PARAMETERS
 * /ALARM_LED: 17
 * /ALARM_SHUTDOWN: 18
 * /AX_CCW_COMPLIANCE_MARGIN: 27
 * /AX_CCW_COMPLIANCE_SLOPE: 29
 * /AX_CW_COMPLIANCE_MARGIN: 26
 * /AX_CW_COMPLIANCE_SLOPE: 28
 * /BAUD_RATE: 4
 * /BODY_MAX_PITCH: 0.13962634016
 * /BODY_MAX_ROLL: 0.13962634016
 * /BODY_ROTATION_BUTTON: 8
 * /CCW_ANGLE_LIMIT_H: 9
 * /CCW_ANGLE_LIMIT_L: 8
 * /COMPENSATE_INCREMENT: 0.000174532925199
 * /COMPENSATE_TO_WITHIN: 0.0174532925199
    etc

NODES
  /camera/
    camera_nodelet_manager (nodelet/nodelet)
    depth_metric (nodelet/nodelet)
    depth_metric_rect (nodelet/nodelet)
    depth_points (nodelet/nodelet)
    depth_rectify_depth (nodelet/nodelet)
    depth_registered_sw_metric_rect (nodelet/nodelet)
    driver (nodelet/nodelet)
    points_xyzrgb_sw_registered (nodelet/nodelet)
    register_depth_rgb (nodelet/nodelet)
    rgb_rectify_color (nodelet/nodelet)
  /rtabmap/
    data_odom_sync (nodelet/nodelet)
    rtabmap (rtabmap_ros/rtabmap)
    standalone_nodelet (nodelet/nodelet)
  /
    Hexapod_Controller (hexapod_controller/hexapod_controller)
    Hexapod_Sounds (hexapod_sound/hexapod_sound)
    Hexapod_Teleop_Joystick (hexapod_teleop_joystick/hexapod_teleop_joystick)
    ImuFilterNodelet (nodelet/nodelet)
    PhidgetsImuNodelet (nodelet/nodelet)
    Sound_Play (sound_play/soundplay_node.py)
    depthimage_to_laserscan (nodelet/nodelet)
    ekf_localization (robot_localization/ekf_localization_node)
    imu_manager (nodelet/nodelet)
    ps4 (ps4_ros/ps4_ros)
    ps4_joy (joy/joy_node)
    robot_state_publisher (robot_state_publisher/state_publisher)
    rviz (rviz/rviz)

auto-starting new master
process[master]: started with pid [5114]
ROS_MASTER_URI=http://134.61.134.226:11311

setting /run_id to a0f47d5a-f417-11e9-bdf4-5800e3d73299
process[rosout-1]: started with pid [5127]
started core service [/rosout]
process[Sound_Play-2]: started with pid [5131]
process[Hexapod_Sounds-3]: started with pid [5132]
process[ps4_joy-4]: started with pid [5133]
ERROR: cannot launch node of type [ps4_ros/ps4_ros]: ps4_ros
ROS path [0]=/opt/ros/kinetic/share/ros
ROS path [1]=/home/taher-rangwala/hexapod_node/src
ROS path [2]=/opt/ros/kinetic/share
[ERROR] [1571671805.634916774]: Couldn't open joystick /dev/input/js1. Will retry every second.
process[Hexapod_Teleop_Joystick-6]: started with pid [5179]
process[Hexapod_Controller-7]: started with pid [5180]
process[robot_state_publisher-8]: started with pid [5228]
process[rviz-9]: started with pid [5229]
process[imu_manager-10]: started with pid [5230]
process[PhidgetsImuNodelet-11]: started with pid [5231]
process[ImuFilterNodelet-12]: started with pid [5232]
process[ekf_localization-13]: started with pid [5235]
process[camera/camera_nodelet_manager-14]: started with pid [5245]
process[camera/driver-15]: started with pid [5246]
process[camera/rgb_rectify_color-16]: started with pid [5247]
process[camera/depth_rectify_depth-17]: started with pid [5248]
process[camera/depth_metric_rect-18]: started with pid [5249]
process[camera/depth_metric-19]: started with pid [5250]
process[camera/depth_points-20]: started with pid [5251]
process[camera/register_depth_rgb-21]: started with pid [5252]
process[camera/points_xyzrgb_sw_registered-22]: started with pid [5253]
process[camera/depth_registered_sw_metric_rect-23]: started with pid [5254]
process[depthimage_to_laserscan-24]: started with pid [5255]
process[rtabmap/standalone_nodelet-25]: started with pid [5256]
process[rtabmap/data_odom_sync-26]: started with pid [5257]
process[rtabmap/rtabmap-27]: started with pid [5258]
[ INFO] [1571671806.821390388]: Succeeded to open the port!
[ INFO] [1571671806.821572554]: Succeeded to change the baudrate!
[ INFO] [1571671811.500320434]: Initializing nodelet with 4 worker threads.
[ERROR] [1571671815.259268662]: Failed to load nodelet [/PhidgetsImuNodelet] of type [phidgets_imu/PhidgetsImuNodelet] even after refreshing the cache: According to the loaded plugin descriptions the class phidgets_imu/PhidgetsImuNodelet with base class type nodelet::Nodelet does not exist. Declared types are  SlamGMappingNodelet depth_image_proc/convert_metric depth_image_proc/crop_foremost depth_image_proc/disparity depth_image_proc/point_cloud_xyz depth_image_proc/point_cloud_xyz_radial depth_image_proc/point_cloud_xyzi depth_image_proc/point_cloud_xyzi_radial depth_image_proc/point_cloud_xyzrgb depth_image_proc/register depthimage_to_laserscan/DepthImageToLaserScanNodelet hexapod_sound/hexapod_sound hexapod_teleop_joystick/hexapod_teleop_joystick image_proc/crop_decimate image_proc/crop_nonZero image_proc/crop_non_zero image_proc/debayer image_proc/rectify image_proc/resize image_publisher/image_publisher image_rotate/image_rotate image_view/disparity image_view/image imu_filter_madgwick/ImuFilterNodelet nodelet_tutorial_math/Plus openni2_camera/OpenNI2DriverNodelet pcl/BAGReader pcl/BoundaryEstimation pcl/ConvexHull2D pcl/CropBox pcl/EuclideanClusterExtraction pcl/ExtractIndices pcl/ExtractPolygonalPrismData pcl/FPFHEstimation pcl/FPFHEstimationOMP pcl/MomentInvariantsEstimation pcl/MovingLeastSquares pcl/NodeletDEMUX pcl/NodeletMUX pcl/NormalEstimation pcl/NormalEstimationOMP pcl/NormalEstimationTBB pcl/PCDReader pcl/PCDWriter pcl/PFHEstimation pcl/PassThrough pcl/PointCloudConcatenateDataSynchronizer pcl/PointCloudConcatenateFieldsSynchronizer pcl/PrincipalCurvaturesEstimation pcl/ProjectInliers pcl/RadiusOutlierRemoval pcl/SACSegmentation pcl/SACSegmentationFromNormals pcl/SHOTEstimation pcl/SHOTEstimationOMP pcl/SegmentDifferences pcl/StatisticalOutlierRemoval pcl/VFHEstimation pcl/VoxelGrid rtabmap_ros/data_odom_sync rtabmap_ros/data_throttle rtabmap_ros/disparity_to_depth rtabmap_ros/icp_odometry rtabmap_ros/imu_to_tf rtabmap_ros/obstacles_detection rtabmap_ros/obstacles_detection_old rtabmap_ros/point_cloud_aggregator rtabmap_ros/point_cloud_assembler rtabmap_ros/point_cloud_xyz rtabmap_ros/point_cloud_xyzrgb rtabmap_ros/pointcloud_to_depthimage rtabmap_ros/rgbd_odometry rtabmap_ros/rgbd_relay rtabmap_ros/rgbd_sync rtabmap_ros/rgbdicp_odometry rtabmap_ros/rtabmap rtabmap_ros/stereo_odometry rtabmap_ros/stereo_sync rtabmap_ros/stereo_throttle rtabmap_ros/undistort_depth stereo_image_proc/disparity stereo_image_proc/point_cloud2
[ERROR] [1571671815.259360456]: The error before refreshing the cache was: According to the loaded plugin descriptions the class phidgets_imu/PhidgetsImuNodelet with base class type nodelet::Nodelet does not exist. Declared types are  SlamGMappingNodelet depth_image_proc/convert_metric depth_image_proc/crop_foremost depth_image_proc/disparity depth_image_proc/point_cloud_xyz depth_image_proc/point_cloud_xyz_radial depth_image_proc/point_cloud_xyzi depth_image_proc/point_cloud_xyzi_radial depth_image_proc/point_cloud_xyzrgb depth_image_proc/register depthimage_to_laserscan/DepthImageToLaserScanNodelet hexapod_sound/hexapod_sound hexapod_teleop_joystick/hexapod_teleop_joystick image_proc/crop_decimate image_proc/crop_nonZero image_proc/crop_non_zero image_proc/debayer image_proc/rectify image_proc/resize image_publisher/image_publisher image_rotate/image_rotate image_view/disparity image_view/image imu_filter_madgwick/ImuFilterNodelet nodelet_tutorial_math/Plus openni2_camera/OpenNI2DriverNodelet pcl/BAGReader pcl/BoundaryEstimation pcl/ConvexHull2D pcl/CropBox pcl/EuclideanClusterExtraction pcl/ExtractIndices pcl/ExtractPolygonalPrismData pcl/FPFHEstimation pcl/FPFHEstimationOMP pcl/MomentInvariantsEstimation pcl/MovingLeastSquares pcl/NodeletDEMUX pcl/NodeletMUX pcl/NormalEstimation pcl/NormalEstimationOMP pcl/NormalEstimationTBB pcl/PCDReader pcl/PCDWriter pcl/PFHEstimation pcl/PassThrough pcl/PointCloudConcatenateDataSynchronizer pcl/PointCloudConcatenateFieldsSynchronizer pcl/PrincipalCurvaturesEstimation pcl/ProjectInliers pcl/RadiusOutlierRemoval pcl/SACSegmentation pcl/SACSegmentationFromNormals pcl/SHOTEstimation pcl/SHOTEstimationOMP pcl/SegmentDifferences pcl/StatisticalOutlierRemoval pcl/VFHEstimation pcl/VoxelGrid rtabmap_ros/data_odom_sync rtabmap_ros/data_throttle rtabmap_ros/disparity_to_depth rtabmap_ros/icp_odometry rtabmap_ros/imu_to_tf rtabmap_ros/obstacles_detection rtabmap_ros/obstacles_detection_old rtabmap_ros/point_cloud_aggregator rtabmap_ros/point_cloud_assembler rtabmap_ros/point_cloud_xyz rtabmap_ros/point_cloud_xyzrgb rtabmap_ros/pointcloud_to_depthimage rtabmap_ros/rgbd_odometry rtabmap_ros/rgbd_relay rtabmap_ros/rgbd_sync rtabmap_ros/rgbdicp_odometry rtabmap_ros/rtabmap rtabmap_ros/stereo_odometry rtabmap_ros/stereo_sync rtabmap_ros/stereo_throttle rtabmap_ros/undistort_depth stereo_image_proc/disparity stereo_image_proc/point_cloud2
[FATAL] [1571671815.259623635]: Failed to load nodelet '/PhidgetsImuNodelet` of type `phidgets_imu/PhidgetsImuNodelet` to manager `imu_manager'
[ INFO] [1571671815.356545945]: No matching device found.... waiting for devices. Reason: std::__cxx11::string openni2_wrapper::OpenNI2Driver::resolveDeviceURI(const string&) @ /tmp/binarydeb/ros-kinetic-openni2-camera-0.4.2/src/openni2_driver.cpp @ 737 : Invalid device number 1, there are 0 devices connected.
[PhidgetsImuNodelet-11] process has died [pid 5231, exit code 255, cmd /opt/ros/kinetic/lib/nodelet/nodelet load phidgets_imu/PhidgetsImuNodelet imu_manager __name:=PhidgetsImuNodelet __log:=/home/taher-rangwala/.ros/log/a0f47d5a-f417-11e9-bdf4-5800e3d73299/PhidgetsImuNodelet-11.log].
log file: /home/taher-rangwala/.ros/log/a0f47d5a-f417-11e9-bdf4-5800e3d73299/PhidgetsImuNodelet-11*.log
[ERROR] [1571671817.923154556]: Rtabmap: Parameter "LccBow/InlierDistance" doesn't exist anymore! You may look at this similar parameter: "Vis/InlierDistance"
[ERROR] [1571671817.926475077]: Rtabmap: Parameter "LccBow/MinInliers" doesn't exist anymore! You may look at this similar parameter: "Vis/MinInliers"
[ERROR] [1571671817.935595331]: Rtabmap: Parameter "LccIcp/Type" doesn't exist anymore! You may look at this similar parameter: "Reg/Strategy"
[ INFO] [1571671818.356811122]: No matching device found.... waiting for devices. Reason: std::__cxx11::string openni2_wrapper::OpenNI2Driver::resolveDeviceURI(const string&) @ /tmp/binarydeb/ros-kinetic-openni2-camera-0.4.2/src/openni2_driver.cpp @ 737 : Invalid device number 1, there are 0 devices connected.

A screenshot of the RVIZ simulation is below:

https://i.postimg.cc/qMVn2rvc/Hexapod-Rviz.png

As is apparent from the screenshot that the RobotModel topic only shows errors for the transforms between Camera link and head frame, hence the Simulated Hexapod should be connected with the real one, but this is not the case. Is their anything I am doing wrong?

For your information the output of env | grep ROS is:

ROS_ROOT=/opt/ros/kinetic/share/ros
ROS_PACKAGE_PATH=/home/taher-rangwala/testkin1_ws:/opt/ros/kinetic/share
ROS_MASTER_URI=http://134.61.134.226:11311
ROS_VERSION=1
ROS_HOSTNAME=134.61.134.226
ROSLISP_PACKAGE_DIRECTORIES=
ROS_DISTRO=kinetic
ROS_LANG_DISABLE=genlisp:geneus:gennodejs
ROS_IP=134.61.134.226
ROS_ETC_DIR=/opt/ros/kinetic/etc/ros

I am happy to provide any other information, thanks in advance.

Asked by Rangwala on 2019-10-21 15:56:14 UTC

Comments

Answers