Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify namespace for operation cmd topic: staro_drive -> drive #406

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -58,22 +58,22 @@
)

;; subscriber for operator command
(ros::subscribe "/staro_drive/operation/accel_cmd"
(ros::subscribe "/drive/operation/accel_cmd"
std_msgs::Float64
#'send self :accel-callback)
(ros::subscribe "/staro_drive/operation/brake_cmd"
(ros::subscribe "/drive/operation/brake_cmd"
std_msgs::Float64
#'send self :brake-callback)
(ros::subscribe "/staro_drive/operation/grasp_cmd"
(ros::subscribe "/drive/operation/grasp_cmd"
std_msgs::String
#'send self :grasp-callback)
(ros::subscribe "/staro_drive/operation/handle_cmd"
(ros::subscribe "/drive/operation/handle_cmd"
std_msgs::Float64
#'send self :handle-callback)
(ros::subscribe "/rfsensor"
geometry_msgs::WrenchStamped
#'send self :rfsensor-callback)
(ros::advertise "/staro_drive/pedal_state" std_msgs::Bool 1)
(ros::advertise "/drive/pedal_state" std_msgs::Bool 1)
)

;; handle command
Expand Down Expand Up @@ -182,7 +182,7 @@
)
(let ((pub-msg (instance std_msgs::Bool :init)))
(send pub-msg :data accel-flag)
(ros::publish "/staro_drive/pedal_state" pub-msg)
(ros::publish "/drive/pedal_state" pub-msg)
)
)
(:brake-callback
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

<node pkg="drc_task_common" type="DriveCmdInterrupter.py" name="drive_cmd_interrupter" output="screen"/>

<node pkg="topic_tools" type="throttle" name="handle_throttle" args="messages /staro_drive/operation/handle_cmd_raw 100 /staro_drive/operation/handle_cmd" />
<node pkg="topic_tools" type="throttle" name="accel_throttle" args="messages /staro_drive/operation/accel_cmd_raw 100 /staro_drive/operation/accel_cmd" />
<node pkg="topic_tools" type="throttle" name="brake_throttle" args="messages /staro_drive/operation/brake_cmd_raw 100 /staro_drive/operation/brake_cmd" />
<node pkg="topic_tools" type="throttle" name="handle_throttle" args="messages /drive/operation/handle_cmd_raw 100 /drive/operation/handle_cmd" />
<node pkg="topic_tools" type="throttle" name="accel_throttle" args="messages /drive/operation/accel_cmd_raw 100 /drive/operation/accel_cmd" />
<node pkg="topic_tools" type="throttle" name="brake_throttle" args="messages /drive/operation/brake_cmd_raw 100 /drive/operation/brake_cmd" />

</launch>
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ def __init__(self, node_name = "command_selector", rate = 10.0):
rospy.Subscriber("/handle_controller/accel", Float64, self.accel_cmd_callback)
rospy.Subscriber("/handle_controller/brake", Float64, self.brake_cmd_callback)
rospy.Subscriber("/handle_controller/gear", Int8, self.recognition_flag_callback)
rospy.Subscriber("/staro_drive/grasp_cmd", String, self.grasp_cmd_callback)
rospy.Subscriber("/drive/grasp_cmd", String, self.grasp_cmd_callback)

# publisher
self.handle_publisher = rospy.Publisher("/staro_drive/operation/handle_cmd_raw", Float64)
self.accel_publisher = rospy.Publisher("/staro_drive/operation/accel_cmd_raw", Float64)
self.brake_publisher = rospy.Publisher("/staro_drive/operation/brake_cmd_raw", Float64)
self.grasp_publisher = rospy.Publisher("/staro_drive/operation/grasp_cmd", String)
self.operation_flag_handle_publisher = rospy.Publisher("/staro_drive/operation/flag/handle", Bool)
self.operation_flag_pedal_publisher = rospy.Publisher("/staro_drive/operation/flag/pedal", Bool)
self.handle_publisher = rospy.Publisher("/drive/operation/handle_cmd_raw", Float64)
self.accel_publisher = rospy.Publisher("/drive/operation/accel_cmd_raw", Float64)
self.brake_publisher = rospy.Publisher("/drive/operation/brake_cmd_raw", Float64)
self.grasp_publisher = rospy.Publisher("/drive/operation/grasp_cmd", String)
self.operation_flag_handle_publisher = rospy.Publisher("/drive/operation/flag/handle", Bool)
self.operation_flag_pedal_publisher = rospy.Publisher("/drive/operation/flag/pedal", Bool)

def set_operation_flag(self, pub, flag):
operation_flag = Bool()
Expand Down