Skip to content

Commit

Permalink
Merge pull request #19 from RonaldsonBellande/main
Browse files Browse the repository at this point in the history
Latest fixes
  • Loading branch information
RonaldsonBellande authored Jan 12, 2024
2 parents 6ffe8ae + ec1a986 commit 2627e55
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 41 deletions.
22 changes: 11 additions & 11 deletions humanoid_robot_intelligence_control_system_demo/launch/demo.launch
Original file line number Diff line number Diff line change
@@ -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" />
Expand Down
Original file line number Diff line number Diff line change
@@ -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" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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" />

<!-- 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 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" />
Expand Down
29 changes: 18 additions & 11 deletions humanoid_robot_intelligence_control_system_demo/src/demo_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,28 +71,34 @@ 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();

// set node loop rate
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();

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 2627e55

Please sign in to comment.