Skip to content

Commit

Permalink
Merge branch 'master' into update-output-of-wstool-info
Browse files Browse the repository at this point in the history
  • Loading branch information
kochigami authored Jan 27, 2023
2 parents 8972246 + da1d1dc commit bc4ff19
Show file tree
Hide file tree
Showing 14 changed files with 250 additions and 47 deletions.
1 change: 1 addition & 0 deletions jsk_naoqi_robot/cross/build_user.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ docker run -it --rm \
cp -a ${PWD}/startup_scripts/user_setup.bash ${SOURCE_ROOT}/
cp -a ${PWD}/startup_scripts/start.sh ${SOURCE_ROOT}/
cp -a ${PWD}/startup_scripts/screenrc ${SOURCE_ROOT}/
cp -a ${PWD}/startup_scripts/attach.sh ${SOURCE_ROOT}/

echo "
Expand Down
2 changes: 2 additions & 0 deletions jsk_naoqi_robot/cross/startup_scripts/attach.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
source User/user_setup.bash
screen -c User/screenrc -r
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ display: Meeting
platform: pepper
launch: jsk_pepper_startup/meeting.xml
interface: jsk_pepper_startup/meeting.interface
icon: jsk_pepper_startup/meeting.png
icon: jsk_pepper_startup/meeting.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
3 changes: 0 additions & 3 deletions jsk_naoqi_robot/jsk_pepper_startup/apps/meeting/meeting.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
<launch>
<include file="$(find naoqi_apps)/launch/tablet.launch" />
<include file="$(find naoqi_apps)/launch/basic_awareness.launch" />
<include file="$(find naoqi_apps)/launch/background_movement.launch" />
<node pkg="jsk_pepper_startup" name="meeting"
type="meeting.l" args="'(main)'" />
</launch>
25 changes: 9 additions & 16 deletions jsk_naoqi_robot/jsk_pepper_startup/apps/meeting/scripts/meeting.l
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,10 @@
(defvar *pose6* (list #f(2.0 -2.0 -5.0 110.0 35.0 -40.0 -60.0 -40.0 110.0 -35.0 40.0 60.0 40.0 0.0 15.0) #f(2.0 -2.0 -5.0 110.0 35.0 -40.0 -60.0 -40.0 110.0 -35.0 40.0 60.0 40.0 0.0 15.0) #f(2.0 -2.0 -5.0 85.0 10.0 -70.0 -20.0 -40.0 85.0 -10.0 70.0 20.0 40.0 0.0 0.0)))
(defvar *time6* (list 2000 3000 1000))

;;
;; poses for byebye
(defvar *reset* #f(2.0 -2.0 -5.0 85.0 10.0 -70.0 -20.0 -40.0 85.0 -10.0 70.0 20.0 40.0 0.0 0.0))
(defvar *a* #f(2.0 -2.0 -5.0 0.0 10.0 -100.0 -70.0 60.0 0.0 -10.0 100.0 70.0 -60.0 0.0 0.0))
(defvar *d* #f(2.0 -2.0 -5.0 0.0 10.0 -110.0 -70.0 60.0 0.0 -10.0 110.0 70.0 -60.0 0.0 -10.0))
(defvar *e* #f(2.0 -2.0 -5.0 0.0 10.0 -110.0 -70.0 60.0 0.0 -10.0 110.0 70.0 -60.0 0.0 -10.0))
(defvar *byebye-close* #f(2.0 -2.0 -5.0 0.0 10.0 -100.0 -70.0 60.0 0.0 -10.0 100.0 70.0 -60.0 0.0 0.0))
(defvar *byebye-open* #f(2.0 -2.0 -5.0 0.0 10.0 -110.0 -70.0 60.0 0.0 -10.0 110.0 70.0 -60.0 0.0 -10.0))

(defvar *img-list*
(list
Expand Down Expand Up @@ -86,15 +85,7 @@

(ros::roseus "online-meeting-enhancement-main")

(ros::subscribe "joy" sensor_msgs::Joy
#'(lambda (msg)
(let ((button (send msg :buttons)))
(ros::ros-info "received joy button ~A" button)
(when (eq (elt button 3) 1)
(send *ri* :speak "はい")
(setq *continue* nil)))))

(defun start-func (args)
(defun start-func (&rest args)
(let ()
(setq *last-tm* (ros::time-now))
;;
Expand All @@ -114,14 +105,16 @@
(set-alist 'description "" args)
:started))

(defun end-func (args)
(defun end-func (&rest args)
(let ()
(send *ri* :show-image "golden-saying-by-pepper-7.png")
(send *ri* :set-basic-awareness-enabled nil)
(send *ri* :set-background-movement-enabled nil)
(send *ri* :angle-vector-sequence (list #f(2.0 -2.0 -5.0 85.0 20.0 -70.0 -20.0 -40.0 85.0 -20.0 70.0 20.0 40.0 30.0 -10.0) #f(2.0 -2.0 -5.0 85.0 10.0 -70.0 -20.0 -40.0 85.0 -10.0 70.0 20.0 40.0 0.0 0.0) #f(2.0 -2.0 -5.0 85.0 20.0 -70.0 -20.0 -40.0 85.0 -20.0 70.0 20.0 40.0 -30.0 -10.0) #f(2.0 -2.0 -5.0 85.0 10.0 -70.0 -20.0 -40.0 85.0 -10.0 70.0 20.0 40.0 0.0 0.0)) (list 1000 1000 1000 1000))
(send *ri* :speak "\\vct=120\\\\rspd=80\\みなさん")
(send *ri* :wait-interpolation)

(send *ri* :angle-vector-sequence (list *a* *d* *a* *d* *a* *d* *a* *d* *a* *e* *reset*) (list 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 3000))
(send *ri* :angle-vector-sequence (list *byebye-close* *byebye-open* *byebye-close* *byebye-open* *byebye-close* *byebye-open* *byebye-close* *byebye-open* *byebye-close* *byebye-open* *reset*) (list 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 3000))
(send *ri* :speak "\\vct=120\\\\rspd=80\\おつかれさまでしたッ!\\rspd=100\\")
(send *ri* :wait-interpolation)
(send *ri* :hide-image)
Expand All @@ -130,7 +123,7 @@
(set-alist 'description "End Meeting" args)
:finished))

(defun comment-func (args)
(defun comment-func (&rest args)
(let (count str (wait 600) tm)
;; cleanup description/image
(set-alist 'description "" args)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
<arg name="network_interface" value="$(arg network_interface)"/>
</include>

<!-- Please clone https://github.com/kochigami/naoqi_bridge/tree/kochigami-develop -->
<include file="$(find naoqi_apps)/launch/tablet.launch" />
<include file="$(find naoqi_apps)/launch/basic_awareness.launch" />
<include file="$(find naoqi_apps)/launch/background_movement.launch" />

<node pkg="jsk_pepper_startup" name="take_wakeup_pose" type="take_wakeup_pose.py" if="$(arg autonomous_wakeup)" />

<!-- node to publish compressed image -->
Expand Down
43 changes: 23 additions & 20 deletions jsk_panda_robot/jsk_panda_teleop/package.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<package>
<?xml version="1.0"?>
<package format="3">
<name>jsk_panda_teleop</name>
<version>1.1.0</version>
<description>Teleopration of dual-franka using TouchUSB</description>
Expand All @@ -11,29 +12,31 @@
<buildtool_depend>catkin</buildtool_depend>
<build_depend>message_generation</build_depend>

<run_depend>message_runtime</run_depend>
<run_depend>rospy</run_depend>
<exec_depend>message_runtime</exec_depend>
<exec_depend>rospy</exec_depend>

<run_depend>franka_description</run_depend>
<run_depend>franka_msgs</run_depend>
<run_depend>franka_gripper</run_depend>
<run_depend>franka_control</run_depend>
<run_depend>franka_example_controllers</run_depend>
<run_depend>franka_visualization</run_depend>
<exec_depend>franka_description</exec_depend>
<exec_depend>franka_msgs</exec_depend>
<exec_depend>franka_gripper</exec_depend>
<exec_depend>franka_control</exec_depend>
<exec_depend>franka_example_controllers</exec_depend>
<exec_depend>franka_visualization</exec_depend>

<run_depend>omni_common</run_depend>
<run_depend>omni_msgs</run_depend>
<exec_depend>omni_common</exec_depend>
<exec_depend>omni_msgs</exec_depend>

<run_depend>python-scipy</run_depend>
<run_depend>python-numpy</run_depend>
<run_depend>python-absl-py-pip</run_depend>
<exec_depend condition="$ROS_PYTHON_VERSION == 2">python-scipy</exec_depend>
<exec_depend condition="$ROS_PYTHON_VERSION == 3">python3-scipy</exec_depend>
<exec_depend condition="$ROS_PYTHON_VERSION == 2">python-numpy</exec_depend>
<exec_depend condition="$ROS_PYTHON_VERSION == 3">python3-numpy</exec_depend>
<exec_depend>python-absl-py-pip</exec_depend>

<run_depend>jsk_panda_startup</run_depend>
<run_depend>jsk_teleop_joy</run_depend>
<exec_depend>jsk_panda_startup</exec_depend>
<exec_depend>jsk_teleop_joy</exec_depend>

<run_depend>audio_capture</run_depend>
<run_depend>audio_play</run_depend>
<run_depend>audio_common_msgs</run_depend>
<run_depend>sound_classification</run_depend>
<exec_depend>audio_capture</exec_depend>
<exec_depend>audio_play</exec_depend>
<exec_depend>audio_common_msgs</exec_depend>
<exec_depend>sound_classification</exec_depend>

</package>
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def speak(self, speak_str):
msg.sound = SoundRequest.SAY
msg.command = SoundRequest.PLAY_ONCE
msg.arg = speak_str
msg.volume = 1.0
self.speak_pub.publish(msg)

def restart_service_callback(self, req):
Expand Down Expand Up @@ -76,14 +77,15 @@ def restart_openni_node(self):
# 1. kill nodelet manager
self.speak("something wrong with kinect, I'll restart it, killing nodelet manager")
retcode = subprocess.call('rosnode kill /%s/%s_nodelet_manager' % (self.camera, self.camera), shell=True)
time.sleep(10)
# 2. pkill
self.speak("killing child processes")
retcode = subprocess.call('pkill -f %s_nodelet_manager' % self.camera, shell=True)
time.sleep(10)
# time.sleep(10)
# 2. pkill
# self.speak("killing child processes")
# retcode = subprocess.call('pkill -f %s_nodelet_manager' % self.camera, shell=True)
# time.sleep(10)
# 3 restarting
self.speak("restarting processes")
retcode = subprocess.call('roslaunch openni_launch openni.launch camera:=%s publish_tf:=false depth_registration:=true rgb_processing:=false ir_processing:=false depth_processing:=false depth_registered_processing:=false disparity_processing:=false disparity_registered_processing:=false hw_registered_processing:=true sw_registered_processing:=false rgb_frame_id:=/head_mount_kinect_rgb_optical_frame depth_frame_id:=/head_mount_kinect_ir_optical_frame' % self.camera, shell=True)
# self.speak("restarting processes")
# retcode = subprocess.call('roslaunch openni_launch openni.launch camera:=%s publish_tf:=false depth_registration:=true rgb_processing:=false ir_processing:=false depth_processing:=false depth_registered_processing:=false disparity_processing:=false disparity_registered_processing:=false hw_registered_processing:=true sw_registered_processing:=false rgb_frame_id:=/head_mount_kinect_rgb_optical_frame depth_frame_id:=/head_mount_kinect_ir_optical_frame' % self.camera, shell=True)
except Exception as e:
rospy.logerr('[%s] Unable to kill kinect node, caught exception:\n%s', self.__class__.__name__, traceback.format_exc())

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<launch>
<arg name="load_driver" default="true" doc="launch driver set to false on gazebo"/>
<arg name="manager_respawn" default="true" />
<arg name="respawn" default="true" />
<arg name="use_c2" default="true" doc="Launch nodes for registration on C2"/>
<arg name="deprecated_relay" default="true" doc="advertise to deprecated kinect_head_c2 ns"/>
Expand All @@ -26,12 +27,13 @@
<param name="/kinect_head/driver/depth_ir_offset_x" value="4.5" />
<param name="/kinect_head/driver/depth_ir_offset_y" value="2.5" />

<include file="$(find openni_launch)/launch/openni.launch"
<include file="$(find jsk_pr2_startup)/jsk_pr2_sensors/openni.launch"
if="$(arg load_driver)">
<arg name="camera" value="$(arg camera)"/>
<arg name="num_worker_threads" value="$(arg num_worker_threads)" />
<arg name="rgb_frame_id" value="head_mount_kinect_rgb_optical_frame" />
<arg name="depth_frame_id" value="head_mount_kinect_ir_optical_frame" />
<arg name="manager_respawn" value="$(arg manager_respawn)" />
<arg name="respawn" value="$(arg respawn)" />
<arg name="publish_tf" value="false"/>
<arg name="depth_registration" value="true"/>
Expand Down
31 changes: 31 additions & 0 deletions jsk_pr2_robot/jsk_pr2_startup/jsk_pr2_sensors/manager.launch.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!-- this file is copied and modified from $(find rgbd_launch)/launch/includes/manager.launch.xml -->
<!-- this file is modified from original to add respawn arguments -->
<!-- see https://github.com/ros-drivers/rgbd_launch/pull/40 -->

<!-- Start nodelet manager -->
<launch>

<!-- Name here should NOT be globally qualified (node names cannot contain /) -->
<arg name="name" />

<!-- Optionally launch manager in GDB, for debugging -->
<arg name="debug" default="false" />
<arg if="$(arg debug)" name="launch_prefix" value="xterm -e gdb --args" />
<arg unless="$(arg debug)" name="launch_prefix" value="" />
<!-- Worker threads -->
<arg name="num_worker_threads" />
<!-- respawn -->
<arg name="respawn" />

<!-- Also globally disable bond heartbeat timeout in debug mode, so everything
doesn't die when you hit a break point -->
<param if="$(arg debug)" name="/bond_disable_heartbeat_timeout" value="true" />

<!-- Nodelet manager -->
<node pkg="nodelet" type="nodelet" name="$(arg name)" args="manager"
output="screen" launch-prefix="$(arg launch_prefix)"
respawn="$(arg respawn)">
<param name="num_worker_threads" value="$(arg num_worker_threads)" />
</node>

</launch>
122 changes: 122 additions & 0 deletions jsk_pr2_robot/jsk_pr2_startup/jsk_pr2_sensors/openni.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
<!-- this file is copied and modified from $(find openni_launch)/launch/openni.launch -->
<!-- this launch is modified from original to add manager_respawn arguments -->
<!-- see https://github.com/ros-drivers/openni_camera/pull/78 -->

<!-- Entry point for using OpenNI devices -->
<launch>

<!-- "camera" should uniquely identify the device. All topics are pushed down
into the "camera" namespace, and it is prepended to tf frame ids. -->
<arg name="camera" default="camera" />
<arg name="rgb_frame_id" default="$(arg camera)_rgb_optical_frame" />
<arg name="depth_frame_id" default="$(arg camera)_depth_optical_frame" />

<!-- device_id can have the following formats:
"B00367707227042B": Use device with given serial number
"#1" : Use first device found
"2@3" : Use device on USB bus 2, address 3
"2@0" : Use first device found on USB bus 2
-->
<arg name="device_id" default="#1" />

<!-- By default, calibrations are stored to file://${ROS_HOME}/camera_info/${NAME}.yaml,
where ${NAME} is of the form "[rgb|depth]_[serial#]", e.g. "depth_B00367707227042B".
See camera_info_manager docs for calibration URL details. -->
<arg name="rgb_camera_info_url" default="" />
<arg name="depth_camera_info_url" default="" />

<!-- Use OpenNI's factory-calibrated depth->RGB registration? -->
<arg name="depth_registration" default="false" />

<!-- Arguments for remapping all device namespaces -->
<arg name="rgb" default="rgb" />
<arg name="ir" default="ir" />
<arg name="depth" default="depth" />
<arg name="depth_registered" default="depth_registered" />
<arg name="depth_registered_filtered" default="depth_registered" />
<arg name="projector" default="projector" />

<!-- Optionally suppress loading the driver nodelet and/or publishing the default tf
tree. Useful if you are playing back recorded raw data from a bag, or are
supplying a more accurate tf tree from calibration. -->
<arg name="load_driver" default="true" />
<arg name="publish_tf" default="true" />
<!-- Processing Modules -->
<arg name="rgb_processing" default="true"/>
<arg name="ir_processing" default="true"/>
<arg name="depth_processing" default="true"/>
<arg name="depth_registered_processing" default="true"/>
<arg name="disparity_processing" default="true"/>
<arg name="disparity_registered_processing" default="true"/>
<arg name="hw_registered_processing" default="true" />
<arg name="sw_registered_processing" default="true" />

<!-- Disable bond topics by default -->
<arg name="bond" default="false" /> <!-- DEPRECATED, use respawn arg instead -->
<arg name="respawn" default="$(arg bond)" />
<arg name="manager_respawn" default="false" />

<!-- Worker threads for the nodelet manager -->
<arg name="num_worker_threads" default="4" />

<!-- Push down all topics/nodelets into "camera" namespace -->
<group ns="$(arg camera)">

<!-- Start nodelet manager in top-level namespace -->
<arg name="manager" value="$(arg camera)_nodelet_manager" />
<arg name="debug" default="false" /> <!-- Run manager in GDB? -->
<include file="$(find jsk_pr2_startup)/jsk_pr2_sensors/manager.launch.xml">
<arg name="name" value="$(arg manager)" />
<arg name="debug" value="$(arg debug)" />
<arg name="num_worker_threads" value="$(arg num_worker_threads)" />
<arg name="respawn" value="$(arg manager_respawn)" />
</include>

<!-- Load driver -->
<include if="$(arg load_driver)"
file="$(find openni_launch)/launch/includes/device.launch.xml">
<!-- Could really use some syntactic sugar for this -->
<arg name="manager" value="$(arg manager)" />
<arg name="device_id" value="$(arg device_id)" />
<arg name="rgb_frame_id" value="$(arg rgb_frame_id)" />
<arg name="depth_frame_id" value="$(arg depth_frame_id)" />
<arg name="rgb_camera_info_url" value="$(arg rgb_camera_info_url)" />
<arg name="depth_camera_info_url" value="$(arg depth_camera_info_url)" />
<arg name="depth_registration" value="$(arg depth_registration)" />
<arg name="rgb" value="$(arg rgb)" />
<arg name="ir" value="$(arg ir)" />
<arg name="depth" value="$(arg depth)" />
<arg name="depth_registered" value="$(arg depth_registered)" />
<arg name="projector" value="$(arg projector)" />
<arg name="respawn" value="$(arg respawn)" />
</include>

<!-- Load standard constellation of processing nodelets -->
<include file="$(find rgbd_launch)/launch/includes/processing.launch.xml">
<arg name="manager" value="$(arg manager)" />
<arg name="rgb" value="$(arg rgb)" />
<arg name="ir" value="$(arg ir)" />
<arg name="depth" value="$(arg depth)" />
<arg name="depth_registered" value="$(arg depth_registered)" />
<arg name="depth_registered_filtered" value="$(arg depth_registered_filtered)" />
<arg name="projector" value="$(arg projector)" />
<arg name="respawn" value="$(arg respawn)" />
<arg name="rgb_processing" value="$(arg rgb_processing)" />
<arg name="ir_processing" value="$(arg ir_processing)" />
<arg name="depth_processing" value="$(arg depth_processing)" />
<arg name="depth_registered_processing" value="$(arg depth_registered_processing)" />
<arg name="disparity_processing" value="$(arg disparity_processing)" />
<arg name="disparity_registered_processing" value="$(arg disparity_registered_processing)" />
<arg name="hw_registered_processing" value="$(arg hw_registered_processing)" />
<arg name="sw_registered_processing" value="$(arg sw_registered_processing)" />
</include>

</group> <!-- camera -->

<!-- Load reasonable defaults for the relative pose between cameras -->
<include if="$(arg publish_tf)"
file="$(find rgbd_launch)/launch/kinect_frames.launch">
<arg name="camera" value="$(arg camera)" />
</include>

</launch>
Loading

0 comments on commit bc4ff19

Please sign in to comment.