Merge pull request #19 from RonaldsonBellande/main

Latest fixes
This commit is contained in:
Ronaldson Bellande 2024-01-11 20:36:25 -05:00 committed by GitHub
commit 2627e55c80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 56 additions and 41 deletions

View File

@ -1,25 +1,25 @@
<?xml version="1.0"?>
<launch>
<!-- humanoid_robot_intelligence_control_system humanoid_robot_intelligence_control_system manager -->
<include file="$(find humanoid_robot_intelligence_control_system_manager)/launch/humanoid_robot_intelligence_control_system_manager.launch" />
<include
file="$(find humanoid_robot_intelligence_control_system_manager)/launch/humanoid_robot_intelligence_control_system_manager.launch" />
<!-- Camera and Ball detector -->
<include file="$(find humanoid_robot_intelligence_control_system_ball_detector)/launch/ball_detector_from_usb_cam.launch" />
<!-- face tracking -->
<!-- <include file="$(find humanoid_robot_intelligence_control_system_demo)/launch/face_detection_humanoid_robot_intelligence_control_system.launch" /> -->
<include
file="$(find humanoid_robot_intelligence_control_system_ball_detector)/launch/ball_detector_from_usb_cam.launch" />
<!-- camera setting tool -->
<include file="$(find humanoid_robot_intelligence_control_system_camera_setting_tool)/launch/humanoid_robot_intelligence_control_system_camera_setting_tool.launch" />
<include
file="$(find humanoid_robot_intelligence_control_system_camera_setting_tool)/launch/humanoid_robot_intelligence_control_system_camera_setting_tool.launch" />
<!-- sound player -->
<node pkg="ros_madplay_player" type="ros_madplay_player" name="ros_madplay_player" output="screen" />
<!-- web setting -->
<include file="$(find humanoid_robot_intelligence_control_system_web_setting_tool)/launch/web_setting_server.launch" />
<node pkg="humanoid_robot_intelligence_control_system_player"
type="humanoid_robot_intelligence_control_system_player"
name="humanoid_robot_intelligence_control_system_player" output="screen" />
<!-- humanoid_robot_intelligence_control_system humanoid_robot_intelligence_control_system demo -->
<node pkg="humanoid_robot_intelligence_control_system_demo" type="op_demo_node" name="humanoid_robot_intelligence_control_system_demo" output="screen">
<node pkg="humanoid_robot_intelligence_control_system_demo" type="op_demo_node"
name="humanoid_robot_intelligence_control_system_demo" output="screen">
<param name="grass_demo" type="bool" value="False" />
<param name="p_gain" value="0.45" />
<param name="d_gain" value="0.045" />

View File

@ -1,16 +1,23 @@
<?xml version="1.0"?>
<launch>
<arg name="face_cascade_name_0" default="$(find face_detection)/include/face_detection/HaarCascades/haarcascade_frontalface_alt.xml" />
<arg name="face_cascade_name_1" default="$(find face_detection)/include/face_detection//HaarCascades/haarcascade_frontalface_alt2.xml" />
<arg name="face_cascade_name_2" default="$(find face_detection)/include/face_detection//HaarCascades/haarcascade_frontalface_alt_tree.xml" />
<arg name="face_cascade_name_3" default="$(find face_detection)/include/face_detection//HaarCascades/haarcascade_frontalface_default.xml" />
<arg name="face_cascade_name_4" default="$(find face_detection)/include/face_detection/lbpCascades/lbpcascade_frontalface.xml" />
<arg name="face_cascade_name_0"
default="$(find face_detection)/include/face_detection/HaarCascades/haarcascade_frontalface_alt.xml" />
<arg name="face_cascade_name_1"
default="$(find face_detection)/include/face_detection//HaarCascades/haarcascade_frontalface_alt2.xml" />
<arg name="face_cascade_name_2"
default="$(find face_detection)/include/face_detection//HaarCascades/haarcascade_frontalface_alt_tree.xml" />
<arg name="face_cascade_name_3"
default="$(find face_detection)/include/face_detection//HaarCascades/haarcascade_frontalface_default.xml" />
<arg name="face_cascade_name_4"
default="$(find face_detection)/include/face_detection/lbpCascades/lbpcascade_frontalface.xml" />
<node pkg="face_detection" type="face_tracking" name="face_tracking" args="$(arg face_cascade_name_0)
<node pkg="face_detection" type="face_tracking" name="face_tracking"
args="$(arg face_cascade_name_0)
$(arg face_cascade_name_1)
$(arg face_cascade_name_2)
$(arg face_cascade_name_3)
$(arg face_cascade_name_4)" output="screen">
$(arg face_cascade_name_4)"
output="screen">
<param name="imageInput" type="string" value="/usb_cam_node/image_raw" />
<param name="displayed_Image" type="int" value="0" />

View File

