Skip to content

Commit 0456dbd

Browse files
committed
Revert to the previous state
Signed-off-by: Reiji Nakano <[email protected]>
1 parent cba99f2 commit 0456dbd

File tree

5 files changed

+718
-605
lines changed

5 files changed

+718
-605
lines changed

cabot_can/CMakeLists.txt

+5-5
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ find_package(rclcpp REQUIRED)
1010
find_package(sensor_msgs REQUIRED)
1111
find_package(std_msgs REQUIRED)
1212
find_package(std_srvs REQUIRED)
13+
find_package(diagnostic_updater REQUIRED)
14+
add_executable(cabot_can_node src/cabot_can_node.cpp)
15+
ament_target_dependencies(cabot_can_node rclcpp std_msgs sensor_msgs std_srvs diagnostic_updater)
1316

14-
add_executable(can_all_node src/can_all_node.cpp)
15-
ament_target_dependencies(can_all_node rclcpp std_msgs sensor_msgs std_srvs)
16-
17-
install(TARGETS can_all_node
17+
install(TARGETS cabot_can_node
1818
DESTINATION lib/${PROJECT_NAME})
1919

20-
ament_package()
20+
ament_package()

cabot_can/README.md

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# cabot_can
2+
## Node
3+
- cabot_can_node
4+
### Services
5+
- **run_imu_calibration** (std_srvs::srv::Trigger)
6+
- 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.
7+
### Parameters
8+
- **publish_rate** (int) - default=`200`
9+
- publish_rate
10+
- **can_interface** (string) - default=`can0`
11+
- can interface numberinterface
12+
- **imu_frame_id** (string) - default=`imu_frame`
13+
- imu frame id
14+
- **calibration_params** (int[22]) - default=`(22,0)`
15+
- Can be set by setting parameters in calibration_params of params.yaml
16+
### Publishers
17+
- **/calibration** (int[22]): only publishes values when `/run_imu_calibration` is true
18+
- **/imu** (sensor_msgs/msg/Imu): IMU data - 100Hz
19+
- **/pressure**,**/bme/pressure** (sensor_msgs/msg/FluidPressure): Pressure data - 2Hz
20+
- **/pushed** (std_msgs/msg/Int8): button status (bit0-4 represents each button) - 50Hz
21+
- **/temparature_1**,**/temparature_2**,**/temparature_3**,**/temparature_4**,**/temparature_5**,**/bme/temperature**(sensor_msgs/msg/Temperature): Temperature data - 2Hz
22+
- **/touch**, (std_msgs/msg/Int16): `1` if touched else `0`,
23+
TOF Sensor and Capacitive Sensor Integration - 50Hz
24+
- **/capacitive/touch**(std_msgs/msg/Int16): `1` if touched else `0`, Capacitive sensor's - 50Hz
25+
- **/tof/touch**(std_msgs/msg/Int16): `1` if touched else `0`, Tof sensor's - 50Hz
26+
- **/capacitive/touch_raw** (std_msgs/msg/Int16): capacitive sensor's raw value (for debug) - 50Hz
27+
- **/tof/touch_raw** (std_msgs/msg/Int16): tof sensor's raw value (for debug) - 50Hz
28+
- **/wifi** (std_msgs/msg/String): wifi scan string - depends on how often WiFi signal is scanned
29+
- **/servo_pos** (std_msgs/msg/Int16): current position of directional indicator - 50Hz
30+
### Subscribers
31+
- **/vibrator1** (std_msgs/msg/UInt8): front
32+
- **/vibrator3** (std_msgs/msg/UInt8): left
33+
- **/vibrator4** (std_msgs/msg/UInt8): right
34+
- if you publish a `value`, it vibrates corresponding vibrator for `value` x 10 milliseconds (0 - 2550 milliseconds)
35+
- **/servo_target** (std_msgs/msg/Int16): if you publish a `value`, it rotates directional indicator (value: -179 ~ +179)
36+
- **/servo_free** (std_msgs/msg/Bool): `false` -> set free, `true` -> no operation

cabot_can/config/params.yaml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
can_all_node:
2+
ros__parameters:
3+
calibration_params : [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
4+
can_interface : "can0"
5+
publish_rate : 200
6+
imu_frame_id : "imu_frame"
7+
#vibrator_power : 100

0 commit comments

Comments
 (0)