-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
28,979 additions
and
204 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,77 @@ | ||
{ | ||
"cmake.sourceDirectory": "${workspaceRoot}/fast_raycast", | ||
"files.associations": { | ||
"*.p": "python", | ||
"eigen": "cpp", | ||
"cctype": "cpp", | ||
"clocale": "cpp", | ||
"cmath": "cpp", | ||
"cstdarg": "cpp", | ||
"cstddef": "cpp", | ||
"cstdio": "cpp", | ||
"cstdlib": "cpp", | ||
"cstring": "cpp", | ||
"ctime": "cpp", | ||
"cwchar": "cpp", | ||
"cwctype": "cpp", | ||
"array": "cpp", | ||
"atomic": "cpp", | ||
"strstream": "cpp", | ||
"*.tcc": "cpp", | ||
"bitset": "cpp", | ||
"chrono": "cpp", | ||
"complex": "cpp", | ||
"cstdint": "cpp", | ||
"deque": "cpp", | ||
"list": "cpp", | ||
"unordered_map": "cpp", | ||
"vector": "cpp", | ||
"exception": "cpp", | ||
"fstream": "cpp", | ||
"functional": "cpp", | ||
"initializer_list": "cpp", | ||
"iomanip": "cpp", | ||
"iosfwd": "cpp", | ||
"iostream": "cpp", | ||
"istream": "cpp", | ||
"limits": "cpp", | ||
"new": "cpp", | ||
"ostream": "cpp", | ||
"numeric": "cpp", | ||
"ratio": "cpp", | ||
"sstream": "cpp", | ||
"stdexcept": "cpp", | ||
"streambuf": "cpp", | ||
"system_error": "cpp", | ||
"thread": "cpp", | ||
"cfenv": "cpp", | ||
"cinttypes": "cpp", | ||
"tuple": "cpp", | ||
"type_traits": "cpp", | ||
"utility": "cpp", | ||
"typeinfo": "cpp", | ||
"algorithm": "cpp", | ||
"iterator": "cpp", | ||
"map": "cpp", | ||
"memory": "cpp", | ||
"memory_resource": "cpp", | ||
"optional": "cpp", | ||
"random": "cpp", | ||
"set": "cpp", | ||
"string": "cpp", | ||
"string_view": "cpp", | ||
"cassert": "cpp", | ||
"csignal": "cpp", | ||
"typeindex": "cpp", | ||
"core": "cpp" | ||
"cmake.sourceDirectory": "${workspaceRoot}/fast_raycast", | ||
"files.associations": { | ||
"*.p": "python", | ||
"eigen": "cpp", | ||
"cctype": "cpp", | ||
"clocale": "cpp", | ||
"cmath": "cpp", | ||
"cstdarg": "cpp", | ||
"cstddef": "cpp", | ||
"cstdio": "cpp", | ||
"cstdlib": "cpp", | ||
"cstring": "cpp", | ||
"ctime": "cpp", | ||
"cwchar": "cpp", | ||
"cwctype": "cpp", | ||
"array": "cpp", | ||
"atomic": "cpp", | ||
"strstream": "cpp", | ||
"*.tcc": "cpp", | ||
"bitset": "cpp", | ||
"chrono": "cpp", | ||
"complex": "cpp", | ||
"cstdint": "cpp", | ||
"deque": "cpp", | ||
"list": "cpp", | ||
"unordered_map": "cpp", | ||
"vector": "cpp", | ||
"exception": "cpp", | ||
"fstream": "cpp", | ||
"functional": "cpp", | ||
"initializer_list": "cpp", | ||
"iomanip": "cpp", | ||
"iosfwd": "cpp", | ||
"iostream": "cpp", | ||
"istream": "cpp", | ||
"limits": "cpp", | ||
"new": "cpp", | ||
"ostream": "cpp", | ||
"numeric": "cpp", | ||
"ratio": "cpp", | ||
"sstream": "cpp", | ||
"stdexcept": "cpp", | ||
"streambuf": "cpp", | ||
"system_error": "cpp", | ||
"thread": "cpp", | ||
"cfenv": "cpp", | ||
"cinttypes": "cpp", | ||
"tuple": "cpp", | ||
"type_traits": "cpp", | ||
"utility": "cpp", | ||
"typeinfo": "cpp", | ||
"algorithm": "cpp", | ||
"iterator": "cpp", | ||
"map": "cpp", | ||
"memory": "cpp", | ||
"memory_resource": "cpp", | ||
"optional": "cpp", | ||
"random": "cpp", | ||
"set": "cpp", | ||
"string": "cpp", | ||
"string_view": "cpp", | ||
"cassert": "cpp", | ||
"csignal": "cpp", | ||
"typeindex": "cpp", | ||
"core": "cpp", | ||
"unordered_set": "cpp", | ||
"hash_map": "cpp", | ||
"hash_set": "cpp", | ||
"codecvt": "cpp", | ||
"filesystem": "cpp" | ||
}, | ||
"python.autoComplete.extraPaths": [ | ||
"/home/orestis/dut18d_ws/DUT18D_ws/devel/lib/python2.7/dist-packages", | ||
"/opt/ros/melodic/lib/python2.7/dist-packages" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/usr/bin/env python | ||
import rospy | ||
import rosbag | ||
import csv | ||
from geometry_msgs.msg import Point, Pose | ||
|
||
# time of last world state message | ||
msg_time = rospy.Time(1565423386, 883208788) | ||
|
||
bag = rosbag.Bag("/home/bedskes/rosbags/fsg_trackdrive.bag") | ||
cones = [] | ||
for topic, msg, t in bag.read_messages(topics = ['/world_state'], start_time = msg_time, end_time = msg_time): | ||
objects = msg.objects | ||
for object in objects: | ||
for property in object.properties: | ||
if property.attribute == "position": | ||
cones.append(Point(property.pdf.data[1], property.pdf.data[2], 0.29)) | ||
|
||
with open('fast_raycast/src/test2.csv', mode = 'w') as cone_file: | ||
cone_writer = csv.writer(cone_file, delimiter=',') | ||
for cone in cones: | ||
cone_writer.writerow([cone.x, cone.y, cone.z]) | ||
print("GOT CONES") | ||
|
||
positions = [] | ||
for topic, msg, t in bag.read_messages(topics = ['/tf']): | ||
for tf in msg.transforms: | ||
if tf.header.frame_id == "map" and tf.child_frame_id == "base_link": | ||
pos = Pose() | ||
pos.position = tf.transform.translation | ||
pos.position.z = 0 | ||
pos.orientation = tf.transform.rotation | ||
positions.append(pos) | ||
|
||
# output to csv with position, orientation: x, y, z, x, y, z, w | ||
with open('fast_raycast/src/test_positions.csv', mode = 'w') as position_file: | ||
position_writer = csv.writer(position_file, delimiter=',') | ||
for pos in positions: | ||
position_writer.writerow([pos.position.x, | ||
pos.position.y, | ||
pos.position.z, | ||
pos.orientation.x, | ||
pos.orientation.y, | ||
pos.orientation.z, | ||
pos.orientation.w]) | ||
print("GOT POSITIONS") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
frame_id: "base_link" | ||
child_frame_id: "velodyne" | ||
transform: | ||
translation: | ||
x: 1.33 | ||
y: 0.0 | ||
z: 0.085 | ||
rotation: | ||
x: 0.0 | ||
y: 0.0 | ||
z: 0.0 | ||
w: 1.0 |
Oops, something went wrong.