ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

ROSTARS's profile - activity

2017-05-16 00:15:15 -0500 received badge  Famous Question (source)
2016-11-21 07:56:44 -0500 received badge  Notable Question (source)
2016-10-10 02:26:27 -0500 received badge  Famous Question (source)
2016-09-15 17:08:24 -0500 received badge  Student (source)
2016-03-04 22:09:13 -0500 received badge  Popular Question (source)
2015-12-17 02:12:37 -0500 received badge  Notable Question (source)
2015-12-16 08:43:19 -0500 received badge  Popular Question (source)
2015-12-16 00:03:12 -0500 asked a question How do you make xyz coordinate system appear in your marker?

Basically, I am trying to create visualization markers for possible trajectories.

2015-12-15 13:55:48 -0500 received badge  Famous Question (source)
2015-11-19 15:12:42 -0500 asked a question Rviz visualization of cube trajectories from green to red

#!/usr/bin/env python

import roslib; roslib.load_manifest('visualization_marker_tutorials') from visualization_msgs.msg import Marker from visualization_msgs.msg import MarkerArray import rospy import math

topic = 'visualization_marker_array' publisher = rospy.Publisher(topic, MarkerArray, queue_size=10)

rospy.init_node('register')

markerArray = MarkerArray()

count = 0 MARKERS_MAX = 100

while not rospy.is_shutdown():

# We add the new marker to the MarkerArray, removing the oldest marker from it when necessary for x in range(0,10): marker = Marker() marker.header.frame_id = "/map" marker.type = marker.CUBE # set our shape to be a cube marker.action = marker.ADD marker.scale.x = 1.0 marker.scale.y = 1.0 marker.scale.z = 1.0 marker.color.a = 1.0 marker.color.r = (50 + (x*2)) / float (255) marker.color.g = 170 / float (255) marker.color.b = 25 / float (255) marker.pose.orientation.w = 1.0 marker.pose.position.x = 0 marker.pose.position.y = 0 marker.pose.position.z = 0

  #Remove marker when necessary
  #Adding new marker each time in the Marker Array

  if(count > MARKERS_MAX):
     markerArray.markers.pop(0)

  markerArray.markers.append(marker)

  # Renumber the marker IDs

  id = 0
  for i in markerArray.markers:
     i.id = id
     id += 1

  # Publish the MarkerArray
  publisher.publish(markerArray)

  count += 1

  rospy.sleep(0.01)

So I am trying to create a trajectory from position in x going from 0 to 1 with color changing from green to red.

So far this is the code that I have and testing. It is publishing but does not seem to change color and only one box appears.

Any suggestions?

2015-10-25 20:02:18 -0500 received badge  Notable Question (source)
2015-10-25 17:15:53 -0500 received badge  Popular Question (source)
2015-10-24 20:04:59 -0500 asked a question Help! Cannot install Ros because of this.
The following packages have unmet dependencies:
 libgl1-mesa-dev-lts-utopic : Depends: mesa-common-dev-lts-utopic (= 10.3.2-0ubuntu1~trusty2) but it is not going to be installed
                              Depends: libgl1-mesa-glx-lts-utopic (= 10.3.2-0ubuntu1~trusty2) but it is not going to be installed
 unity-control-center : Depends: libcheese-gtk23 (>= 3.4.0) but it is not going to be installed
                        Depends: libcheese7 (>= 3.0.1) but it is not going to be installed