Go to Post Corndog is the new water game. - Basel A [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rating: Thread Rating: 2 votes, 4.50 average. Display Modes
  #1   Spotlight this post!  
Unread 21-01-2016, 17:25
garystjean garystjean is offline
Registered User
FRC #1991
 
Join Date: Dec 2015
Location: CT
Posts: 7
garystjean is an unknown quantity at this point
Re: FRCSIM Help

Alright I was able to get it working. I didn't realize that the new version requires me to manually load the world file using

frcsim worldfile.world

Once I did that and ran the GearsBot sample program I was able to get it working, though I had to fix up the joystick controls -the sample code didn't work with my Xbox controller.

One weird thing I noticed was that after I played around with the simulation for a couple minutes and tried out the Smart Dashboard simulator the robot seemed to drop down below the floor (see attachment). I can only see the top-most part of the robot, the rest is below the ground level?

Not sure if there is a defect in the model itself or something?

-Gary
Attached Thumbnails
Click image for larger version

Name:	GearsBotOddity.png
Views:	17
Size:	334.6 KB
ID:	19840  
Reply With Quote
  #2   Spotlight this post!  
Unread 21-01-2016, 18:41
andres_garbio andres_garbio is offline
Registered User
FRC #4403
Team Role: Mentor
 
Join Date: Apr 2014
Rookie Year: 2012
Location: Mexico
Posts: 5
andres_garbio is an unknown quantity at this point
Re: FRCSIM Help

After several minutes of inspection we saw that it's working! although it is very very slow (the gearbot claw takes 5 minutes to go up)

We are running it on a 64 bit computer with a intel core i7 processor and 8 Gb of RAM. Gazebo seems to be running just fine (we can zoom in and out real fast) is there any way we can make it run at normal speeds?
Reply With Quote
  #3   Spotlight this post!  
Unread 22-01-2016, 01:35
Peter Mitrano Peter Mitrano is offline
Registered User
no team
 
Join Date: Jan 2016
Location: Worcester MA
Posts: 21
Peter Mitrano is an unknown quantity at this point
Re: FRCSIM Help

Quote:
Originally Posted by andres_garbio View Post
After several minutes of inspection we saw that it's working! although it is very very slow (the gearbot claw takes 5 minutes to go up)

We are running it on a 64 bit computer with a intel core i7 processor and 8 Gb of RAM. Gazebo seems to be running just fine (we can zoom in and out real fast) is there any way we can make it run at normal speeds?
Interesting. What does gazebo say the real-time factor is? it should be displayed in the bottom of gazebo. Also, can you post some of the output from the following command?

Code:
gz topic -z /gazebo/frc/time
Reply With Quote
  #4   Spotlight this post!  
Unread 22-01-2016, 01:27
Peter Mitrano Peter Mitrano is offline
Registered User
no team
 
Join Date: Jan 2016
Location: Worcester MA
Posts: 21
Peter Mitrano is an unknown quantity at this point
Re: FRCSIM Help

Quote:
Originally Posted by garystjean View Post
One weird thing I noticed was that after I played around with the simulation for a couple minutes and tried out the Smart Dashboard simulator the robot seemed to drop down below the floor (see attachment). I can only see the top-most part of the robot, the rest is below the ground level?
-Gary
This is caused by an awesome little bug in simulation time. I'll be posting a video tutorial on debugging very soon that goes deep into it, but for now, just do this...

1) find all instances of usePIDOutpout()
2) find where you call the set() method on your motor
3) wrap it in an if statement that checks if the output is NaN

EX:
Code:
public void usePIDOutput(){
if (!Double.isNan(output)){
motor.set(output)
}
}
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 22:11.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi