Wednesday, December 30, 2009

ScienceSim: Highly Recommended


I was just trying out ScienceSim, an OpenSimulator project sponsored by Intel and run and maintained by a loosely organized group of participating scientists and programmers. The main goal of the project is to "Enable new usages in education and visualization through the construction of persistent 3D spaces build and deployed by a federation of organizations and users (from the website)." You can create a free account at the first link and follow the instructions for downloading a viewer and configuring it to connect to the sim. Then you just explore. There doesn't seem to be any guiding organization to what projects and simulations are developed there and some could really use more information to be useful to the outside observer. One, however, is far and above the most worthwhile, especially for a teacher, and worth the price of admission itself (which is free, but...). That is the planetarium, which allows you to fly your avatar among the planets as they orbit the sun. UPDATE 1-27: To get there go to the Pascal region. The easiest way is to choose Pascal from the region menu on the left of the login screen. Or you can teleport over using the map once you log in. It would be an excellent simulation for any elementary or middle school class to experience as you can really see the different rates of the planetary orbits.

Some other simulations are promised but not always accessible. The project is comprised of different people hosting their own sims and linking them to this main one. So if someone's sim isn't running at the moment their teleport link won't work.

Wednesday, December 16, 2009

Making Robots Real: Constructionism and Robotics

I'm finally teaching robotics the way I've been wanting to for the last 5 years. Really the way I've been wanting to teach period for the last 17 years! Early on in my teaching career I read about constructionism and wanted to get my students doing writer's workshop, writing their own meaningful stories that intrinsically motivate them to become better writers. It never happened to my satisfaction because I could never find the right balance between teaching didactically and giving students the freedom to write what and how they wanted. Suddenly I find that it's coming together in my 9th grade robotics class. My students are inventing their own robots, and long-story-short here's how it happened.

Last year was my first year teaching 9th grade robotics and I went into it with the intention of making it as rigorous as they could handle with a focus on fundamental programming concepts. So while it was project-based in the sense that they produced projects, such as a vehicle that could follow a course taped out on white paper, I laid out a series of goals for them to reach so they could develop each project with progressively more sophisticated algorithms. What ended up happening is that a few students completed and understood everything, most got some of the way through the challenges, and some barely got past the first step, having been stuck just getting the project built and communication down. At no point during the class did I feel that they had ownership of their projects. When they completed the projects I gave them all they wanted to do was sit and talk rather than try more ideas.

This year I decided to give them more control over what they made and let their needs dictate the programming concepts they would learn. From the outset I gave them very few parameters--the first project simply had to involve programming the LED display, the second project using motors to illustrate gearing up or down and a switch to activate the motors--and have given them little explicit programming instruction. They have been much more involved in their projects and there have been many great opportunities to teach programming concepts that have been useful to them. In one case, a student had three procedures that were separate actions of her DJ robot and to get them all to run, she was typing their names separately in the direct command line. I hadn't taught them about creating a 'main' procedure that calls the sub-procedures. But once I showed her that it made sense right away. She was able to then go on to show the class and teach them the concept in a more effective way than I could have.

I think one key thing going forward will be giving them opportunities to explain their programming structures to the class, both to help them articulate what they are doing and to share good ideas that other students will hopefully want to try out and learn.

Looking back on last year's class, I realize I was not letting the students develop as much ownership of their projects as I could have by making the point of their projects being to move up through this sequence of concepts in a stepwise way. Rather than discovering the need for programming tools I was telling them when to use them so they never really took any interest in figuring out what they were for.

Tuesday, November 17, 2009

Wav2Rso: Making it Work Properly


Wav2Rso (scroll down) is a great program for doing one thing--converting WAV audio files to RSO format so they will play on a Lego NXT robot. You can take any WAV file--one you record or one you download from a website like findsounds.com--and put it on your robot. How fun! The only catch is that for some reason Wav2Rso is set to a sample rate of 8000 Hz. The typical WAV file is more like 11,025 Hz, so when you convert it, the sample lowers in pitch considerably and you have a quiet, baritone robot. The fix is to open the WAV file in Audacity or another audio editing program, edit the preferences to set the sample rate to 8000 Hz, then export it to WAV again. This file will convert properly and at the right frequency.

Friday, October 16, 2009

OpenSim in the Classroom: Diva Distribution Makes It So Much Easier

