Functions | Variables
export_to_svg Namespace Reference

Functions

def arrowMarker (color='green', orientation='auto')
 
def feedback_callback (data)
 
def quaternion2YawDegree (orientation)
 
def sign (number)
 

Variables

 anonymous
 
 feedback_callback
 
 FeedbackMsg
 
list feedbackMsg = []
 
string filename_string = "teb_svg_" + timestr + '.svg'
 
 goal_arrow = svg.polyline([(0,-1),(6,-1),(5,-5),(15,0),(5,5),(6,1),(0,1)], fill='red', opacity=1.0)
 
list goal_pose = feedbackMsg.trajectories[0].trajectory[len(feedbackMsg.trajectories[0].trajectory)-1].pose
 
list goal_position = goal_pose.position
 
int GRID_X_MAX = 2
 
int GRID_X_MIN = -2
 
int GRID_Y_MAX = 1
 
int GRID_Y_MIN = -2
 
 hLines = svg.add(svg.g(id='hLines', stroke='black'))
 
 legend = svg.g(id='legend', font_size=25)
 
 legendGeometry = svg.text(stringGeometry)
 
 line
 
list line_end = obstacle.polygon.points[1]
 
list line_start = obstacle.polygon.points[0]
 
float MIN_POSE_DISTANCE = 0.3
 
int OBSTACLE_DIST = 50 *SCALE/100
 
list point = obstacle.polygon.points[0]
 
list points = []
 
 queue_size
 
 rate = rospy.Rate(10.0)
 
int SCALE = 200
 
float SCALE_VELOCITY_VEC = 0.4
 
 start_arrow = svg.polyline([(0,-1),(6,-1),(5,-5),(15,0),(5,5),(6,1),(0,1)], fill='blue', opacity=1.0)
 
list start_pose = feedbackMsg.trajectories[0].trajectory[0].pose
 
list start_position = start_pose.position
 
string stringGeometry = "Geometry: 1 Unit = 1.0m"
 
 svg = svgwrite.Drawing(filename=filename_string, debug=True)
 
 timestr = time.strftime("%Y%m%d_%H%M%S")
 
string topic_name = "/test_optim_node/teb_feedback"
 
 traj_color = svgwrite.rgb(random.randint(0, 255), random.randint(0, 255), random.randint(0, 255), 'RGB')
 
 tx
 
 ty
 
list vertices = []
 
 vLines = svg.add(svg.g(id='vline', stroke='black'))
 

Function Documentation

◆ arrowMarker()

def export_to_svg.arrowMarker (   color = 'green',
  orientation = 'auto' 
)
Create an arrow marker with svgwrite

@return:  arrow marker
@rtype:   svg_write marker object 

Definition at line 56 of file export_to_svg.py.

◆ feedback_callback()

def export_to_svg.feedback_callback (   data)
Callback for receiving TEB and obstacle information

@param data: Received feedback message
@type  data: visualization_msgs/Marker

@globalparam tebList: Received TEB List
@globaltype  tebList: teb_local_planner/FeedbackMsg

Definition at line 82 of file export_to_svg.py.

◆ quaternion2YawDegree()

def export_to_svg.quaternion2YawDegree (   orientation)
Get yaw angle [degree] from quaternion representation

@param orientation:     orientation in quaternions to read from
@type  orientation:     geometry_msgs/Quaternion
@return: yaw angle [degree]
@rtype:  float  

Definition at line 69 of file export_to_svg.py.

◆ sign()

def export_to_svg.sign (   number)
Signum function: get sign of a number

@param number: get sign of this number
@type  number: numeric type (eg. integer)
@return:  sign of number
@rtype:   integer {1, -1, 0}  

Definition at line 45 of file export_to_svg.py.

Variable Documentation

◆ anonymous

export_to_svg.anonymous

Definition at line 103 of file export_to_svg.py.

◆ feedback_callback

export_to_svg.feedback_callback

Definition at line 107 of file export_to_svg.py.

◆ FeedbackMsg

export_to_svg.FeedbackMsg

Definition at line 107 of file export_to_svg.py.

◆ feedbackMsg

list export_to_svg.feedbackMsg = []

Definition at line 112 of file export_to_svg.py.

◆ filename_string

string export_to_svg.filename_string = "teb_svg_" + timestr + '.svg'

Definition at line 115 of file export_to_svg.py.

◆ goal_arrow

export_to_svg.goal_arrow = svg.polyline([(0,-1),(6,-1),(5,-5),(15,0),(5,5),(6,1),(0,1)], fill='red', opacity=1.0)

Definition at line 214 of file export_to_svg.py.

◆ goal_pose

list export_to_svg.goal_pose = feedbackMsg.trajectories[0].trajectory[len(feedbackMsg.trajectories[0].trajectory)-1].pose

