Skip to content

Commit

Permalink
Revert to the previous state
Browse files Browse the repository at this point in the history
Signed-off-by: Reiji Nakano <[email protected]>
  • Loading branch information
ReijiNakano committed Nov 21, 2024
1 parent cba99f2 commit 0456dbd
Show file tree
Hide file tree
Showing 5 changed files with 718 additions and 605 deletions.
10 changes: 5 additions & 5 deletions cabot_can/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ find_package(rclcpp REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(std_msgs REQUIRED)
find_package(std_srvs REQUIRED)
find_package(diagnostic_updater REQUIRED)
add_executable(cabot_can_node src/cabot_can_node.cpp)
ament_target_dependencies(cabot_can_node rclcpp std_msgs sensor_msgs std_srvs diagnostic_updater)

add_executable(can_all_node src/can_all_node.cpp)
ament_target_dependencies(can_all_node rclcpp std_msgs sensor_msgs std_srvs)

install(TARGETS can_all_node
install(TARGETS cabot_can_node
DESTINATION lib/${PROJECT_NAME})

ament_package()
ament_package()
36 changes: 36 additions & 0 deletions cabot_can/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# cabot_can
## Node
- cabot_can_node
### Services
- **run_imu_calibration** (std_srvs::srv::Trigger)
- This service will publish data from '/calibration' by sending the service if all 4 bits of the data received from CAN ID: 037 are equal to 3.
### Parameters
- **publish_rate** (int) - default=`200`
- publish_rate
- **can_interface** (string) - default=`can0`
- can interface numberinterface
- **imu_frame_id** (string) - default=`imu_frame`
- imu frame id
- **calibration_params** (int[22]) - default=`(22,0)`
- Can be set by setting parameters in calibration_params of params.yaml
### Publishers
- **/calibration** (int[22]): only publishes values when `/run_imu_calibration` is true
- **/imu** (sensor_msgs/msg/Imu): IMU data - 100Hz
- **/pressure**,**/bme/pressure** (sensor_msgs/msg/FluidPressure): Pressure data - 2Hz
- **/pushed** (std_msgs/msg/Int8): button status (bit0-4 represents each button) - 50Hz
- **/temparature_1**,**/temparature_2**,**/temparature_3**,**/temparature_4**,**/temparature_5**,**/bme/temperature**(sensor_msgs/msg/Temperature): Temperature data - 2Hz
- **/touch**, (std_msgs/msg/Int16): `1` if touched else `0`,
TOF Sensor and Capacitive Sensor Integration - 50Hz
- **/capacitive/touch**(std_msgs/msg/Int16): `1` if touched else `0`, Capacitive sensor's - 50Hz
- **/tof/touch**(std_msgs/msg/Int16): `1` if touched else `0`, Tof sensor's - 50Hz
- **/capacitive/touch_raw** (std_msgs/msg/Int16): capacitive sensor's raw value (for debug) - 50Hz
- **/tof/touch_raw** (std_msgs/msg/Int16): tof sensor's raw value (for debug) - 50Hz
- **/wifi** (std_msgs/msg/String): wifi scan string - depends on how often WiFi signal is scanned
- **/servo_pos** (std_msgs/msg/Int16): current position of directional indicator - 50Hz
### Subscribers
- **/vibrator1** (std_msgs/msg/UInt8): front
- **/vibrator3** (std_msgs/msg/UInt8): left
- **/vibrator4** (std_msgs/msg/UInt8): right
- if you publish a `value`, it vibrates corresponding vibrator for `value` x 10 milliseconds (0 - 2550 milliseconds)
- **/servo_target** (std_msgs/msg/Int16): if you publish a `value`, it rotates directional indicator (value: -179 ~ +179)
- **/servo_free** (std_msgs/msg/Bool): `false` -> set free, `true` -> no operation
7 changes: 7 additions & 0 deletions cabot_can/config/params.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
can_all_node:
ros__parameters:
calibration_params : [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
can_interface : "can0"
publish_rate : 200
imu_frame_id : "imu_frame"
#vibrator_power : 100
Loading

0 comments on commit 0456dbd

Please sign in to comment.