@ -2,25 +2,26 @@
<!-- Launches an UVC camera, the ball detector and its visualization -->
<launch>
<!-- humanoid_robot_intelligence_control_system humanoid_robot_intelligence_control_system manager -->
<include file="$(find humanoid_robot_intelligence_control_system_manager)/launch/humanoid_robot_intelligence_control_system_manager.launch" />
<include
file="$(find humanoid_robot_intelligence_control_system_manager)/launch/humanoid_robot_intelligence_control_system_manager.launch" />
<!-- Camera and Ball detector -->
<include file="$(find humanoid_robot_intelligence_control_system_ball_detector)/launch/ball_detector_from_usb_cam.launch" />
<!-- face tracking -->
<include file="$(find humanoid_robot_intelligence_control_system_demo)/launch/face_detection_humanoid_robot_intelligence_control_system.launch" />
<include
file="$(find humanoid_robot_intelligence_control_system_ball_detector)/launch/ball_detector_from_usb_cam.launch" />
<!-- camera setting tool -->
<include file="$(find humanoid_robot_intelligence_control_system_camera_setting_tool)/launch/humanoid_robot_intelligence_control_system_camera_setting_tool.launch" />
<include
file="$(find humanoid_robot_intelligence_control_system_camera_setting_tool)/launch/humanoid_robot_intelligence_control_system_camera_setting_tool.launch" />
<!-- sound player -->
<node pkg="ros_madplay_player" type="ros_madplay_player" name="ros_madplay_player" output="screen" />
<node pkg="humanoid_robot_intelligence_control_system_player"
type="humanoid_robot_intelligence_control_system_player"
name="humanoid_robot_intelligence_control_system_player" output="screen" />
<!-- web setting -->
<include file="$(find humanoid_robot_intelligence_control_system_web_setting_tool)/launch/web_setting_server.launch" />
<!-- humanoid_robot_intelligence_control_system humanoid_robot_intelligence_control_system self test demo -->
<node pkg="humanoid_robot_intelligence_control_system_demo" type="self_test_node" name="humanoid_robot_intelligence_control_system_self_test" output="screen">
<!-- humanoid_robot_intelligence_control_system humanoid_robot_intelligence_control_system self
test demo -->
<node pkg="humanoid_robot_intelligence_control_system_demo" type="self_test_node"
name="humanoid_robot_intelligence_control_system_self_test" output="screen">
<param name="grass_demo" type="bool" value="False" />
<param name="p_gain" value="0.45" />
<param name="d_gain" value="0.045" />

View File

@ -71,20 +71,25 @@ int main(int argc, char **argv) {
ros::NodeHandle nh(ros::this_node::getName());
init_pose_pub =
nh.advertise<std_msgs::String>("/humanoid_robot_intelligence_control_system/base/ini_pose", 0);
init_pose_pub = nh.advertise<std_msgs::String>(
"/humanoid_robot_intelligence_control_system/base/ini_pose", 0);
play_sound_pub = nh.advertise<std_msgs::String>("/play_sound_file", 0);
led_pub = nh.advertise<humanoid_robot_intelligence_control_system_controller_msgs::SyncWriteItem>(
"/humanoid_robot_intelligence_control_system/sync_write_item", 0);
dxl_torque_pub =
nh.advertise<std_msgs::String>("/humanoid_robot_intelligence_control_system/dxl_torque", 0);
led_pub =
nh.advertise<humanoid_robot_intelligence_control_system_controller_msgs::
SyncWriteItem>(
"/humanoid_robot_intelligence_control_system/sync_write_item", 0);
dxl_torque_pub = nh.advertise<std_msgs::String>(
"/humanoid_robot_intelligence_control_system/dxl_torque", 0);
ros::Subscriber buttuon_sub =
nh.subscribe("/humanoid_robot_intelligence_control_system/open_cr/button", 1, buttonHandlerCallback);
nh.subscribe("/humanoid_robot_intelligence_control_system/open_cr/button",
1, buttonHandlerCallback);
ros::Subscriber mode_command_sub =
nh.subscribe("/humanoid_robot_intelligence_control_system/mode_command", 1, demoModeCommandCallback);
nh.subscribe("/humanoid_robot_intelligence_control_system/mode_command",
1, demoModeCommandCallback);
default_mp3_path =
ros::package::getPath("humanoid_robot_intelligence_control_system_demo") + "/data/mp3/";
ros::package::getPath("humanoid_robot_intelligence_control_system_demo") +
"/data/mp3/";
ros::start();
@ -92,7 +97,8 @@ int main(int argc, char **argv) {
ros::Rate loop_rate(SPIN_RATE);
// wait for starting of manager
std::string manager_name = "/humanoid_robot_intelligence_control_system_manager";
std::string manager_name =
"/humanoid_robot_intelligence_control_system_manager";
while (ros::ok()) {
ros::Duration(1.0).sleep();
@ -272,7 +278,8 @@ void playSound(const std::string &path) {
}
void setLED(int led) {
humanoid_robot_intelligence_control_system_controller_msgs::SyncWriteItem syncwrite_msg;
humanoid_robot_intelligence_control_system_controller_msgs::SyncWriteItem
syncwrite_msg;
syncwrite_msg.item_name = "LED";
syncwrite_msg.joint_name.push_back("open-cr");
syncwrite_msg.value.push_back(led);