Definition at line 198 of file export_to_svg.py.

◆ goal_position

list export_to_svg.goal_position = goal_pose.position

Definition at line 200 of file export_to_svg.py.

◆ GRID_X_MAX

int export_to_svg.GRID_X_MAX = 2

Definition at line 35 of file export_to_svg.py.

◆ GRID_X_MIN

int export_to_svg.GRID_X_MIN = -2

Definition at line 34 of file export_to_svg.py.

◆ GRID_Y_MAX

int export_to_svg.GRID_Y_MAX = 1

Definition at line 37 of file export_to_svg.py.

◆ GRID_Y_MIN

int export_to_svg.GRID_Y_MIN = -2

Definition at line 36 of file export_to_svg.py.

◆ hLines

export_to_svg.hLines = svg.add(svg.g(id='hLines', stroke='black'))

Definition at line 127 of file export_to_svg.py.

◆ legend

export_to_svg.legend = svg.g(id='legend', font_size=25)

Definition at line 142 of file export_to_svg.py.

◆ legendGeometry

export_to_svg.legendGeometry = svg.text(stringGeometry)

Definition at line 144 of file export_to_svg.py.

◆ line

export_to_svg.line
Initial value:
1 = svg.add( svg.polyline(points=points, fill='none', stroke=traj_color, stroke_width=10, stroke_linecap='round', \
2  stroke_linejoin='round', opacity=1.0 ) )

Definition at line 183 of file export_to_svg.py.

◆ line_end

list export_to_svg.line_end = obstacle.polygon.points[1]

Definition at line 229 of file export_to_svg.py.

◆ line_start

list export_to_svg.line_start = obstacle.polygon.points[0]

Definition at line 228 of file export_to_svg.py.

◆ MIN_POSE_DISTANCE

float export_to_svg.MIN_POSE_DISTANCE = 0.3

Definition at line 32 of file export_to_svg.py.

◆ OBSTACLE_DIST

int export_to_svg.OBSTACLE_DIST = 50 *SCALE/100

Definition at line 40 of file export_to_svg.py.

◆ point

list export_to_svg.point = obstacle.polygon.points[0]

Definition at line 223 of file export_to_svg.py.

◆ points

list export_to_svg.points = []

Definition at line 176 of file export_to_svg.py.

◆ queue_size

export_to_svg.queue_size

Definition at line 107 of file export_to_svg.py.

◆ rate

export_to_svg.rate = rospy.Rate(10.0)

Definition at line 111 of file export_to_svg.py.

◆ SCALE

export_to_svg.SCALE = 200

Definition at line 31 of file export_to_svg.py.

◆ SCALE_VELOCITY_VEC

float export_to_svg.SCALE_VELOCITY_VEC = 0.4

Definition at line 33 of file export_to_svg.py.

◆ start_arrow

export_to_svg.start_arrow = svg.polyline([(0,-1),(6,-1),(5,-5),(15,0),(5,5),(6,1),(0,1)], fill='blue', opacity=1.0)

Definition at line 207 of file export_to_svg.py.

◆ start_pose

list export_to_svg.start_pose = feedbackMsg.trajectories[0].trajectory[0].pose

Definition at line 197 of file export_to_svg.py.

◆ start_position

list export_to_svg.start_position = start_pose.position

Definition at line 199 of file export_to_svg.py.

◆ stringGeometry

string export_to_svg.stringGeometry = "Geometry: 1 Unit = 1.0m"

Definition at line 143 of file export_to_svg.py.

◆ svg

export_to_svg.svg = svgwrite.Drawing(filename=filename_string, debug=True)

Definition at line 121 of file export_to_svg.py.

◆ timestr

export_to_svg.timestr = time.strftime("%Y%m%d_%H%M%S")

Definition at line 114 of file export_to_svg.py.

◆ topic_name

export_to_svg.topic_name = "/test_optim_node/teb_feedback"

Definition at line 105 of file export_to_svg.py.

◆ traj_color

export_to_svg.traj_color = svgwrite.rgb(random.randint(0, 255), random.randint(0, 255), random.randint(0, 255), 'RGB')

Definition at line 173 of file export_to_svg.py.

◆ tx

export_to_svg.tx

Definition at line 146 of file export_to_svg.py.

◆ ty

export_to_svg.ty

Definition at line 146 of file export_to_svg.py.

◆ vertices

list export_to_svg.vertices = []

Definition at line 233 of file export_to_svg.py.

◆ vLines

export_to_svg.vLines = svg.add(svg.g(id='vline', stroke='black'))

Definition at line 133 of file export_to_svg.py.



teb_local_planner
Author(s): Christoph Rösmann
autogenerated on Sun Jan 7 2024 03:45:15