I have a sim running on XPSP3 on a desktop with a static IP. I set up a network switch so I can run network cables to a class of students' laptops with the Second Life Viewer with a command in the shortcut that makes it connect to the IP of our sim rather than Second Life online. A little more on the details of my setup is here. And here is the step-by-step for getting it up and running:
  1. Desktop running Windows XP SP3, assigned a static IP by the DNS server, no monitor, I just log in remotely. (Ask your system administrator to assign the IP if you, like me, can't.)
  2. Download the zip file for the latest Diva Distribution here. Unzip it to a folder in your Program Files folder called OpenSim or whatever you like. Diva is one of the core developers of OpenSim and has come out with this great binary distribution with good documentation and an update utility, which is an otherwise difficult task. Additionally, Diva has included several major improvements in the program, including 'megaregions,' or a seamlessly connected grid of regions. The default here is 2 X 2, or a total sim of 512 m X 512 m.
  3. Now look in your downloaded folder for the documentation. Read 'install.txt' first just to get an overview. Then read 'MySQL.txt.'
  4. Then install MySQL 5.1. There are good instructions here, though a little old. Stop following it when he gets to configuring the opensim.ini file because it's for an older version of OpenSim. The Toad--MySQL GUI--part is for an earlier version of Toad, but the idea is to create a root account and create a new database called 'opensim'. Then create another account named 'opensim' and any password you like that has full privileges to the opensim database. If you prefer you can use the mysqladmin commands (tutorials are here and here). That's also the method explained in MySQL.txt but you might need a little more to go on than just what commands to type. No need to create any tables. OpenSim will do that on first run.
  5. Download and install the .NET framework 3.5.
  6. Now follow the steps in 'install.txt.' After running OpenSim.exe in the steps you'll see lots of colorful commands fly by and hopefully no errors.
  7. Next you'll need a viewer. I tried Hippo and it's great except that if students are connecting on Windows machines with network accounts Hippo has no way I could figure out of saving the sim IP as the default for all users on the machine. Instead, I downloaded the Second Life viewer, installed it on the student laptops, right clicked on the desktop icon (which will need to be moved to the All Users desktop and given full permissions to 'everyone') and added the following flag in the 'target' field: -loginuri http://fixed.ip.ad.dress:9000/ That reroutes the viewer to your sim rather than actual Second Life on the web. If you don't want the occasionally racy SL screenshots showing up either you can add -loginpagehttp://fixed.ip.ad.dress:9000/?method=login.
  8. Now with your sim running, open the SL viewer from the icon and login with the master avatar account you created during the config. I hope it works! Enjoy it for a bit before tackling the next steps.
  9. For voice chat you need a voice conference service called FreeSWITCH. At the time of this writing there is a new option for voice called Vivox that sounds better and is fully spatial while FreeSWITCH isn't. But Vivox requires a "customer admin account" from Vivox and I don't know how to get that. (I've since found out it's a commercial application that costs thousands of dollars.) You can download a precompiled binary of FreeSWITCH here, and, yes, you have to install the Microsoft Visual C++ 2008 Redistributable Package like it says before you run the Freeswitch program.
  10. To configure Freeswitch to work with OpenSim, you have to change some config settings in a few xml files, explained here. This video also demos the steps. One confusing part of this video is that he's using v1.22 but he says anything after 1.22 is compatible with FreeSWITCH voice. It turns out the option to enable voice only exists in v1.22, but you switch to 1.23 to use it. More on that later.
  11. Now you're ready to configure settings for OpenSim in the OpenSim.ini file. Find the section labeled Freeswitch and configure those settings as shown at the bottom of the Freeswitch config instructions.
  12. Now you can start up Freeswitch. Double click freeswitch.exe. Ignore the red error messages (really!). Start up OpenSim exe.
  13. Open your viewer (v1.22) and log in to your sim.
  14. You have to enable voice chat for the estate. Click Edit > Preferences and under Voice Chat make sure it's enabled. Then click World > Region/Estate, click the estate tab and make sure "Allow Voice Chat" is checked. Finally, right click on the terrain, click About Land, click the Media tab, and click "use estate spatial channel."
  15. Then log out and log back in with v1.23. To use voice, make sure your headset is plugged in before you start the viewer and to talk click the talk button or the lock next to it.
  16. Once these things are set, you need someone else to log on or you could talk to yourself over two computers. To talk, look for the talk button on the lower right. Click the lock next to it to toggle talking on or just click and hold the talk button while you're talking.

Tuesday, October 13, 2009

Diva OpenSim Distribution looks promising

I've been thinking I will need to upgrade my OpenSim installation from 0.6.5 to 0.6.6 for hopefully some increased stability and reliability. This may be the ticket. I'll have to wait until we go through one round of the drama project, though. Don't want to break the sim at a crucial time.

Friday, October 02, 2009

OpenSim in the Classroom: Just Avoid Wireless

An app like this just needs more solid throughput than a wireless connection with at least a dozen clients over a single AP can provide. It just works so much better with wired computers. Today voice was crisp and clear--loud, even--without wireless and 13 clients. And I didn't let them edit appearance during the voice testing so voice stayed strong. I did confirm that FreeSWITCH is not spatial, unfortunately. Everyone is audible to everyone else at the same level no matter their relative grid position. We (the drama teacher and I) though we might be able to get small groups rehearsing simultaneously in different parts of the region, but that won't work.

The only problems were two accounts getting repeated failed logins, alternating between a "session crashed" message and a message that were already logged in when trying to log in. Turns out this resulted from their data not saving properly during an earlier session using wireless. This drove me nuts until I figured out a fix. Log in to the MySQL opensim database (using Toad or whatever MySQL GUI you were able to get, or MySQL admin if you can), go to the users table and find the user in question's UUID. Then go to the agents table and you'll find that that UUID has a few field values that the rest don't. AgentOnline will be 1 (true) instead of 0 (false), so change it to 0. LogoutTime will say 0 so you can just insert another user's value there. Then the currentPos will have some null value codes so just insert another user's values there, too. The user should be able to log in again, no problem. Since it's clear the crappy session data resulted from a poor connection, this type of thing is one more headache that can be avoided if you stick with wires.

Thursday, October 01, 2009

OpenSim in the Classroom: LAN Party

Today I tried plugging 14 clients into the school network so they could log in to our sim and we could take the FreeSWITCH voice chat for a test drive. The network cables are bundled so they won't get horribly tangled so I couldn't quite reach cables to all of the computers, leaving 3 of them wireless, which may have had an effect. Anyway, with students really wanting to continue editing their appearance (It IS a girls' school after all.) I tried having students toggle the talk button one at a time while they were still editing. A couple (loud and clear!) utterances into it and the voice service dropped out. No one could toggle their talk switch anymore. Watching the console I could see avatar inventory flying into the server so I'm guessing my only option left to get this thing working is to avoid combining any significant editing with voice data. I'll try that tomorrow, in a room where I think everyone can be wired. One preparation I plan to make before starting the drama production with 12 eighth graders in a couple weeks is to configure and edit all of the avatars for the students so they don't have to spend our precious training and rehearsal time doing it. Maybe they can configure their avatars during study hall. That will go over well...

Saturday, September 19, 2009

OpenSim in the Classroom: Wireless Issues

Anyone who knows how virtual worlds work could have told me that I would have trouble logging 14 students in to a sim over a wireless connection to our school's LAN. Now I know from experience that each user's client has to download too much data during the login process for it to go smoothly. I had several failed logins on the first attempt. Next class I had the students do rolling logins--only one at a time--and it went much better, only taking 8 minutes to get everyone in, configuring their avatars. Lesson learned.
UPDATE: After some experimentation I've found that any more than about 8 users logging in over the wireless causes too much latency for it to be more than a frustrating experience for the students. So they double up. For more than 8 students I'll have to hook up a switch and provide network cables--only for very special projects, like the drama project coming up.

Saturday, August 29, 2009

Connecting to OpenSim with SL Viewer on Mac

I am just running a sim in standalone mode but I want to share it out to other computers on my home network. Whether you are or not it's the same. The only diff is where it says 'ipofyoursim' you'll put whatever fixed IP your sim has.
  1. Download Second Life to your Mac, version 1.23, not viewer 2.
  2. Make TextEdit.app edit as plain text rather than rtf. This is because when you run the commands in the plain text file the shell will encounter formatting codes if it's rtf format.
  3. Paste this in a new file: /Applications/Second\ Life.app/Contents/MacOS/Second\ Life -loginuri http://ipofyoursim:9000/ -loginpage http://ipofyoursim:9000/?method=login. Save file as 'RunSLViewer.sh' on desktop.
  4. Open terminal, navigate to desktop (cd desktop).
  5. Change permissions to executable (chmod 777 RunSLViewer.sh).
  6. Run executable (./RunSLViewer.sh). Preceding ./ is required because for a file to be run as an executable the shell needs the file's system path. If the terminal session is in the same folder as the file, ./ is shorthand for the system path to terminal's location.
  7. Login to your sim!
  8. For a more user-friendly method, create an applescript with the script do shell script "/Users/username/desktop/RunSLViewer.sh" and put that on the desktop. No need to bother with Terminal after the chmod.

Thursday, August 27, 2009

FreeSWITCH log, successful connection

Logfile contents of a successful OpenSim chat connection using FreeSWITCH, including text coloring.
2009-08-27 14:13:40.525224 [DEBUG] switch_core_state_machine.c:397 (sofia/internal/xWOiLAj9AQHGGCji61A8MMw==@210.195.1.26) Running State Change CS_NEW
2009-08-27 14:13:40.525224 [DEBUG] switch_core_state_machine.c:403 (sofia/internal/xWOiLAj9AQHGGCji61A8MMw==@210.195.1.26) State NEW
2009-08-27 14:13:40.525224 [DEBUG] sofia_glue.c:3079 Audio Codec Compare [SIREN14-3D:111:32000:0]/[G7221:115:32000:20]
2009-08-27 14:13:40.525224 [DEBUG] sofia_glue.c:3079 Audio Codec Compare [SIREN14-3D:111:32000:0]/[G722:9:8000:20]
2009-08-27 14:13:40.525224 [DEBUG] sofia_glue.c:3079 Audio Codec Compare [SIREN14-3D:111:32000:0]/[PCMU:0:8000:20]
2009-08-27 14:13:40.525224 [DEBUG] sofia_glue.c:3079 Audio Codec Compare [SIREN14-3D:111:32000:0]/[PCMA:8:8000:20]
2009-08-27 14:13:40.525224 [DEBUG] sofia_glue.c:3079 Audio Codec Compare [SIREN14-3D:111:32000:0]/[GSM:3:8000:20]
2009-08-27 14:13:40.525224 [DEBUG] sofia_glue.c:3079 Audio Codec Compare [PCMU:0:8000:0]/[G7221:115:32000:20]
2009-08-27 14:13:40.525224 [DEBUG] sofia_glue.c:3079 Audio Codec Compare [PCMU:0:8000:0]/[G722:9:8000:20]
2009-08-27 14:13:40.525224 [DEBUG] sofia_glue.c:3079 Audio Codec Compare [PCMU:0:8000:0]/[PCMU:0:8000:20]
2009-08-27 14:13:40.540848 [DEBUG] sofia_glue.c:2037 Set Codec sofia/internal/xWOiLAj9AQHGGCji61A8MMw==@210.195.1.26 PCMU/8000 20 ms 160 samples
2009-08-27 14:13:40.540848 [DEBUG] sofia_glue.c:3039 Set 2833 dtmf payload to 101
2009-08-27 14:13:40.540848 [DEBUG] sofia.c:3376 (sofia/internal/xWOiLAj9AQHGGCji61A8MMw==@210.195.1.26) State Change CS_NEW -> CS_INIT
2009-08-27 14:13:40.540848 [DEBUG] switch_core_session.c:933 Send signal sofia/internal/xWOiLAj9AQHGGCji61A8MMw==@210.195.1.26 [BREAK]
2009-08-27 14:13:40.540848 [DEBUG] switch_core_state_machine.c:397 (sofia/internal/xWOiLAj9AQHGGCji61A8MMw==@210.195.1.26) Running State Change CS_INIT
2009-08-27 14:13:40.540848 [DEBUG] switch_core_state_machine.c:480 (sofia/internal/xWOiLAj9AQHGGCji61A8MMw==@210.195.1.26) State INIT
2009-08-27 14:13:40.540848 [DEBUG] mod_sofia.c:83 sofia/internal/xWOiLAj9AQHGGCji61A8MMw==@210.195.1.26 SOFIA INIT
2009-08-27 14:13:40.540848 [DEBUG] mod_sofia.c:111 (sofia/internal/xWOiLAj9AQHGGCji61A8MMw==@210.195.1.26) State Change CS_INIT -> CS_ROUTING
2009-08-27 14:13:40.540848 [DEBUG] switch_core_session.c:933 Send signal sofia/internal/xWOiLAj9AQHGGCji61A8MMw==@210.195.1.26 [BREAK]
2009-08-27 14:13:40.540848 [DEBUG] switch_core_state_machine.c:480 (sofia/internal/xWOiLAj9AQHGGCji61A8MMw==@210.195.1.26) State INIT going to sleep
2009-08-27 14:13:40.540848 [DEBUG] switch_core_state_machine.c:397 (sofia/internal/xWOiLAj9AQHGGCji61A8MMw==@210.195.1.26) Running State Change CS_ROUTING
2009-08-27 14:13:40.540848 [DEBUG] switch_core_state_machine.c:483 (sofia/internal/xWOiLAj9AQHGGCji61A8MMw==@210.195.1.26) State ROUTING
2009-08-27 14:13:40.540848 [DEBUG] mod_sofia.c:130 sofia/internal/xWOiLAj9AQHGGCji61A8MMw==@210.195.1.26 SOFIA ROUTING
2009-08-27 14:13:40.540848 [DEBUG] switch_core_state_machine.c:78 sofia/internal/xWOiLAj9AQHGGCji61A8MMw==@210.195.1.26 Standard ROUTING
2009-08-27 14:13:40.540848 [INFO] mod_dialplan_xml.c:252 Processing Sophie Nauman->confctl-xNDFhZTQ4MjEtMDFmMi00NDNkLTkzMWEtOWRhMjA3YmQ1ZTFk in context default
Dialplan: sofia/internal/xWOiLAj9AQHGGCji61A8MMw==@210.195.1.26 parsing [default->sip_uri] continue=false
Dialplan: sofia/internal/xWOiLAj9AQHGGCji61A8MMw==@210.195.1.26 Regex (FAIL) [sip_uri] destination_number(confctl-xNDFhZTQ4MjEtMDFmMi00NDNkLTkzMWEtOWRhMjA3YmQ1ZTFk) =~ /^sip:(.*)$/ break=on-false
Dialplan: sofia/internal/xWOiLAj9AQHGGCji61A8MMw==@210.195.1.26 parsing [default->opensim_conferences] continue=false
Dialplan: sofia/internal/xWOiLAj9AQHGGCji61A8MMw==@210.195.1.26 Regex (PASS) [opensim_conferences] destination_number(confctl-xNDFhZTQ4MjEtMDFmMi00NDNkLTkzMWEtOWRhMjA3YmQ1ZTFk) =~ /^confctl-(.*)$/ break=on-false
Dialplan: sofia/internal/xWOiLAj9AQHGGCji61A8MMw==@210.195.1.26 Action answer()
Dialplan: sofia/internal/xWOiLAj9AQHGGCji61A8MMw==@210.195.1.26 Action conference(xNDFhZTQ4MjEtMDFmMi00NDNkLTkzMWEtOWRhMjA3YmQ1ZTFk-${domain_name}@default)
2009-08-27 14:13:41.556460 [DEBUG] switch_core_state_machine.c:114 (sofia/internal/xWOiLAj9AQHGGCji61A8MMw==@210.195.1.26) State Change CS_ROUTING -> CS_EXECUTE
2009-08-27 14:13:41.556460 [DEBUG] switch_core_session.c:933 Send signal sofia/internal/xWOiLAj9AQHGGCji61A8MMw==@210.195.1.26 [BREAK]
2009-08-27 14:13:41.556460 [DEBUG] switch_core_state_machine.c:483 (sofia/internal/xWOiLAj9AQHGGCji61A8MMw==@210.195.1.26) State ROUTING going to sleep
2009-08-27 14:13:41.556460 [DEBUG] switch_core_state_machine.c:397 (sofia/internal/xWOiLAj9AQHGGCji61A8MMw==@210.195.1.26) Running State Change CS_EXECUTE
2009-08-27 14:13:41.556460 [DEBUG] switch_core_state_machine.c:490 (sofia/internal/xWOiLAj9AQHGGCji61A8MMw==@210.195.1.26) State EXECUTE
2009-08-27 14:13:41.556460 [DEBUG] mod_sofia.c:173 sofia/internal/xWOiLAj9AQHGGCji61A8MMw==@210.195.1.26 SOFIA EXECUTE
2009-08-27 14:13:41.556460 [DEBUG] switch_core_state_machine.c:151 sofia/internal/xWOiLAj9AQHGGCji61A8MMw==@210.195.1.26 Standard EXECUTE
EXECUTE sofia/internal/xWOiLAj9AQHGGCji61A8MMw==@210.195.1.26 answer()
2009-08-27 14:13:41.556460 [DEBUG] mod_dptools.c:649 sofia/internal/xWOiLAj9AQHGGCji61A8MMw==@210.195.1.26 receive message [ANSWER]
2009-08-27 14:13:41.556460 [DEBUG] sofia_glue.c:2271 AUDIO RTP [sofia/internal/xWOiLAj9AQHGGCji61A8MMw==@210.195.1.26] 210.195.1.26 port 17858 -> 210.195.0.163 port 22860 codec: 0 ms: 20
2009-08-27 14:13:41.556460 [DEBUG] switch_rtp.c:1138 Starting timer [soft] 160 bytes per 20ms
2009-08-27 14:13:41.556460 [DEBUG] mod_sofia.c:549 Local SDP sofia/internal/xWOiLAj9AQHGGCji61A8MMw==@210.195.1.26:
v=0
o=FreeSWITCH 1251378963 1251378964 IN IP4 210.195.1.26
s=FreeSWITCH
c=IN IP4 210.195.1.26
t=0 0
m=audio 17858 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

Thursday, August 06, 2009

Voice chat in OpenSim

Good news--it works. Bad news--it's hard to do.
(UPDATE 10/16: Not hard any more. The binary install of OpenSim is easy with the Diva Distribution. The FreeSWITCH part is kind of hard, still.)
This post explains my specific environment (standalone on a LAN).
This is my setup: XPSP2, compiled version 0.6.5 of OpenSim, Freeswitch, and SL Viewer version 1.23. Here are the steps to making it happen:
  1. First install MySQL like in this tutorial.
  2. The binary version of OpenSim doesn't include the Freeswitch voice module, so you'll have to compile an experimental version from source. (update: well, now I've upgraded to the 0.6.6 binary on a separate installation and it does include the FreeSwitch module, but I can't get it to run with MySQL storage, only SQLite. Something to work on...)
  3. A couple weeks ago I used an SVN client, or subversion client, called TortoiseSVN to download the subversion 0.6.5 from http://dist.opensimulator.org/. They've since moved to a system called 'Git' for downloading subversions and the versions are no longer there. I haven't tried Git but the directions for installing it are here and downloading the right version here (scroll down). Just try to get 0.6.5 as I found when upgrading to 0.6.6 it wouldn't run with MySQL. Some configurations were changed I couldn't figure out. Download it to C:\Program Files\OpenSim (you have to create this first).
  4. Once you have the files and folders, you have to compile the program. Go here and scroll down to the green Visual C# 2008 compiler and download and install it. It will also contain the .NET 2.0 framework, which is required for OpenSim to run.
  5. Now it's time to compile. Navigate to your OpenSim directory and run "runprebuild.bat" by double clicking on it.
  6. Open Visual C# through the start menu. Click File > Open Project. Browse to your OpenSim directory and choose a file called "OpenSim.sln". On the right side in a moment you should see a file tree under Solution Explorer. At the top menu, click Build > Build Solution. At the bottom of the Visual C# window you'll see the status change as it builds each project. It will tell you when it's done.
  7. Before you configure OpenSim, you need to download and configure Freeswitch. You can download a precompiled binary here, and, yes, you have to install the Microsoft Visual C++ 2008 Redistributable Package like it says before you run the Freeswitch program.
  8. To configure Freeswitch to work with OpenSim, you have to change some config settings in a few xml files, explained here. This video also demos the steps, though the end, configuring the region, has conflicting info. He's using SLViewer v1.22 but it shouldn't work until 1.23.
  9. Now you're ready to configure settings for OpenSim in the OpenSim.ini file. Follow these instructions from numbers 5-11 to set OpenSim to store data in your MySQL database and other stuff. This version will have the Freeswitch module section that was absent in the binary version. Configure those settings as shown at the bottom of the Freeswitch config instructions.
  10. Now you can start up Freeswitch. Double click freeswitch.exe. Ignore the red error messages (really!). Start up OpenSim exe. Now go to exactly 3:00 here where they are starting OpenSim.exe and follow their steps, which continue on in part 2, EXCEPT where you put in the region IP (at 5:00) you'll want to put in the computer's fixed IP (Your sysadmin will have to assign the computer a fixed IP if you can't). You can stop when they get to downloading Hippo Viewer.
  11. Now you need the SLViewer version 1.23. This is key, because earlier versions don't work with Freeswitch. Install it and configure it as in step 14 here.
  12. Once you're logged in to your sim, you have to enable voice chat for the estate. Click Edit > Preferences and under Voice Chat make sure it's enabled. Then click World > Region/Estate, click the estate tab and make sure "Allow Voice Chat" is checked. The above video I mentioned is confusing because he is using SLViewer v1.22, which allows him to make the final config adjustment of right clicking on the terrain, clicking About Land, clicking the media tab, and choosing either "use the estate spatial channel" or "private channel". This option isn't available in v1.23, but I couldn't get voice to work in 1.22. Even now I'm wondering if I was able to get it to work in 1.23 because I had first selected the "use estate spatial channel" in a 1.22 viewer, then switched to 1.23. I don't know...It's also possible I didn't know to click the lock on the talk button and that's why it didn't work in 1.22, though I could swear the talk button was greyed out, unclickable.
  13. Anyway, once these things are set, you need someone else to log on or you could talk to yourself over two computers. If you are using headsets, make sure they are plugged in before starting the viewer. To talk, look for the talk button on the lower right. Click the lock next to it to toggle talking on or just click and hold the talk button while you're talking.

Monday, August 03, 2009

Installing OpenSim to use over a LAN


OpenSim is an open source version of Second Life. You install, run, and configure it, set up a viewer, and it's your very own virtual world. SL has tons of object (prims) that are given away or sold and OpenSim is a blank slate. But it's yours and you have full control over who can access it and what they can do there. That makes it an excellent resource for teaching.

There are lots of tutorials on getting your own OpenSim up and running out there but 90% are just for standalone sandbox on your own machine and the rest are for grid mode in which you link your region with others out there on other people's machines. I'm writing this tutorial because I want to run my own sim but have my students connect to it through a client viewer on laptops connecting over our school's wireless network. The basic plan is installing the opensim service on a computer, installing MySQL so objects have permanence and don't have to be reactivated when the sim restarts or users log off, and giving that computer a static IP so client apps always know where to find it. With this setup you can run the sim on one computer and connect to it from any other computer on your school network, but it's not publicly available outside your school unless you open that IP up through the firewall (which I may consider later on). Here's how I did it (UPDATE 10/16: I've just upgraded to the newest version of OpenSim using Diva's Distribution, which makes all of the following pretty much obsolete. I'm just keeping the old steps below so I can look back some day and appreciate how far it's all come. It's now SO much easier. Here is the tutorial for the Diva approach.)
  1. Desktop running Windows XP SP3, assigned a static IP by the DNS server, no monitor, I just log in remotely. (Ask your system administrator to assign the IP if you, like me, can't.)
  2. MySQL 5.1 installed (good instructions here, a little old. The Toad (MySQL GUI) part is for an earlier version of Toad, but the idea is to create a root account and create a new database called 'opensim'. If you prefer you can use the mysql command line (tutorials here and here instead for mysql command line tools. No need to create any tables. OpenSim will do that on first run. Stop the first tutorial and continue to the next step when he gets to configuring the opensim.ini file because it's for an older version of OpenSim.
  3. Okay, now go download an opensim binary (look for the Windows binary on the right, soon to be version 0.6.6). The version I've installed is 'standalone' 0.6.3. The two flavors of OpenSim are standalone and grid mode and I spent two days thinking that since I wanted to share out my region with other computers on our LAN I needed grid mode (which is much more complicated to install). After much frustration (couldn't connect) it dawned on me that grid mode is for connecting regions over the internet. Standalone is what you want if you're just looking for an insulated virtual world not connected to the other regions out there.
  4. Run the installer but don't start OpenSim yet. First you need to edit some settings in the OpenSim.ini file you'll find among the many files in the Program Files\OpenSim folder. OpenSim.exe looks to this file for all of its configuration info so you set these here by adding and removing semi-colons so it will ignore and follow what you want it to.
  5. So open OpenSim.ini in a text editor.
  6. Under STORAGE add a semi-colon in front of storage_plugin = "OpenSim.Data.SQLite.dll"
    (and the next line "storage_connection_string" if it doesn't have one).
  7. You want it to use your MySQL database to store primitives and user attributes so they stay from one session to another. I believe the default, SQLite, isn't good with that. So remove the semi-colon from storage_plugin="OpenSim.Data.MySQL.dll" and the next line.
  8. One the connection string line you'll need to add your database details, storage_connection_string="Data Source=localhost;Database=opensim;User ID=root;Password=yourpassword;";
  9. Under the PHYSICS section you might want to uncomment the physics = OpenDynamicsEngine line. This physics algorithm prevents objects from going through each other whereas the default doesn't.
  10. The PERMISSIONS section allows you to set permissions (obviously) but I haven't played with that yet. I will definitely revisit those settings soon. Once OpenSim is running, you can shut it down, change settings, and restart it if you want to adjust things.
  11. In the STANDALONE section there are more SQLite settings and you need to change them to the same MySQL settings as in the STORAGE section.
  12. There are more interesting settings further down that I haven't investigated yet, like SUN for daytime and nighttime automation and VOICE for voice chat. I'll update when I get these figured out. You'll see below I'm not using the Hippo Opensim viewer but if you do you'll want to fill in the GRIDINFO section which gives the appropriate details to Hippo when you set it to your sim.
  13. Now go to exactly 3:00 here where they are starting OpenSim.exe and follow their steps, which continue on in part 2, EXCEPT where you put in the region IP (at 5:00) you'll want to put in the computer's fixed IP. You can stop when they get to downloading Hippo Viewer.
  14. I tried Hippo and it's great except that if students are connecting on Windows machines with network accounts Hippo has no way I could figure out of saving the sim IP as the default for all users on the machine. Instead, I downloaded the Second Life viewer, installed it on the student laptops, right clicked on the desktop icon (which will need to be moved to the All Users desktop and given full permissions to 'everyone') and added the following flag in the 'target' field: -loginuri http://fixed.ip.ad.dress:9000/ That reroutes the viewer to your sim rather than actual Second Life on the web. If you don't want the occasionally racy SL screenshots showing up either you can add -loginpagehttp://fixed.ip.ad.dress:9000/?method=login.
  15. Now with your sim running, open the SL viewer from the icon and login with the master avatar account you created. I hope it works!
  16. Finally, you might be wondering about voice chat. There's supposedly a module, explained here, that enables that through the SL viewer. We'll see. I've spent some time on this but I'll address it in a separate post because it turns out to be quite involved.

Teaching With OpenSim

The drama teacher in my school asked me to look into setting up a virtual world like Second Life that he could use for his students to produce and perform a virtual play, with an eye towards eventually collaborating with another school. It's an amazing idea. I looked into a few existing options--Second Life and There. But neither fit our needs. SL is bandwidth heavy and segregates teens from adults unless you purchase a private island for a grand and while There is more affordable you can't share the prims you've purchased (I don't think you can actually make things yourself), which rules out easy collaboration. I have more thoughts on the ideologies of SL and There here.

So I settled on OpenSim for an adventure. Now that it's set up it is the perfect platform. Permissions can be managed, prims can be shared with other users, and in many other ways you have full control over your region.

A couple of other ideas that have occurred to me are virtual soccer (just for fun), and sculpture exhibits. I would like to have a department meeting in there, too. If anyone has more ideas let me know.

Friday, July 24, 2009

Notes on Mayer, Moreno, "Nine Ways to Reduce Cognitive Load in Multimedia Learning"

  • "The goal of [their] research is to figure out how to use words and pictures to foster meaningful learning," and the biggest hurdle to doing that successfully is minimizing cognitive overload.
  • This paper is a summary of the entire Cognitive Science I syllabus. Every paragraph represents at least a paper or chapter. Wow, it's chock-full.
  • I think my website design avoids the split attention effect and reduces incidental processing by allowing only one section to be open at a time. So while you are looking at the information in one section you aren't distracted by what's going on in another section, like a video or school assignments. This is done with this nice little bit of JavaScript:
    collapseprev: true,
  • Signaling: tell them how to use the information.

Wednesday, July 22, 2009

Final Project Web Site


My final project web site is coming along. Here is the link to it. And here is a picture of my flow chart for the site.

Creative Commons Licensed Media

I just found this article that lists more than 30 websites where you can find media released for public use (with attribution and varying restrictions). Here is the link: http://www.sitepoint.com/blogs/2009/04/30/30-creative-commons-sources/. Creative Commons Licensing can be a little confusing, so you can learn about it here: http://creativecommons.org/about/licenses.

Sunday, July 19, 2009

Amazon Erasing Digital Books Should Come As No Surprise

Kindle users were angered when their "1984" and "Animal Farm" copies were deleted from their e-readers because of a copyright issue. I would have been pretty annoyed (or very pissed if I were the student who lost all his notes for his summer assignment with his copy) but not surprised. Appearance is not the biggest difference between physical books and ebooks. A digital format offers a vastly greater amount of control by those who control its distribution than an analog format. An ebook is data to Amazon. Amazon has created a data architecture whereby they can monitor and manipulate everything they sell to Kindle users, which is pretty brilliant, though I don't like buying into that level of control myself. It's the way they executed their solution to their copyright problem that caused such a public relations fiasco. If they had given customers a bit of warning, say, in an email the day before to explain the need for the refund, most people would have had no problem.

Thursday, July 16, 2009

Social Architecture of Cyberspaces

In "Code Version 2.0" Lessig has a great section on virtual world spaces, specifically comparing Second Life and There. The major distinction he points out is that the architects of SL let members be the owners of anything they create; it's their intellectual property. In contrast, the creators of There follow a corporate model and take ownership of anything created in There with the exception of other businesses (Nike, etc.) with a presence in There. There's creators imagined businesses playing a central role in providing assets that individual users would then simply enjoy. Consequently, while There is still here it's fizzling as Second Life continues to grow.

A small but interesting point of comparison is the manner of accessing each. They both have their respective client VW viewers but There also allows you to access your account, including assets, help forums, and shopping, through the corporate Internet Explorer browser and its activeX technology.

Lastly, I wish Lessig would had discussed OpenSim, which I'm working on setting up now for my school. He discusses Open Source somewhat in the abstract in other parts of the book, but it would add an interesting perspective to the virtual world discussion.

Tuesday, July 14, 2009

Get Dropbox

Go to dropbox.com now and get it if you regularly work on more than one computer. Dropbox does one thing really well, which is share and update versions of files among different computers. You get a folder at your user account level on your Mac or Windows computer and you drag an file you want to have access to at your other computer/s. Sure, you could easily do this by emailing it to yourself or uploading it to a web site of some kind, but this just takes all file types, up to 2 GB free, and makes the task so darn easy. Just log in to your other computer and after a little spinning of arrows the contents of your dropbox on that computer are updated. And if you are at a public computer, just go to dropbox.com, log in, and download what you need. Seriously, get it.

Tuesday, July 07, 2009

Fair Use Explained Clearly

This document, "Code of Best Practices in Fair Use for Media Literacy Education," is an excellent resource for understanding Fair Use. It puts the power and responsibility of choosing appropriate media for instructional use in the hands of the educator as the law intends instead of making us feel like we are getting away with something by using any media. It also makes clear to me that in cases where I have felt like students' use of media wasn't covered by fair use I was right. "...students may use copyrighted music for a variety of purposes, but cannot rely on fair use when their goal is simply to establish a mood or convey an emotional tone, or when they employ popular songs simply to exploit their appeal and popularity." The original work needs to be repurposed or transformed in such a way that its use contributes to an educational goal.

Monday, July 06, 2009

Prensky, Digital Natives/Immigrants

I noticed a point in Prensky's "Digital Natives Digital Immigrants" that was similar to the way I'm thinking of the Learning Wiki. To create software to teach engineers how to use a new type of CAD software Prensky had the developers and professors (content specialists) "create a series of graded tasks into which the skills to be learned were embedded." The skills were not to be organized by concept or vocabulary or in a certain sequence, but by practical application. This is how I envision information being organized in the Learning Wiki.

Thursday, July 02, 2009

Point about Identity in Cyberspace

Reading Lawrence Lessig's "Code Version 2.0." There's a good point about identity on the Internet. "While in real space...anonymity has to be created, in cyberspace anonymity is the given." On the Internet your identity is built from the IP address up. What you add to your IP adds to the picture of your identity. Of course, the main point of the book is that commerce, the law, and government have created an architecture of the Internet that prevents you from accessing many, if not most, spaces without significant creditials that certify who you are.

Learning Wiki

In a constructivist learning environment providing sufficient support for students to be successful is tricky. Since students are working on solving unique problems at varying levels of difficulty the teacher can't predict very easily exactly what information they will need to find their solutions. In addition, the teacher can't, and shouldn't, be there to help every student with every problem. I propose developing a learning wiki as a means of providing some of this scaffolding. This wiki doesn't have a predetermined structure, nor specific predetermined content. The students will decide and maintain both. My hope is that when they encounter a problem they will be able to find possible solutions in the learning wiki. The key to making this successful is for students to update the wiki with their solutions as much as possible and create the structure of the wiki around the problems they faced. More on this later.

Wednesday, March 18, 2009

Robots in Different Cultures

I've been listening to the robotics podcasts on Talking Robots. Dario Floreano spent about 2 years until August 2008 interviewing top researchers in the field of robotics and artificial intelligence. The podcast archive is a gold mine of information for someone wanting to get a leg up on what the current trends are in the field. One theme mentioned in several interviews is the different levels of acceptance of robots by the general public in different countries. One interviewee, I wish I could remember who, summed it up by saying "The Japanese embrace robots in their daily life, Americans are afraid robots will take control of their lives, and Europeans think robots will take their jobs." I guess for my part I hope to dispell my students' fear of robots taking over by teaching them that robots are only ever doing what they've been told to do. The key is understanding what that is. Then you know what you're dealing with.

Monday, March 16, 2009

Storytelling Alice: Looking Back


My 7th grade students have just finished their animation projects. In the end I decided to collaborate with the science teacher and have the students apply what they were learning about genetics in that class in making these stories. The assignment was to portray two groups (families) of characters in two scenes and have a character's genetically inherited trait explained in some way. One family had to be human and the other non-human (animals, aliens, robots, fairies, etc) and while with the human family the traits had to be real, they could make up the non-human characters' traits. They came up with some interesting solutions to integrating scientific information into a narrative. A few students set the story in a classroom in which a teacher was beginning a lesson on genetics, then it would cut to a video the class was watching in which genetics were explained using animals or fairies.

So what did they get out of the project? I think they did benefit from applying the genetic vocabulary to a story of their own. I overheard many conversations trying to clarify trait types, recessiveness and dominance, and how to spell words like allele and phenotype. I also wanted to them to get some programming concepts as well, and this happened to varying degrees. I demonstrated what seemed like the most useful concepts as they began their stories and told them to use them when they felt they needed them in making their stories, like tools they may or may not need in a toolbox. I showed them the looping command, do together command, and how to create a new method. Do together was by far the most widely used, which is interesting because it gives the programmer a high degree of control over the action to a degree that would be very hard to do in most programming languages. Do together essentially allows instant multi-tasking, making that concept deceptively easy to apply in Alice. Some students found it necessary and worth the effort to make new methods. We discovered how challenging it can be to program a character that doesn't know how to kick to do so. Some students were, of course, quite lost. One big misconception a few students had was thinking they had to create a new method to make anything happen. They would create a 'stand up' method and drop a whole dialog sequence in it. They were missing the basic idea of methods as meaningful containers of instructions. Some of the students realized the possibilities for programming the camera actions and made some very exciting things happen with that. Many had to be walked through the steps to create the second scene and link the two together as described in this post. A few completely missed that idea and just started a new project when they went to create their second scene. If they hadn't gone too far I would stop them and show them how to add the second scene to the first.

Next go around I'll spend more time teaching them how to create multiple scenes. I want to create a screencast of the process so they can do it independently. I also want to spend more time practicing the commands at the bottom of the scripting panel, like looping, do together, and do in order so they have a better idea of when they will be appropriate.

I encountered few bugs after using it for 6 weeks. One was due to the wireless connection not being quite robust enough when students were saving to their network drives. A lot of students were getting corrupted projects that couldn't be opened until I updated the Dell wireless drivers on the laptops and that problem stopped. Often an animation would throw an error with the message "An error has occurred during simulation." I would go back to the script and disable the command directly after the point in the animation that the error happened to try and pinpoint the faulty code. More often than not once I found the command I had to delete it and reinsert it and it worked. It often occurred with the command "Camera fade to black" for some reason. Other than that the program was impressively reliable.

Thursday, January 22, 2009

Sunday, January 11, 2009

Creating Multiple Scenes with Storytelling Alice

I just had a great week teaching 6th graders how to program 3D animations with Storytelling Alice. (See here for more about the program.) But they also taught me a lot, because there were things I couldn't figure out how to do and their discoveries put it together for me. The biggest was how to create multiple scenes. Kelleher provides a sample animation you can access in the help section that sort of explains how, but wasn't explicit enough for me to get it. So here's how:
  1. First, understand that the default method, 'World.scene 1 method,' must be used as the method in which the first scene is scripted and an organizing method that will play all of the other scenes in your story.
  2. Add a few objects and characters to your first scene and click 'done.' You can go back and add more later.
  3. Program an action for one character in the first scene so you have something to see when you play it.
  4. Now create the second scene by clicking 'create new scene' and call it 'scene 2.'
  5. Add a character to it.
  6. Now change your current scene tripod to opening scene tripod and try playing the animation. You will see that the first scene plays but the second doesn't. We'll fix that.
  7. Up in your object tree click on the world object. You'll see the scene 1 method and scene 2 method below the tree. Drag the scene 2 method into the script area of the scene 1 method, at the bottom of what you already scripted. In this way, the actions of the first scene will play and then the second scene will follow.
  8. Now edit the scene 2 method and before any action in the scene occurs direct the camera to orient to that scene by clicking the camera in the object tree and dragging the 'camera orient to...' tile to the top of scene 2 method's script. Choose 'scene 2's tripod' in the context menu that pops up.
  9. Try playing the animation again and you'll see that the second scene now plays.
  10. Between scenes the camera swings wildly from one scene to the next. You can direct the camera to fade out before it changes orientation and fade back in when it's pointing at the second scene so you don't see the transition.
  11. If you want a title first, click the tab for the first scene in the scripting area, click the camera in the object tree and drag the 'camera show title' tile before the first action in scene 1's script.
You can program as many scenes as you want this way. The amazing revelation to me about this is that now I can see how the program allows you to direct not only the characters in the scenes but the camera, lights, and titles, giving you a lot more control than I realized. My students really took off with this once we all put it together.