Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Morse telemeters output keep increasing #799

Open
sybernatus opened this issue Sep 16, 2018 · 1 comment
Open

Morse telemeters output keep increasing #799

sybernatus opened this issue Sep 16, 2018 · 1 comment

Comments

@sybernatus
Copy link

sybernatus commented Sep 16, 2018

Hello,

I have an issue with telemeters (SICK & HOKUYO) in MORSE :

I have a TTRK with a telemeter in a scene, when I run it everythings ok but when I try to read the output from rostopic, my ranges keep increasing.

for example with the first range :
0.40021... becomes 0.48642... after some scan.

When I take those values and draw them to map my scene, its like the telemeter keep rotatin on itself.

image

Here is my python script below :

from morse.builder import *
from smartwater.builder.robots import TTRK2

robot = TTRK2()
robot.name = "TTRK2"

robot.configure_stream()
kb = Keyboard()
robot.append(kb)

env = Environment('smartwater/environments/pepiniere2.blend')
env.properties(longitude = 1.47604, latitude = 43.564903, altitude = 0)

env.set_camera_location([0, -18, 10.5])
env.set_camera_rotation({math.radians(60), 0.0, math.radians(0)])

and the robot :

from morse.builder import *
from math import pi

class TTRK2(GroundRobot):
    """
    A template robot model for TTRK2, with a motion controller and a pose sensor.
    """
    def __init__(self, name = None, debug = True, scale = 1.0):

        # TTRK2.blend is located in the data/robots directory
        GroundRobot.__init__(self, 'smartwater/robots/TTRK2.blend', name)
        self._bpy_object.scale = [scale, scale, scale]
        self.properties(classpath = "smartwater.robots.TTRK2.TTRK2")

        self.set_rigid_body()
        self.set_collision_bounds()

        self.motion = MotionVW()
        self.motion.name = "Motion_Controller"
        self.append(self.motion)

        self.gps = GPS()
        self.gps.name = "Pose"
        self.gps.translate(z = 0.18)
        self.append(self.gps)

        self.raw_gps = GPS()
        self.raw_gps.level("raw")
        self.raw_gps.translate(z = 0.18)
        self.append(self.raw_gps)


        self.odometry = Odometry()
        self.odometry.level("integrated")
        self.append(self.odometry)

        self.pose = Pose()
        self.append(self.pose)

        self.telem = Sick()
        self.telem.name = "Sick"
        self.telem.translate(x=0.12, z=0.3)
        self.telem.properties(resolution = 1)
        self.telem.properties(scan_window = 240)
        self.telem.properties(laser_range = 5.0)
        self.telem.frequency(20)
        self.append(self.telem)


    def profile(self):
        self.motion.profile()
        self.gps.profile()
        self.raw_gps.profile()
        self.odometry.profile()
        self.telem.profile()
        self.pose.profile()

    def configure_stream(self, mw = 'ros'):
        self.motion.add_stream(mw)
        self.gps.add_stream(mw)
        self.raw_gps.add_stream(mw)
        self.odometry.add_stream(mw)
        self.pose.add_stream(mw)
        self.telem.add_stream(mw)

pepiniere2.blend.zip

What I've done so far :

  • tried with a different .blend file,
  • tried to reduce the range of the telemeter
  • tried with another robot
  • tried on another project

but I have the same issue with both Hikoyu and Sick telemeters. So if someone can help me or explain me what I'm doin wrong.

Thanks

  • MORSE version: morse 1.4
  • Blender version: Blender 2.69
  • Python version: Python v.3.4.3

EDIT 1 :

  • I tried to edit & run the scene directly from blender, telemeter don't seem to turn around I rode value from socket but still value keep increasing or decreasing randombly at each scene start.

The only thing coming to my mind is that maybe the latency of the VM produce this... Any other idea ?

EDIT 2 :
I tried on another computer, same thing, the scan from telemeter seems to turn around the robot
I tried to remove and reinstall morse 1.4

Thanks again

@sybernatus
Copy link
Author

sybernatus commented Sep 19, 2018

I resolved my problem, I create another morse scene and place my robot inside again, I have now fixed value coming from telemeter.
But I would like to investigate later to know why I encountered this problem.

EDIT : Finally it didn't resolve it, there's still the problem even with a new project after few tests ...
With the new scene, values are stable if I don't move the robot. When I move it to another place, values becoming instables and start incrementing like above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant